MatLab plot part of surface
- by Kristian
Say I have the following script:
u = -5:.2:5;
[X,Y] = meshgrid(u, u);
Z = cos(X).*cos(Y).*exp(-sqrt(X.^2 + Y.^2)/4);
surf(X,Y,Z);
Is there anyway that I can make MatLab plot only parts of the surface? Say, for instance, I just want to plot a single point, or a single grid, what can I do? I thought perhaps to plot a single point I could use:
surf(X(1,1), Y(1,1), Z(1,1))
But then I get the error message:
??? Error using ==> surf at 78
Data dimensions must agree.
I would really appreciate some input/help here. Thanks in advance :)