MATLAB Answers

Solving an equation on MATLAB

1 view (last 30 days)
Hi everybody. I have an equation like this:
Can MATLAB solve this equation directly? If it can not do this, how can i achieve this problem?


Sign in to comment.

Accepted Answer

Rahul Kalampattel
Rahul Kalampattel on 19 Feb 2017
Can be solved using the symbolic toolbox,


Show 1 older comment
Star Strider
Star Strider on 19 Feb 2017
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))
x = linspace(-100, 100);
plot(x, f(x),'-m', rts, f(rts), 'pg')
Volkan Yangin
Volkan Yangin on 19 Feb 2017
Star Strider you are my HERO. Thanks a lot.
Star Strider
Star Strider on 19 Feb 2017
As always, my pleasure!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by