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

This set of problems requires you to generate temperature conversion tables. Use

ID: 3621804 • Letter: T

Question

This set of problems requires you to generate temperature conversion tables. Use the following equation, which describe the relationships between temparatures in degrees Fahrenheit(Tf), degree Celsius (Tc), degrees Kelvin(Tk) and degrees Rankine (Tr), Respectively:
Tf=Tr-459.67R; Tf=(9/5)*Tc +32F; Tr=(9/5)*Tk
a) Generate a table with the conversion from Fahrenheit to Kelvin for values from 0 degree F to 200 F. Allow the user to enter the increments in degrees F between lines.

b)Generate a table with the conversions from Celsius to Rankine. Allow the user to enter the starting temperature and increment between lines. Print 25 lines in the table.

c) Generate a table with the conversions from Celsius to Fahrenheit. Allow the user to enter the starting temperature ,increment between lines and the number of lines for the table
Please use MAtLab. Thank you so so much.

Explanation / Answer

a)Convert F to K values with increment value taken from user.

%K=F*0.555+255.37
fs=0;
fi=input ('Please enter increment: ');
fprintf('Printing K values line by line ');

line=0;
while( fs<=200)
k=fs*0.555+255.37;
fprintf('%8d %8.3f ',[line, k]);

fs=fs+fi;
line++;
end

OUTPUT:

octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
Please enter increment: 5
Printing K values line by line
0 255.370
1 258.145
2 260.920
3 263.695
4 266.470
5 269.245
6 272.020
7 274.795
8 277.570
9 280.345
10 283.120
11 285.895
12 288.670
13 291.445
14 294.220
15 296.995
16 299.770
17 302.545
18 305.320
19 308.095
20 310.870
21 313.645
22 316.420
23 319.195
24 321.970
25 324.745
29 335.845
30 338.620
26 327.520
27 330.295
28 333.070
31 341.395
32 344.170
33 346.945
34 349.720
35 352.495
36 355.270
37 358.045
38 360.820
39 363.595
40 366.370

b) Convert C to R,print 25 lines of R values after initial temperature given.

%R=C*1.818+496.63
cs=input ('Please enter starting value: ');
ci=input ('Please enter increment: ');
fprintf('Printing R values line by line ');

line=0;
while( line <=25 )
r=cs*1.818+496.63;
fprintf('%8.2d %8.3f ',[line, r]);

cs=cs+ci;
line=line + 1;
end

OUTPUT:

octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
Please enter starting value: 45
Please enter increment: 5
Printing R values line by line
00 578.440
01 587.530
02 596.620
03 605.710
04 614.800
05 623.890
06 632.980
07 642.070
08 651.160
09 660.250
10 669.340
11 678.430
12 687.520
13 696.610
14 705.700
15 714.790
16 723.880
17 732.970
18 742.060
19 751.150
20 760.240
21 769.330
22 778.420
23 787.510
24 796.600
25 805.690

c)Convert C to F values, take starting value,increment and no of lines from the user.

%F=C*1.8+32
cs=input ('Please enter starting value: ');
ci=input ('Please enter increment: ');
cn=input ('Please enter number of lines: ');
fprintf('Printing F values line by line ');

line=0;
while( line <=cn )
r=cs*1.8+32;
fprintf('%8.2d %8.3f ',[line, r]);

cs=cs+ci;
line=line + 1;
end

OUTPUT:

octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
Please enter starting value: 56
Please enter increment: 6
Please enter number of lines: 10
Printing F values line by line
00 132.800
01 143.600
02 154.400
03 165.200
04 176.000
05 186.800
06 197.600
07 208.400
08 219.200
09 230.000
10 240.800

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote