Plotting a surface with defined unit sizes (meter, mm, inch)
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zoro
el 20 de Sept. de 2015
Comentada: Walter Roberson
el 21 de Sept. de 2015
Hi, I want to make sure how can I have a 3D surface in meter or 'mm' units. For example, for a sinusoidal surface with 'x' and 'y' in 'mm' units, how can I define the amplitude of the surface (which is in 'z' axis) in 'mm'? I know how to define the size on 'x' and 'y' with meshgrid but what about the size on 'z' axis (which is a constant amplitude). Units are very important in this case. I appreciate your comments.
0 comentarios
Respuesta aceptada
Walter Roberson
el 20 de Sept. de 2015
Is it the case that the plot must be labeled with particular units, or is it the case that the plot must render on the screen a particular physical size because you need people to be able to literally put a ruler to the screen to measure distances? And is the question how to make the Z axis measurable by placing a ruler on the screen?
If the question is how to make Z measurable on the screen, then you need to choose your viewing angle and projection matrix very carefully, and the user has to do some interpretation to figure out which of the infinite number of x, y, z coordinates that project to the same screen x y point is being referred to.
But if the point is to make that kind of measurement, then why not just let the user click on the points and have the computer tell the result?
1 comentario
Walter Roberson
el 21 de Sept. de 2015
Make sure you set the axes DataAspect property to control the relative scaling of the Z.
Más respuestas (1)
Star Strider
el 20 de Sept. de 2015
Editada: Star Strider
el 20 de Sept. de 2015
The units of the z-axis are whatever you calculate them to be. You can define the tick label values using the set function and specifying 'ZTick' quantities and 'ZTickLabel' strings or numeric values. See Chart Surface Properties and Axes Properties for details.
0 comentarios
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!