ch2note3 - StillMoreonChapter2 SomeProblemExamples...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
     Still More on Chapter 2 Some Problem Examples
Background image of page 1

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

View Full DocumentRight Arrow Icon
Some Problems Lets use what we know about  Matlab to solve some relatively  simple problems.
Background image of page 2
A Problem About Temperature  Conversions (1) Problem 1: Write a program that converts  Fahrenheit to Celsius. The program  should explain to the user what program  is, what it does, ask the user for a  temperature in Fahrenheit, then print  out the converted temperature.
Background image of page 3

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

View Full DocumentRight Arrow Icon
A Problem About Temperature  Conversions (2) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Prof Newman % EGR 115 - FXX - Section Y % Class Example % % Purpose - Converts a user supplied temp in F and converts it to C % fprintf( 'This program will convert the temperature in F\n' ); fprintf( 'and convert it to the corresponding temperature\n' ); fprintf( 'in C.\n\n' ); temp_f = input( ' Input the temperature in F: ' ); temp_c = (5/9)*(temp_f - 32); fprintf( ' The corresponding temperature is %g C\n' , temp_c) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/13/2010 for the course EGR EGR115 taught by Professor Newman during the Spring '10 term at Embry-Riddle FL/AZ.

Page1 / 8

ch2note3 - StillMoreonChapter2 SomeProblemExamples...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online