{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Spring 09 WS 11

# Spring 09 WS 11 - ENG EK 127 Worksheet 11 Name The minimum...

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

ENG EK 127 Worksheet 11 Name: __________________________________________________ The minimum set is Problems 1-8. 1. Write a function that will receive as an input argument a temperature in degrees Fahrenheit, and will return the temperature in both degrees Celsius and Kelvin. The conversion factors are: C = (F – 32) * 5/9 and K = C + 273.15. function [c, k] = converttemp(f) c = (f-32) * 5/9 k = f + 273.15 2. A vector can be represented by its rectangular coordinates x and y or by its polar coordinates r and θ. The conversions from polar to rectangular are x = r cos(θ) and y = r sin(θ). Write a function to receive the polar coordinates as input arguments and return the corresponding rectangular coordinates. 3. Write a function that will receive as input arguments a length in inches, and will print in a sentence format the length in both inches and centimeters (1 inch = 2.54 centimeters). Note that this function will not return any value. function [i, cm] = convertinches(inches) i = inches; cm = inches * 2.54; fprintf( 'The length is %.2f inches or %.2f centimeters' , i, cm) >> convertinches(12) The length is 12.00 inches or 30.48 centimeters

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.

{[ snackBarMessage ]}

### Page1 / 3

Spring 09 WS 11 - ENG EK 127 Worksheet 11 Name The minimum...

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

View Full Document
Ask a homework question - tutors are online