This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: D = B^2(4*A*C); >> If this value < 0, there are no solutions, your line doesn't intersect the ellipse. if d < 0 v=’no solution’ >> Else, D = ___, there's exactly one tangent touching point, or if D > 0 there are two intersections. else x1=(Bsqrt(D))/(2+A); x2 = (B +sqrt(D))/(2+A); y1 = m*x1 +c; y2 = m*x2 +c; >>create a vector v = [x1 y1 x2 y2]; end disp(v); pg 94 in book grade = input (‘What grade? ‘) if grade >= 90 letter = ‘A’; elseif grade >= 80 letter = ‘B’; elseif grade >= 70 letter = ‘C’; elseif grade >= 60 letter = ‘D’; else letter = ‘F’; end disp (letter) Let’s make it more complex! 2/3/11 grade = input (‘What grade? ‘) if (grade >= 90) && (grade <=95) letter = ‘A’; elseif grade >= 80 letter = ‘B’; elseif grade >= 70 letter = ‘C’; elseif grade >= 60 letter = ‘D’; else letter = ‘F’; end disp (letter)...
View
Full Document
 Spring '11
 AmosJohnson
 Slope, Road, ‘Enter value

Click to edit the document details