This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ); 1/27/11 b = input (Enter value for y-center: ); r = input (Enter value for radius: ); >>after solving A=m^2 +1 B= -2*a+2*(c-b)*m C=a^2 +(c-b)^2 r^2 D = B^2-(4*A*C) >> assume that square root of quadratic is positive x1=(-B +sqrt(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]; disp(v); ASSIGNMENT: Write code that will compute the intercept of a line and ellipse on the xyz-plane Center = (0,0) Ellipse: ((b^2)*(x^2)) + ((a^2)*(y^2)) = ((a^2)*(b^2)) Line: y=mx+c b=minor axis a= major axis Need input for m, c, a, and b Output: (x1, y1) (x2, y2)...
View Full Document
This note was uploaded on 05/01/2011 for the course HCSC 110 taught by Professor Amosjohnson during the Spring '11 term at Morehouse.
- Spring '11