【发布时间】:2014-03-30 05:21:38
【问题描述】:
考虑 MATLAB 帮助中的 this example。
这个例子,除了有语法问题外,对我来说并不合适。不知道是不是版本问题,我用的是R2013a。
classdef MyClass
properties (Constant = true)
X = pi/180;
end
properties
PropA = sin(X*MyClass.getAngle([1 0],[0 1]);
end
methods (Static = true)
function r = getAngle(vx,vy)
end
end
end
上面写着
未定义的函数或变量“X”。 MyClass 中的错误(第 1 行) classdef 我的类
我可以通过添加MyClass.X来修复它,但我不知道这是不是目的。
【问题讨论】:
-
你应该 report 这是一个文档错误。
标签: matlab matlab-class