Asked by Mahak SINGH CHAUHAN
on 11 Mar 2014

Answer by Doug Hull
on 11 Mar 2014

Accepted Answer

ezplot('x^2 + y^3 - 10')

Mahak SINGH CHAUHAN
on 11 Mar 2014

Sign in to comment.

Answer by Matt J
on 11 Mar 2014

Edited by Matt J
on 11 Mar 2014

Given a fixed value of x, you can find one corresponding y at which the expression is zero as follows

x=3;

f=@(y) x.^2+y.^3-10;

y_zero = fzero(f, y_guess);

Although, when f() is a polynomial, as in your example, it would be more efficient to use ROOTS instead of FZERO. Also, ROOTS will find you all solutions y for that x, instead of just one.

Similarly for given y, you can find one associated x as follows

y=1;

f=@(x) x.^2+y.^3-10;

x_zero = fzero(f, x_guess);

Mahak SINGH CHAUHAN
on 11 Mar 2014

Thank You very much dear Matt J. Its really helpful.

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 0 Comments

Sign in to comment.