Hello! I'd like to know how to find the intersection between 2 equations, symbolically or with solve(). for example, the intersections between a line and a circle: y=-3x+1 , x^2+y^2=16 Thank you!

 채택된 답변

Ameer Hamza
Ameer Hamza 2018년 5월 27일

0 개 추천

For symbolic answer
syms x
y = -3*x + 1;
eq = x^2+y^2==16;
sol = vpasolve(eq)
sol =
3/10 - 159^(1/2)/10
159^(1/2)/10 + 3/10
convert it to double
double(sol)
ans =
-0.9610
1.5610

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

질문:

2018년 5월 27일

답변:

2018년 5월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by