查看单个帖子
旧 2019-12-10, 20:48   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
帖子 如何在MATLAB中获取轴的上限(和下限)?

如何在MATLAB图形中找到轴的最小值和最大值?



回答:

这是针对当前轴(即gca )的方法:

xLimits = get(gca,'XLim'); %# Get the range of the x axis yLimits = get(gca,'YLim'); %# Get the range of the y axis zLimits = get(gca,'ZLim'); %# Get the range of the z axis 上面的每个变量都是一个1×2数组,其中包含各个轴的最小值和最大值。您可以查看有关轴属性的文档以获取更多信息。



更多&回答...
poster 当前离线   回复时引用此帖