% Uppgift 1a)

x = linspace(-1,2,200);
y = (x.^2-4.*x.^3+x.^2-3).*sin(x);
plot(x,y)
pause

% Uppgift 1b)

figure(2)
x = linspace(-1,2,20);
y = linspace(-2,3,30);
[X,Y] =meshgrid(x,y);
Z = (exp(X.^2+Y.^2)-1)./sqrt(X.^2+Y.^4);
mesh(X,Y,Z)

pause

figure(3)
r = linspace(0,sqrt(2),30);
v = linspace(0,2*pi,40);
[R,V]=meshgrid(r,v);
X=R.*cos(V);Y=R.*sin(V);
Z = (exp(X.^2+Y.^2)-1)./sqrt(X.^2+Y.^4);
mesh(X,Y,Z)