Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please show all your MATLAB work This problem requires you to generate temperatu

ID: 3601674 • Letter: P

Question

please show all your MATLAB work

This problem requires you to generate temperature-conversion tables. Use the following equations, which describe the relationships between temperatures in degrees Fahrenheit (T), degrees Celsius (Tc), kelvins (Tk), and degrees Rankine (TR), respectively: TF=TR - 459.67"R You will need to rearrange these expressions to solve some of the problems. (a) Create a function called F_to_K that converts temperatures in Fahrenheit to Kelvin. Use your function to generate a conversion table for values from 0°F to 200°F (b) Create a function called C_to_R that converts temperatures in Celsius to Rankine. Use your function to generate a conversion table from 0°C to 100°C. Print 25 lines in the table. (Use the linspace function to create your input vector.) (c) Create a function called C to_F that converts temperatures in Celsius to Fahrenheit. Use your function to generate a conversion table from 0°C to 100°C. Choose an appropriate spacing. (d) Group your functions into a folder (directory) called my_temp_conversions. Adjust the MATLAB® search path so that it finds your folder. (Don't save any changes on a public computer!)

Explanation / Answer

The below Matlab Functions satisfies the above requirements as follows:-

a) F_to_K:-

fprintf('TF TK ')
for TF=0:1:200
TK=F_to_K(TF)
fprintf('%f %f ',TF,TK)
end

function TK = F_to_K(TF)
TR=TF+459.67
TK=(5/9).*TR
end

Output:-

TF TK
0.000000 255.372222
1.000000 255.927778
2.000000 256.483333
3.000000 257.038889
4.000000 257.594444
5.000000 258.150000
6.000000 258.705556
7.000000 259.261111
8.000000 259.816667
9.000000 260.372222
10.000000 260.927778
11.000000 261.483333
12.000000 262.038889
13.000000 262.594444
14.000000 263.150000
15.000000 263.705556
16.000000 264.261111
17.000000 264.816667
18.000000 265.372222
19.000000 265.927778
20.000000 266.483333
21.000000 267.038889
22.000000 267.594444
23.000000 268.150000
24.000000 268.705556
25.000000 269.261111
26.000000 269.816667
27.000000 270.372222
28.000000 270.927778
29.000000 271.483333
30.000000 272.038889
31.000000 272.594444
32.000000 273.150000
33.000000 273.705556
34.000000 274.261111
35.000000 274.816667
36.000000 275.372222
37.000000 275.927778
38.000000 276.483333
39.000000 277.038889
40.000000 277.594444
41.000000 278.150000
42.000000 278.705556
43.000000 279.261111
44.000000 279.816667
45.000000 280.372222
46.000000 280.927778
47.000000 281.483333
48.000000 282.038889
49.000000 282.594444
50.000000 283.150000
51.000000 283.705556
52.000000 284.261111
53.000000 284.816667
54.000000 285.372222
55.000000 285.927778
56.000000 286.483333
57.000000 287.038889
58.000000 287.594444
59.000000 288.150000
60.000000 288.705556
61.000000 289.261111
62.000000 289.816667
63.000000 290.372222
64.000000 290.927778
65.000000 291.483333
66.000000 292.038889
67.000000 292.594444
68.000000 293.150000
69.000000 293.705556
70.000000 294.261111
71.000000 294.816667
72.000000 295.372222
73.000000 295.927778
74.000000 296.483333
75.000000 297.038889
76.000000 297.594444
77.000000 298.150000
78.000000 298.705556
79.000000 299.261111
80.000000 299.816667
81.000000 300.372222
82.000000 300.927778
83.000000 301.483333
84.000000 302.038889
85.000000 302.594444
86.000000 303.150000
87.000000 303.705556
88.000000 304.261111
89.000000 304.816667
90.000000 305.372222
91.000000 305.927778
92.000000 306.483333
93.000000 307.038889
94.000000 307.594444
95.000000 308.150000
96.000000 308.705556
97.000000 309.261111
98.000000 309.816667
99.000000 310.372222
100.000000 310.927778
101.000000 311.483333
102.000000 312.038889
103.000000 312.594444
104.000000 313.150000
105.000000 313.705556
106.000000 314.261111
107.000000 314.816667
108.000000 315.372222
109.000000 315.927778
110.000000 316.483333
111.000000 317.038889
112.000000 317.594444
113.000000 318.150000
114.000000 318.705556
115.000000 319.261111
116.000000 319.816667
117.000000 320.372222
118.000000 320.927778
119.000000 321.483333
120.000000 322.038889
121.000000 322.594444
122.000000 323.150000
123.000000 323.705556
124.000000 324.261111
125.000000 324.816667
126.000000 325.372222
127.000000 325.927778
128.000000 326.483333
129.000000 327.038889
130.000000 327.594444
131.000000 328.150000
132.000000 328.705556
133.000000 329.261111
134.000000 329.816667
135.000000 330.372222
136.000000 330.927778
137.000000 331.483333
138.000000 332.038889
139.000000 332.594444
140.000000 333.150000
141.000000 333.705556
142.000000 334.261111
143.000000 334.816667
144.000000 335.372222
145.000000 335.927778
146.000000 336.483333
147.000000 337.038889
148.000000 337.594444
149.000000 338.150000
150.000000 338.705556
151.000000 339.261111
152.000000 339.816667
153.000000 340.372222
154.000000 340.927778
155.000000 341.483333
156.000000 342.038889
157.000000 342.594444
158.000000 343.150000
159.000000 343.705556
160.000000 344.261111
161.000000 344.816667
162.000000 345.372222
163.000000 345.927778
164.000000 346.483333
165.000000 347.038889
166.000000 347.594444
167.000000 348.150000
168.000000 348.705556
169.000000 349.261111
170.000000 349.816667
171.000000 350.372222
172.000000 350.927778
173.000000 351.483333
174.000000 352.038889
175.000000 352.594444
176.000000 353.150000
177.000000 353.705556
178.000000 354.261111
179.000000 354.816667
180.000000 355.372222
181.000000 355.927778
182.000000 356.483333
183.000000 357.038889
184.000000 357.594444
185.000000 358.150000
186.000000 358.705556
187.000000 359.261111
188.000000 359.816667
189.000000 360.372222
190.000000 360.927778
191.000000 361.483333
192.000000 362.038889
193.000000 362.594444
194.000000 363.150000
195.000000 363.705556
196.000000 364.261111
197.000000 364.816667
198.000000 365.372222
199.000000 365.927778
200.000000 366.483888

b) C_to_R:-

fprintf('TC TR ')
for TC=0:1:25
TR = C_to_R(TC)
fprintf('%f %f ',TC,TR)
end

function TR = C_to_R(TC)
TF=((9/5).*TC)+32
TR=TF+459.67
end

Output:-

TC TR
0.000000 491.670000
1.000000 493.470000
2.000000 495.270000
3.000000 497.070000
4.000000 498.870000
5.000000 500.670000
6.000000 502.470000
7.000000 504.270000
8.000000 506.070000
9.000000 507.870000
10.000000 509.670000
11.000000 511.470000
12.000000 513.270000
13.000000 515.070000
14.000000 516.870000
15.000000 518.670000
16.000000 520.470000
17.000000 522.270000
18.000000 524.070000
19.000000 525.870000
20.000000 527.670000
21.000000 529.470000
22.000000 531.270000
23.000000 533.070000
24.000000 534.870000
25.000000 536.670000

c) C_to_F:-

fprintf('TC TF ')
for TC=0:1:100
TF = C_to_F(TC)
fprintf('%f %f ',TC,TF)
end

function TF = C_to_F(TC)
TF=(9/5).*TC+32
end

Output:-

TC TF
0.000000 32.000000
1.000000 33.800000
2.000000 35.600000
3.000000 37.400000
4.000000 39.200000
5.000000 41.000000
6.000000 42.800000
7.000000 44.600000
8.000000 46.400000
9.000000 48.200000
10.000000 50.000000
11.000000 51.800000
12.000000 53.600000
13.000000 55.400000
14.000000 57.200000
15.000000 59.000000
16.000000 60.800000
17.000000 62.600000
18.000000 64.400000
19.000000 66.200000
20.000000 68.000000
21.000000 69.800000
22.000000 71.600000
23.000000 73.400000
24.000000 75.200000
25.000000 77.000000
26.000000 78.800000
27.000000 80.600000
28.000000 82.400000
29.000000 84.200000
30.000000 86.000000
31.000000 87.800000
32.000000 89.600000
33.000000 91.400000
34.000000 93.200000
35.000000 95.000000
36.000000 96.800000
37.000000 98.600000
38.000000 100.400000
39.000000 102.200000
40.000000 104.000000
41.000000 105.800000
42.000000 107.600000
43.000000 109.400000
44.000000 111.200000
45.000000 113.000000
46.000000 114.800000
47.000000 116.600000
48.000000 118.400000
49.000000 120.200000
50.000000 122.000000
51.000000 123.800000
52.000000 125.600000
53.000000 127.400000
54.000000 129.200000
55.000000 131.000000
56.000000 132.800000
57.000000 134.600000
58.000000 136.400000
59.000000 138.200000
60.000000 140.000000
61.000000 141.800000
62.000000 143.600000
63.000000 145.400000
64.000000 147.200000
65.000000 149.000000
66.000000 150.800000
67.000000 152.600000
68.000000 154.400000
69.000000 156.200000
70.000000 158.000000
71.000000 159.800000
72.000000 161.600000
73.000000 163.400000
74.000000 165.200000
75.000000 167.000000
76.000000 168.800000
77.000000 170.600000
78.000000 172.400000
79.000000 174.200000
80.000000 176.000000
81.000000 177.800000
82.000000 179.600000
83.000000 181.400000
84.000000 183.200000
85.000000 185.000000
86.000000 186.800000
87.000000 188.600000
88.000000 190.400000
89.000000 192.200000
90.000000 194.000000
91.000000 195.800000
92.000000 197.600000
93.000000 199.400000
94.000000 201.200000
95.000000 203.000000
96.000000 204.800000
97.000000 206.600000
98.000000 208.400000
99.000000 210.200000