Reputation: 105
i have already spent more than 5 hours trying to solve the problem on myself, but i guess im too stupid to do so. Here is the Code:
classdef valueInt
properties
myValue=0;
PropertyName=0;
end
methods
function v = valueInt(val)
v.myValue=val;
end
function obj = set.PropertyName(obj,value)
obj.PropertyName = value;
end
end
end
I am getting Undefined function 'PropertyName' for input arguments of type 'double'.
when i try in the Command: objeect=PropertyName(2) or vi1=valueInt(7);
Thank you for your help and time. My file is called "valueInt
"
Upvotes: 0
Views: 2416
Reputation: 91059
If you modify a MATLAB class, the modification don't come into effect immediately.
In order to make them effective, you have to reload the class. This is done with
clear classes
which only works if there are no class instances active.
Upvotes: 0