making temp conversion table
9 views (last 30 days)
Show older comments
I am having trouble with my homework, I have to make a conversion table for Celsius to Rankine, but allow the user to enter the starting temp and the increments, and the table has to have 25 lines.
Ce=input ('please enter starting temp in C');
Cel=input ('please enter increments in C');
%R=C*1.8000+491.67
final=Ce+Cel*(25-1);
CRC=[Ce:Cel:final]';
R=Ce*1.8+491.67';
RF=[R;CRC]
for the second one, I have to do Celsius to Fahrenheit, but allow the user to enter the starting temp, the increments, and the number on lines on the table.
%C=5/9(F-32)
c1=input ('please enter starting temp in C')
c2=imput ('please enter increments temp in C')
c3=input ('please enter lines temp in C')
final=c1+c2*(c3-1);
c1=5/9*1
2 Comments
Answers (0)
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!