0% found this document useful (0 votes)
48 views

%lab Assignment 2 4/12/11

The document contains the output of running a MATLAB script that performs various arithmetic operations on matrices and creates conversion tables between different units of measurement. Matrices A and B are defined and combined using addition, subtraction, element-wise division and multiplication, and exponential and power functions. Tables are generated to convert between centimeters and inches, miles per hour to feet per second, dollars to foreign currencies, Fahrenheit to Kelvin temperatures from 0 to 200°F, Celsius to Rankine temperatures, and Celsius to Fahrenheit temperatures from 0 to 288°C.

Uploaded by

wc1215
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

%lab Assignment 2 4/12/11

The document contains the output of running a MATLAB script that performs various arithmetic operations on matrices and creates conversion tables between different units of measurement. Matrices A and B are defined and combined using addition, subtraction, element-wise division and multiplication, and exponential and power functions. Tables are generated to convert between centimeters and inches, miles per hour to feet per second, dollars to foreign currencies, Fahrenheit to Kelvin temperatures from 0 to 200°F, Celsius to Rankine temperatures, and Celsius to Fahrenheit temperatures from 0 to 288°C.

Uploaded by

wc1215
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

%Lab Assignment 2

4/12/11
%run
A=[2 -1 5 0]
A=
2

-1

B=[3 2 -1 4]
B=
3

-1

C=B+A-3
C=
2

-2

C = A./B
C=
0.6667 -0.5000 -5.0000

C = 2*A + A.^B
C=
12.0000 -1.0000 10.2000

C = 2.^B + A
C=
10.0000

3.0000

5.5000 16.0000

C = 2*B/3.*A
C=
4.0000 -1.3333 -3.3333

Table of conversions from centimeters to inches


table =
0
2.0000
4.0000
6.0000
8.0000
10.0000
12.0000
14.0000
16.0000
18.0000
20.0000

0
0.7874
1.5748
2.3622
3.1496
3.9370
4.7244
5.5118
6.2992
7.0866
7.8740

22.0000
24.0000
26.0000
28.0000
30.0000
32.0000
34.0000
36.0000
38.0000
40.0000
42.0000
44.0000
46.0000
48.0000
50.0000

8.6614
9.4488
10.2362
11.0236
11.8110
12.5984
13.3858
14.1732
14.9606
15.7480
16.5354
17.3228
18.1102
18.8976
19.6850

Table of conversions from mi/hr to ft/s


table =
0
5.0000
10.0000
15.0000
20.0000
25.0000
30.0000
35.0000
40.0000
45.0000
50.0000
55.0000
60.0000
65.0000

0
7.3333
14.6667
22.0000
29.3333
36.6667
44.0000
51.3333
58.6667
66.0000
73.3333
80.6667
88.0000
95.3333

Table of conversions from dollars to francs, deutsche marks, and yen


table =
0
1.00
2.00
3.00
4.00
5.00
6.00
7.00
8.00
9.00
10.00
11.00
12.00
13.00
14.00
15.00
16.00
17.00
18.00
19.00
20.00
21.00

0
5.04
10.09
15.14
20.18
25.23
30.27
35.31
40.36
45.41
50.45
55.49
60.54
65.58
70.63
75.67
80.72
85.77
90.81
95.86
100.90
105.94

0
0
1.47
98.78
2.94
197.55
4.40
296.33
5.87
395.10
7.34
493.88
8.81
592.66
10.28
691.43
11.75
790.21
13.21
888.99
14.68
987.76
16.15
1086.54
17.62
1185.31
19.09
1284.09
20.55
1382.87
22.02
1481.64
23.49
1580.42
24.96
1679.19
26.43
1777.97
27.90
1876.75
29.36
1975.52
30.83
2074.30

22.00
23.00
24.00
25.00
26.00
27.00
28.00
29.00
30.00
31.00
32.00
33.00
34.00
35.00
36.00
37.00
38.00
39.00
40.00
41.00
42.00
43.00
44.00
45.00
46.00
47.00
48.00
49.00
50.00

110.99
116.04
121.08
126.13
131.17
136.22
141.26
146.31
151.35
156.39
161.44
166.49
171.53
176.57
181.62
186.67
191.71
196.76
201.80
206.85
211.89
216.94
221.98
227.03
232.07
237.12
242.16
247.21
252.25

32.30
33.77
35.24
36.70
38.17
39.64
41.11
42.58
44.05
45.51
46.98
48.45
49.92
51.39
52.86
54.32
55.79
57.26
58.73
60.20
61.66
63.13
64.60
66.07
67.54
69.01
70.47
71.94
73.41

2173.08
2271.85
2370.63
2469.40
2568.18
2666.96
2765.73
2864.51
2963.28
3062.06
3160.84
3259.61
3358.39
3457.17
3555.94
3654.72
3753.49
3852.27
3951.05
4049.82
4148.60
4247.38
4346.15
4444.93
4543.70
4642.48
4741.26
4840.03
4938.81

Conversion from Fahrenheit to Kelvin from values 0 F to 200 F


Enter increment value in degrees F between lines: 32
Conversion from Celsius to Rankin
Enter starting value in degrees C: 0
Enter increment value in degrees C between lines: 32
tableCR3 =
0
32.00
64.00
96.00
128.00
160.00
192.00
224.00
256.00
288.00
320.00
352.00
384.00
416.00
448.00
480.00
512.00
544.00
576.00
608.00
640.00
672.00
704.00

491.67
549.27
606.87
664.47
722.07
779.67
837.27
894.87
952.47
1010.07
1067.67
1125.27
1182.87
1240.47
1298.07
1355.67
1413.27
1470.87
1528.47
1586.07
1643.67
1701.27
1758.87

736.00
768.00

1816.47
1874.07

Conversion from Celsius to Fahrenheit


Enter starting value in degrees C: 0
Enter increment value in degrees C between lines: 32
Enter number of lines for the table: 10
tableCF3 =
0
32.00
64.00
96.00
128.00
160.00
192.00
224.00
256.00
288.00

32.00
89.60
147.20
204.80
262.40
320.00
377.60
435.20
492.80
550.40

You might also like