Plotting a surface with defined unit sizes (meter, mm, inch)

6 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Walter Roberson
Walter Roberson il 20 Set 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 Commento
Walter Roberson
Walter Roberson il 21 Set 2015
Make sure you set the axes DataAspect property to control the relative scaling of the Z.

Accedi per commentare.

Più risposte (1)

Star Strider
Star Strider il 20 Set 2015
Modificato: Star Strider il 20 Set 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.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by