After adding following like in http://www.mathworks.com/help/matlab/matlab_oop/creating-object-arrays.html:
if nargin ~= 0 % Allow nargin == 0 syntax
end
then it works. Why? It does not change anything. Strange.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!