% cool_plot.m % An example of a script file % Plots a wireframe mesh of a function of two variables % % BJ Furman % 06NOV2009 % Build the grid of x and y values [x,y]=meshgrid(-4:0.2:4); % Calculate the z points for each x,y point pair on the grid z=exp(-0.5*(x.^2+0.5*(x-y).^2)); % Create the wireframe (mesh) plot mesh(x,y,z)