example of linecirc function

조회 수: 15 (최근 30일)
MANOJ KUMAR
MANOJ KUMAR 2020년 9월 18일
답변: Deepak Meena 2020년 9월 21일
can anyone please show me an example of linecirc function

채택된 답변

Deepak Meena
Deepak Meena 2020년 9월 21일
Hi Manoj,
linecirc gives the intersection points of a line and a circle.
Syntax:
[xout,yout] = linecirc(slope,intercpt,centerx,centery,radius);
This function finds the points of intersection given a circle defined by a center and radius in x-y coordinates, and a line defined by slope and y-intercept, or a slope of “inf” and an x-intercept. Two points are returned. When the objects do not intersect, NaNs are returned.
When the line is tangent to the circle, two identical points are returned. All inputs must be scalars.
Example:
[xout, yout] = linecirc(-1,3,0,0,5);
This will give the intersection point of line and circle .

추가 답변 (0개)

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by