The the pointy gaps between the two lightest green lines are the two saddle points. Roughly located at (0.5576,1.0000) and (1.0198,0.2598). It's a bit easier to tell if you plot your data as a surface plot:
[x y]=meshgrid (linspace (2,2,25),linspace (1,1,25));
z = sin(3.*y  x.^2 + 1) + cos(2.*y.^2  2.*x);
figure;
surf(x,y,z);
xlabel('x'); ylabel('y');
cameratoolbar('NoReset');
cameratoolbar('SetMode', 'orbit');
Cheers,
Aaron
"John Wong" <gokoproject@gmail.com> wrote in message <i0u2a0$gi9$1@fred.mathworks.com>...
> Suppose f(x,y) = sin(3yx^2+1)+cos(2y^22x)
> 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.
>
>
> My code is as follows:
> [code]
> 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
> [/code]
>
> output image: http://i47.tinypic.com/2dalvyu.jpg
>
> 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 (pointygap) between the two lightest green lines are the two saddle points???
>
> Any help is appreciated. Thank you
