Assignment11_Chapter5_Exercise4

# Assignment11_Chapter - t disp disp Celcius | Rankine disp[temp_C,temp_R d disp d c Ask the user to input the starting temperature(degrees celcius

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

% Ashwin Satish % Assignment 11 - Chapter 5, Exercise 4 % ENES 101 / Section 103 % % a) Ask the user to input the temperature increment in deg. F % clear,clc c incr_F = input('What temperature increments (deg. F) would you like calculated? -- '); temp_F = 0:incr_F:200; disp('______________________') d % Calculate the temperature in deg. K % temp_K = ((5/9) .* (temp_F - 32) + 273); t % Display the table % disp('Fahernheit | Kelvin') disp([temp_F',temp_K']) d disp('******************************') d % b) Ask the user to input the starting and increment temperature in deg C % start_C = input('Please input the Starting Temperature (in degrees C): '); incr_C = input('Please input the Increments you would like to calculate (in degrees C): '); C % Find a formula to figure out the final temperature after 25 lines final_C = (25 * incr_C) + start_C - incr_C; f temp_C = start_C:incr_C:final_C; t % Calculate from degrees Celcius to Rankine % temp_R = ((9/5) .* temp_C + 491.69);

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: t disp('______________________') disp(' Celcius | Rankine') disp([temp_C',temp_R']) d disp('******************************') d % c) Ask the user to input the starting temperature (degrees celcius), increment and number % of lines for the table % start_C = input('Please input the Starting Temperature (in degrees C): '); incr_C = input('Please input the Increments you would like to calculate (in degrees C): '); num_lines = input('Please input the number of line you would like to display: '); n % Find a formula to figure out the final temperature after 25 lines final_C = (num_lines * incr_C) + start_C - incr_C; f temp_C = start_C:incr_C:final_C; t % Convert to degrees Farhenheit % temp_F = (((9/5) .* temp_C) + 32); t disp('______________________') disp(' Celcius | Fahrenheit') disp([temp_C',temp_R']) d disp('******************************') d...
View Full Document

## This note was uploaded on 08/28/2011 for the course ENES 101 taught by Professor Bayles during the Spring '08 term at UMBC.

### Page1 / 2

Assignment11_Chapter - t disp disp Celcius | Rankine disp[temp_C,temp_R d disp d c Ask the user to input the starting temperature(degrees celcius

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

View Full Document
Ask a homework question - tutors are online