What is the difference between those two functions?
95 次查看(过去 30 天)
显示 更早的评论
I have been using the function mesh and surf on two different occasions, but i still don't understand, what exactly is the difference between those two.
0 个评论
采纳的回答
Walter Roberson
2017-1-29
surf() and mesh() both create Chart Surface Objects in current releases. surf() turns on face coloring by default and uses black edges by default, whereas mesh() turns face coloring off by default and uses colored edges by default.
When you draw a large surface the edges usually get in the way of seeing anything (they are constant width but the individual tetrahedrons get smaller with larger surfaces), so I typically turn edges off.
Sometimes what you want is to see the outside of a solid surface; surf() gives you that. But the face colors hide the interior details (hidden line removal) and sometimes you need that internal detail so it is nice to have mesh() sometimes.
Just different defaults on the same graphics object. Not all that different in a way from (for example) plot() vs semilogx(), which differ only in whether the axes XScale is set to 'log' or 'normal', different defaults for the same graphics object.
0 个评论
更多回答(1 个)
Gilles Desvilles
2022-1-20
Not clear enough
when one is on the other is out and vice versa, nice rhetoric but doesn't work, except in cricket !
too much litteral not enough examples, please provide quickly replicable examples in your answer
when I use surf(x,y,z,'edgecolor', 'none') and mesh(x,y,z) I get the same result, so I don't see how the face coloring is different between the two functions as you claim it
Besides, I don't understant what you mean by the "outside" of a solid surface, neither the "interior" details: the logics linking the outside and the interior escapes me, again please provide examples that we can graph to understand what you mean
Maps are so important in many fields that you must clarify !
0 个评论
另请参阅
类别
在 Help Center 和 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!