f=@(x,y) x.*sin(y.^2);
 x=linspace(-1,2,201);y=linspace(0,3,200);
[X Y] = meshgrid(x,y);
 Z=f(X,Y);
 figure(1)
 title('funktion definierad, gransvarde exist i alla punkter'), pause, clf
 figure(1)
 mesh(X,Y,Z), title('x.*sin(y.^2)'), pause
contour(X,Y,Z), title('x.*sin(y.^2)'), pause

contour3(X,Y,Z), title('x.*sin(y.^2)'), pause
 meshc(X,Y,Z), title('x.*sin(y.^2)'), pause


mesh(X,Y,Z), title('x.*sin(y.^2)'), hold, contour(X,Y,Z), hold, pause
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clf
figure(1)
 title('funktion ej definierad i (0,0), gransvarde exist i alla punkter'), pause, clf
 figure(1)
[X,Y]=meshgrid(-2:0.02:2);Z=X.*Y.^2./(X.^4+Y.^2);
 mesh(X,Y,Z), title('Z=X.*Y.^2./(X.^4+Y.^2) '), pause
contour(X,Y,Z), title('Z=X.*Y.^2./(X.^4+Y.^2) '), pause

contour3(X,Y,Z), title('Z=X.*Y.^2./(X.^4+Y.^2) '), pause
 meshc(X,Y,Z), title('Z=X.*Y.^2./(X.^4+Y.^2) '), pause


mesh(X,Y,Z), title('Z=X.*Y.^2./(X.^4+Y.^2) '), hold, contour(X,Y,Z), hold, pause

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clf
figure(1)
 title('funktion ej definierad i (0,0), gransvarde exist ej i alla punkter'), pause, clf
 figure(1)

[X,Y]=meshgrid(-2:0.02:2);Z=X.^2.*Y./(X.^4+Y.^2);
 mesh(X,Y,Z), title(' Z=X.^2.*Y./(X.^4+Y.^2)'), pause
contour(X,Y,Z), title(' Z=X.^2.*Y./(X.^4+Y.^2)'), pause

contour3(X,Y,Z), title(' Z=X.^2.*Y./(X.^4+Y.^2)'), pause
 meshc(X,Y,Z), title(' Z=X.^2.*Y./(X.^4+Y.^2)'), pause


mesh(X,Y,Z), title(' Z=X.^2.*Y./(X.^4+Y.^2)'), hold, contour(X,Y,Z), hold, pause

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clf
figure(1)
 title('funktion ej definierad i (0,0), gransvarde exist ej i alla punkter'), pause, clf
 figure(1)

y=linspace(-1,1,200);
x=linspace(-1,-.21,201);
[X,Y]=meshgrid(x,y);Z=X.*Y.^2./(X+Y.^2);
mesh(X,Y,Z), title(' Z=X.*Y.^2./(X+Y.^2)'), pause
contour(X,Y,Z,[1,5,10,100,500]), title(' Z=X.*Y.^2./(X+Y.^2)'), pause

contour3(X,Y,Z), title(' Z=X.*Y.^2./(X+Y.^2)'), pause
 meshc(X,Y,Z), title(' Z=X.*Y.^2./(X+Y.^2)'), pause


mesh(X,Y,Z), title(' Z=X.*Y.^2./(X+Y.^2)'), hold, contour(X,Y,Z), hold, pause
y=linspace(-1,.1,200);
x=linspace(-1,.1,201);
[X,Y]=meshgrid(x,y);Z=X.*Y.^2./(X+Y.^2);
contour(X,Y,Z,[[-1:.1:1],[5,10,100,500,1000, 2000,-5,-10,-100,-500]]),
title(' Z=X.*Y.^2./(X+Y.^2)'), pause

clf,  title('slut')
