Here is some simple code for plotting 3d surface, say we want to plot the graph of $z=x(1-y)$, we can using the following command in //matlab// {{{ [x,y]=meshgrid(0:.01:1, 0:.01:1); z=x.*(1-y); surf(x,y,z) }}} For more details, see [[http://www.mathworks.com/help/matlab/ref/meshgrid.html|Matlab-meshgrid]]