Contents
Aaron Klapheck
clear, clc, home
fprintf('The date and time: %s \n \n', datestr(now))
The date and time: 21-Nov-2008 13:21:12
Get Data.
text_info = ['Time ', ' Conductance', ' Temp'];
numbers = [1 197 71
2 200 69
3 203 66
4 206 64
5 208 63
6 211 61
7 213 59
8 215 58
9 217 56
10 219 55
11 221 54
12 223 52
13 224 52
14 226 50
15 227 49
16 229 48
17 230 47
18 231 47
19 232 46
20 233 46
21 234 45
22 235 44
23 236 44
24 237 43
25 238 42
26 239 42
27 239 42
28 240 41
29 241 40
30 241 40
31 242 40
32 243 39
33 243 39
34 243 39
35 244 39
36 244 39
37 245 38
38 245 38
39 246 37
40 246 37
41 246 37
42 247 37
43 247 37
44 247 37
45 248 36
46 248 36
47 248 36
48 249 36
49 249 35
50 249 35
51 248 36
52 244 38
53 249 35
54 249 35
55 251 34
56 251 34
57 252 32
58 252 32
59 253 31
60 253 31];
fprintf('%s\n', text_info)
fprintf('%3.0f \t %5.0f \t \t %4.0f \n', numbers')
Conductance = (numbers(1:60, 2)/10);
Temperature = numbers(1:60, 3);
Time Conductance Temp
1 197 71
2 200 69
3 203 66
4 206 64
5 208 63
6 211 61
7 213 59
8 215 58
9 217 56
10 219 55
11 221 54
12 223 52
13 224 52
14 226 50
15 227 49
16 229 48
17 230 47
18 231 47
19 232 46
20 233 46
21 234 45
22 235 44
23 236 44
24 237 43
25 238 42
26 239 42
27 239 42
28 240 41
29 241 40
30 241 40
31 242 40
32 243 39
33 243 39
34 243 39
35 244 39
36 244 39
37 245 38
38 245 38
39 246 37
40 246 37
41 246 37
42 247 37
43 247 37
44 247 37
45 248 36
46 248 36
47 248 36
48 249 36
49 249 35
50 249 35
51 248 36
52 244 38
53 249 35
54 249 35
55 251 34
56 251 34
57 252 32
58 252 32
59 253 31
60 253 31
Test 2 Graph of Conductance of Salt Water vs. Temperature of Salt Water
fprintf('\n%%%%%% Conductance vs. Temperature %%%%%%\n')
FitToLine = polyfit(Temperature, Conductance, 1);
fprintf('\nConductance = %g(T) + %g \n', FitToLine)
x = [25:0.01:75];
Cond_FitToLine = polyval(FitToLine, x);
plot(Temperature, Conductance, x, Cond_FitToLine), ...
xlabel('Temperature (C)'), ylabel('Conductance (mSiemens)'), ...
title('Conductance vs Temperature'), ...
text(40, 25, 'Conductance = -0.147094(T) + 30.0356'), ...
legend('Measurement', 'Line Fit')
%%% Conductance vs. Temperature %%%
Conductance = -0.147094(T) + 30.0356