function obj = ameth(t) if nargin > 0 obj(numel(t)) = ameth;%preallocates the obj
for i=1:numel(t) obj(i).trk = t(i); end end end
This is under methods in my class definition, and is the constructor. trk is the only protected access property. When I call this method (h = ameth), I find that it returns an answer with no properties, but I am expecting to have the property trk. Where have I gone wrong?
Best Answer