Why does the Variable Editor display my object incorrectly when I overload the SIZE method in MATLAB 7.9 (R2009b)?
Show older comments
I created the following class definition with an overloaded SIZE method:
classdef testclass
properties
values = ones(1,3);
stored;
end
methods
function s = size(hobj)
s = builtin('size',hobj.values);
end
end
end
When I instantiate an object of the class and examine the object in the Variable Editor:
t = testclass;
openvar(t)
I see the following:
val =
<a href="matlab:help testclass">testclass</a>
Properties:
values: [1 1 1]
stored: []
<a href="matlab:methods('bfmsparse')">Methods</a>
This does not occur if I do not overload the SIZE method.
Accepted Answer
More Answers (0)
Categories
Find more on Construct and Work with Object Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!