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

keb
keb 2014년 12월 5일
편집: Star Strider 2014년 12월 5일
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'])
keb
keb 2014년 12월 5일
ok i got everything working now

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

keb
2014년 12월 5일

댓글:

keb
2014년 12월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by