Spring 09 WS 11

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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/19/2010 for the course EK 211 taught by Professor Attaway during the Spring '10 term at BU.

Page1 / 3

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

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

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