[英]How to determine if axes are 2D or 3D in Matlab?
如前所述,以编程方式确定Matlab轴对象是2D还是3D绘图的最简单方法是什么?
Examine the output of [az,el] = view
. 检查[az,el] = view
的输出。 If it's 2D, then el == 90
. 如果是2D,则el == 90
。
use: numel(axis)/2 使用:numel(轴)/ 2
it will return 2 for 2d and 3 for 3d. 它将在2d中返回2,在3d中返回3。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.