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
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!