% Unit 2 (MATLAB Course @ UAM)
% (c) Alexander Knebe

%=======
% x2+y2
%=======
clear all
close all
clc

% # of pints
Np = 100;


% generate x,y mesh between [-100,100]x[-100,100]
xm = linspace(-100,100,Np);
ym = linspace(-100,100,Np);
[x,y] = meshgrid(xm,ym);

% the function we are interested in
f = x.^2+y.^2;

% visualize that function
%surf(x,y,f)
%surfl(x,y,f)
%mesh(x,y,f)
surfc(x,y,f)
%contour(x,y,f)
colorbar
