From: M on
Hello There,

I've written a simple class in a classdefinition file. There are only two methods by now. The constructor and a function that should test if a condition is fullfilled for an instance of this class. The result is also saved in a property of that class. I want to call the helper method from the constructor but I get and error, that the method can't be found.

My Code looks like this - well actually it is not my code but it reproduces the error message:

classdef Untitled


properties (SetAccess = private)
Matrix;
Condition;
end

methods
function obj = Untitled(Matrix)
obj.Matrix = [];
obj.Condition = false;
if nargin > 0
obj.Matrix=Matrix;
obj.Condition = test(obj.Matrix);
end
end

function passed = test(Matrix)
if any(size(Matrix)<2)
passed = false;
else
passed = true;
end
end
end
end