(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

Suppose f(x,y) = sin(3y-x^2+1)+cos(2y^2-2x)

a) produce a labeled contour plot for -2 <= x <= 2, -1<= y<= 1

b) Based on the contour plot you found in a) estimate the coordinates of two saddle

points of the function in the region S defined in a). Mark the points using the Data

Cursor.

2. Relevant equations

3. The attempt at a solution

I will attach my code and output image

Code (Text):x=linspace (-2,2,25); y=linspace (-1,1,25);

[x y]=meshgrid (x,y)

z = sin(3.*y - x.^2 + 1) + cos(2.*y.^2 - 2.*x);

[C h]=contour (x,y,z); % the "handle" matrix [C h] holds the graph for labelling

clabel (C,h); % the clabel function labels the level curves

I don't really know how to tell from the graph. I tried to solve it using second derivative test in matlab, but the solution is very weird, which I can't really use it at this point.

Is it true that the the gap (pointy-gap) between the two lightest green lines are the two saddle points???

Any help is appreciated. Thank you

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Matlab & saddle point

**Physics Forums | Science Articles, Homework Help, Discussion**