matlab - 我如何在 MATLAB 中获得轴的上限(和下限)?

标签 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 数组,其中包含相应轴的最小值和最大值。你可以查看the documentation on axes properties获取更多信息。

关于matlab - 我如何在 MATLAB 中获得轴的上限(和下限)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3965344/

相关文章:

arrays - 在 matlab 中查找二进制数组中位模式的位置

matlab - 如何将变量传递给通过指南创建的函数

java - 从命令行使用处理时出现 UnsupportedClassVersionError

matlab - 不存在的列的 Octave 错误

oop - 在 Matlab 中使用抽象类(无属性)

matlab - 从小范围内生成随机不重复整数

matlab - 找到与数据矩阵中每个实例最接近的权重向量

matlab - Matlab Linprog 可以支持的最大矩阵

MATLAB 向量 : prevent consecutive values from same range

matlab - 如何求伽罗瓦域矩阵的行秩?