This preview shows page 1. Sign up to view the full content.
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 ys old value, y has zs old value, and z has xs 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
This note was uploaded on 01/11/2010 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.
 Fall '09
 blase

Click to edit the document details