# 2-3-11 - D = B^2(4*A*C>> If this value< 0 there are...

This preview shows pages 1–3. Sign up to view the full content.

2/3/11 MATLAB HOMEWORK: clear home or clc >>We need to set values or get a, b, r, m, and c (user inputs) m = input (‘Enter value for slope: ‘); c = input (‘Enter value for y-intercept: ‘); a = input (‘Enter value for horizontal semi- axis: ‘); b = input (‘Enter value for vertical semi-axis: ‘); >>after solving A = B = C = 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); CONTINUING from last class: circle-line intersection with if statement clear home or clc >>We need to set values or get a, b, r, m, and c (user inputs) m = input (‘Enter value for slope: ‘); c = input (‘Enter value for y-intercept: ‘); a = input (‘Enter value for x-center: ‘); b = input (‘Enter value for y-center: ‘); r = input (‘Enter value for radius: ‘); >>after solving

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2/3/11 A=m^2 +1 B= -2*a+2*(c-b)*m; C=a^2 +(c-b)^2 –r^2;
This is the end of the preview. Sign up to access the rest of the document.

View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern