<分区>
我正在尝试更多地了解 Matlab 类及其属性。这是我创建的测试类:
classdef Test
properties
% Properties of the network type
some_var
end
methods
function N = Test()
end
function change_var( N, val )
N.some_var=val;
end
end
end
现在,我创建此类的一个实例,并调用“change_var()”...
>> a=Test;
>> a.change_var(2);
>> a.some_var
ans =
[]
为什么属性“some_var”在赋值中没有取值“val”?