HW Lecture 13

HW Lecture 13 - fclose(fout Output File Conversions from...

This preview shows pages 1–2. Sign up to view the full content.

Steven Lovaglio EGR 1705-006 30 March 2008 Homework #5 M-Script %Steven Lovaglio %EGR 1705 Section 006 %Homework #5 %MatLab pg. 181 #4a fout=fopen( 'Homework5.out' , 'w' ); %input start increment START = input( 'Starting Temperature, in C:' ); % input increments INC = input( 'Increments, in degrees C: ' ); %Generate output table fprintf(fout, 'Conversions from Celsius to Rankine \n' ) fprintf(fout, 'Celsius Rankine \n' ) %Initialize 'running variables' R=0; for Tc = START : INC : (START+24*INC); R = (((Tc)+273.15)*(9/5)); fprintf(fout, '%5.2f C %5.2f R\n' ,Tc, R); end disp( 'Program Complete!'

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ); fclose(fout); Output File Conversions from Celsius to Rankine Celsius Rankine 1.00 C 493.47 R 2.00 C 495.27 R 3.00 C 497.07 R 4.00 C 498.87 R 5.00 C 500.67 R 6.00 C 502.47 R 7.00 C 504.27 R 8.00 C 506.07 R 9.00 C 507.87 R 10.00 C 509.67 R 11.00 C 511.47 R 12.00 C 513.27 R 13.00 C 515.07 R 14.00 C 516.87 R 15.00 C 518.67 R 16.00 C 520.47 R 17.00 C 522.27 R 18.00 C 524.07 R 19.00 C 525.87 R 20.00 C 527.67 R 21.00 C 529.47 R 22.00 C 531.27 R 23.00 C 533.07 R 24.00 C 534.87 R 25.00 C 536.67 R...
View Full Document

This document was uploaded on 04/06/2008.

Page1 / 2

HW Lecture 13 - fclose(fout Output File Conversions from...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online