This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1. Basics Variables and Expressions Assignment Statements BuiltIn Functions Scripts Comments Keyboard Input Formatting Output Approach Preview key concepts by first playing with Matlab as a calculator. From formula to program. Three Formulas 2 ) cos( 1 ) 2 / cos( x x + = Surface Area of a Sphere HalfAngle Quadratic Equation a ac b b r 2 4 2 + ± − = 2 4 r A π = Surface Area Increase >> r = 6365; >> delta = .000001; >> A_plus = 4*pi*(r+delta)^2; >> A = 4*pi*r^2; >> Increase = A_plus  A Increase = 0.15996992588043 Cosine(15 degrees) >> c = cos(pi/3); >> c = sqrt((1+c)/2); >> c = sqrt((1+c)/2) c = 0.96592582628907 >> c15 = cos(pi/12) c15 = 0.96592582628907 X 2 + 5x + 6 = (x+2)(x+3) >> a = 1; >> b = 5; >> c = 6; >> d = sqrt(b^2  4*a*c); >> r1 = (b  d)/(2*a) r1 =3 >> r2 = (b + d)/(2*a) r2 =2 Question Time > X = 8; > Y = X; > X = Y; > X = 2*X; > Y = Y/2; What is the final value of X and Y ? A. X is 16 and Y is 16 C . X is 16 and Y is 4 B . X is 8 and Y is 8 D. X is 8 and Y is 4 Let’s Revisit the Key Ideas Above and Introduce Others… A Script % Quad1 % Solves x^2 + 5x + 6 = 0 a = 1; b = 5; c = 6; d = sqrt(b^2 4*a*c); r1 = (b  d)/(2*a) r2 = (b + d)/(2*a) Script A sequence of instructions....
View
Full Document
 Fall '07
 FAN/VANLOAN
 Expression, SEPTA Regional Rail, University City, JenkintownWyncote, X&Y

Click to edit the document details