clear all [X,Y] = meshgrid(-1:.01:1); C = exp(-(X-Y).^2); mesh(X,Y,C)