The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
You are given a circle with radius 5
centered at x = 1, y = 2.
% You want to calculate the intersection of some lines with that
% circle.
% Write a script to find the x and y coordinates of both
% points of intersection. You should test this code at least
% with these lines:
% y = 2 x - 1
% y = -2 x - 10
% y = x + 5.9054
%
% equations
%Â Â circle :Â Â (x-xc)^2 + (y-yc)^2 = r^2
%Â Â Â Â line :Â Â Â y = m*x + c
%
% solve for x and y:
%Â Â Â Â Â (x-xc)^2 + (m*x + c - yc)^2 - r^2 = 0
% quadratic of the form Ax^2 + Bx + C = 0
% where A = 1 + m^2
%Â Â Â Â Â Â Â B = -2xc + 2m(c - yc)
%Â Â Â Â Â Â Â C = xc^2 + (c - yc)^2 - r^2
%Â Â roots are x = (-B +/- sqrt(B^2 - 4AC)) / (2A)
use matlab to write the script
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll