Hi everybody. I have an equation like this:
(5+x)^2/15+(x-4)^2/10=100
Can MATLAB solve this equation directly? If it can not do this, how can i achieve this problem?
Thanks

 채택된 답변

Rahul K
Rahul K 2017년 2월 19일

0 개 추천

Can be solved using the symbolic toolbox, https://au.mathworks.com/help/symbolic/solve.html.

댓글 수: 4

Volkan Yangin
Volkan Yangin 2017년 2월 19일
How can i add this toolbox on my MATLAB?
You can use fzero and a a loop to get (and plot) both roots:
f = @(x) (5+x).^2/15+(x-4).^2/10 - 100;
x0 = [-100 100];
for k1 = 1:length(x0);
rts(k1) = fzero(f, x0(k1))
end
x = linspace(-100, 100);
figure(1)
plot(x, f(x),'-m', rts, f(rts), 'pg')
grid
Volkan Yangin
Volkan Yangin 2017년 2월 19일
Star Strider you are my HERO. Thanks a lot.
Star Strider
Star Strider 2017년 2월 19일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

질문:

2017년 2월 19일

댓글:

2017년 2월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by