MATLAB Answers

MATLAB CODE TO FIND LOCAL EXTREMA OF A FUNCTION

24 views (last 30 days)
ASHOK VARDHAN
ASHOK VARDHAN on 13 Aug 2019
Answered: Torsten on 13 Aug 2019
what is the matlab code to identify local extrema of follwing function f(x,y)=x^2+y^3-3*x*y , -5<=y<=5

  0 Comments

Sign in to comment.

Answers (1)

Torsten
Torsten on 13 Aug 2019
syms x y
f = x^2 + y^3 - 3*x*y;
fx = diff(f,x);
fy = diff(f,y);
eqns = [ fx == 0, fy == 0];
vars = [x y];
[solx, soly] = solve(eqns, vars)

  0 Comments

Sign in to comment.

Sign in to answer this question.