필터 지우기
필터 지우기

parametrization of an ellipse

조회 수: 2 (최근 30일)
abdulsamed kaymakci
abdulsamed kaymakci 2022년 12월 6일
답변: Matt J 2022년 12월 6일
I wrote this code to get elliptical eqn in the form of (x^2)/(a^2)+(y^2)/(b^2) = 1 from user and i want find a and b . exp:((x^2)/16+(y^2)/25=1)
ellipse_eqn = input('Enter for elliptical path: ','s') ;
ellipse = str2sym(ellipse_eqn)

채택된 답변

Matt J
Matt J 2022년 12월 6일
syms x y real
ellipse=(x^2)/16+(y^2)/25==1;
a=abs(solve([ellipse,y==0]).x(1))
a = 
4
b=abs(solve([ellipse,x==0]).y(1))
b = 
5

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by