OOP subsref runs twice with "end"?
Ältere Kommentare anzeigen
I have a simple object:
classdef objTest
methods
function [varargout]=subsref(obj,S)
disp(S)
varargout={[]}; %irrelevant for this test...
end
end
end
Now if I do o = objTest; o.test{1}(1:end), it displays S twice, first showing only the . and {} references, and then again showing all 3. Can anyone explain why this happens? I assume it's somehow related to a builtin function running to figure out how to evaluate the "end"?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Customize Object Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!