Plotting a surface with defined unit sizes (meter, mm, inch)
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2015-9-20
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 个评论
Walter Roberson
2015-9-21
Make sure you set the axes DataAspect property to control the relative scaling of the Z.
更多回答(1 个)
Star Strider
2015-9-20
编辑:Star Strider
2015-9-20
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 个评论
另请参阅
类别
在 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!