Hallo.
I am currently having troubles with defining a grid on the surface of my 3D plot (created by using mesh-function to plot with).
Would like to have something in between what's seen on the pictures below.
Wish to create following grid:
- Horizontal lines (parallel with x-axis) for z = (0:1:10)
- Vertical lines (parallel with z-axis) for x = (-10:2:10).
My code:
[X,Y] = meshgrid(-8:.1:8); R = sqrt(X.^2 + Y.^2) + eps;Z = sin(R)./R;surf(X,Z,Y,Z)set(gca,'YDir','Reverse','ZDir','Reverse')colorbar; ylabel('y'); xlabel('x'); zlabel('z') ;shading interp % To create right picture
What is the Matlab command for creating a surface grid as i wish?
Best Answer