Unformatted text preview: *Run the following three commands: 1) x = 456; 2) y = 187; 3) z = 12; Now, switch the values so that x has y’s old value, y has z’s old value, and z has x’s old value. *Predict the outcome of the following Matlab calculations, and then test your predictions in Matlab: 5^2*3 5^(2*3) (1+3+5)/(5+3+1) *Use Matlab to calculate the square root of 2+3^4. Recall that a square root is a 1/2 power. *Create a variable r, set equal to 10. Calculate the area and circumference of a circle with radius r. There's a builtin variable "pi" that you might want to use. *For all of the following problems, set x = 15, y = 22, and z = 35. First, predict the results by hand. Then, test your predictions on Matlab: a) x>22 & y>22 b) x>22  y>22 c) ~0 d) ~z e) x + y > 37 f) x + ( y > 37 ) g) x y  0 h) y>x & z>y & z>34 i) x>3 & x<5 j) 3<x<5 k) 14>=x l) 14<=x m) zyx>0...
View
Full
Document
 Fall '09
 blase
 *Use Matlab, following Matlab calculations

Click to edit the document details