# HW1 - R-π ) . 8. Set x = 2, y =-4 and z = x y . Then...

This preview shows page 1. Sign up to view the full content.

Homework #1: Intro to Using MATLAB Reading: 1.1-1.5, 2.1, 2.2, 2.8-2.10, 2.13, 2.14 Homework: Some of this is done by hand. The MATLAB portions can be done using MATLAB as a scratch pad. Print a copy of the command window with your calculations in it and include the code of any m-ﬁles that you write. Turn these in IN THE ORDER THEY ARE AS- SIGNED. Each problem needs to be labeled so the TA can ﬁnd your work. Do the following exercises from your textbook 1. 1.4 2. 2.1 (a) and (b) only 3. 2.2 4. 2.7 (a)-(f) only 5. 2.8 Write the MATLAB code which will 6. Set A = 3 and B = - 2. Then calculate the sum, diﬀerence and product of A and B 7. Set V = 3 and R = 45. Then calculate V 2 sin(
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: R-π ) . 8. Set x = 2, y =-4 and z = x y . Then calculate q = ± ( x + y ) z-yz z ( x-y ) ² x + y-z + y cos( x ) + e-z-ln (5 z + 2 x + 3 y x ) 9. Calculate y = 1 2 ( e x + e-x ) for x = 0, 1, 2, 3, 4, 5. 10. Calculate p = s-1 s +1 for s = 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4. Write a MATLAB script (m-ﬁle) that 11. Saves in diﬀerent variable names the sum ( x + y ), diﬀerence ( x-y ), product ( x * y ) and quotient ( x/y ) of two workspace variables x and y . Use variable names that clearly show which operation you calculated. Run the script from the command window for x = 3 and y = 2 and x = 2 and y =-3....
View Full Document

## This note was uploaded on 04/29/2009 for the course ASE 201 taught by Professor Hayes during the Spring '07 term at University of Texas at Austin.

Ask a homework question - tutors are online