如何在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数组,其中包含各个轴的最小值和最大值。您可以查看
有关轴属性的文档以获取更多信息。
更多&回答...