test01_fall07_1 - D if (d >= 0) v = -1 else x1=(-B...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% 3/1/11 % clear home h function v = line2ellipse(param) m = param(1); c = param(2); a = param(3); b = param(4); b %after solving A = (a^2+b^2); B = (2*m*b^2); C = (b^4-(a^2)*(b^2)); D = B^2-(4*A*C);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: D if (d >= 0) v = -1 else x1=(-B +sqrt(D))/(2*A); x2=(-B -sqrt(D))/(2*A); y1 = m*x1 +c; y2 = m*x2 +c; end e %create a vector v = [x1 y1 x2 y2]; disp(v); d end...
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.

Ask a homework question - tutors are online