Hi Will,
the following works:
classdef A <handle
properties
eg_var
end
methods
function multi_egvar(obj,n)
obj.eg_var = obj.eg_var*n;
end function multi_n_3(obj,n)
for ik = 1:3
obj.multi_egvar(n);
end
end
end
endTest the following:
Test = A Test.eg_var = 3 Test.multi_n_3(2) Test
Calling another method within one class is no problem. But you should think about tracking changes within your properties using set and get functions in order to not produce unwanted changes (as in that particular example property "eg_var" changes silently from 3 to 24). As a matter of fact calling the function 3 times in a loop is not efficient and should be solved differently.
Kind regards,
Robert
