Sparse mesh on a surface plot with dense sampling
显示 更早的评论
Hi everyone!
At the surface plot example of Matlab, we have the following commands:
[X,Y,Z] = peaks(25);
CO(:,:,1) = zeros(25); % red
CO(:,:,2) = ones(25).*linspace(0.5,0.6,25); % green
CO(:,:,3) = ones(25).*linspace(0,1,25); % blue
surf(X,Y,Z,CO)
which produce the following figure:

If we increase the number of samples from 25 to 100, the mesh grid of the surface becomes denser:

Is there an easy way to have the smoothness of the secone one, with the grid of the first one? For example to show every N-th line (here, for example, 100/25 = 4, so every 4th line)?
Plotting the sparse mesh grid over a mesh-free surface won't help me, I want to be able to do this through the properties of the generated figure, as I want to be able to do this for figures produced by apps like the Curve Fitting app etc.
Thank you for your time!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
