making temp conversion table

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

nevermind got the last one, I screwed up here is my revised second
%R=C*1.8000+491.67
cs=input ('Please enter starting vaule')
ci=input ('Please enter increment')
c=(cs:ci:25)
r=cs*1.8+491.67
disp ('C R')
disp ([c' r'])
ok i got everything working now

Sign in to comment.

Answers (0)

Products

Asked:

keb
on 5 Dec 2014

Commented:

keb
on 5 Dec 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!