What is the difference between those two functions?
93 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Denny Muttathil
am 29 Jan. 2017
Beantwortet: Gilles Desvilles
am 20 Jan. 2022
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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 29 Jan. 2017
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 Kommentare
Weitere Antworten (1)
Gilles Desvilles
am 20 Jan. 2022
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 Kommentare
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!