poster
2019-12-10, 20:48
如何在MATLAB图形中找到轴的最小值和最大值?
回答:
这是针对当前轴(即gca (http://www.mathworks.com/help/techdoc/ref/gca.html) )的方法:
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数组,其中包含各个轴的最小值和最大值。您可以查看有关轴属性的文档以 (http://www.mathworks.com/help/techdoc/ref/axes_props.html#XLim)获取更多信息。
更多&回答... (https://stackoverflow.com/questions/3965344)
回答:
这是针对当前轴(即gca (http://www.mathworks.com/help/techdoc/ref/gca.html) )的方法:
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数组,其中包含各个轴的最小值和最大值。您可以查看有关轴属性的文档以 (http://www.mathworks.com/help/techdoc/ref/axes_props.html#XLim)获取更多信息。
更多&回答... (https://stackoverflow.com/questions/3965344)