MATLAB: Construtor does not find external functions

constructorexternal functionMATLABoop

The constructor of a Class does not find a function in an .m file as soon as I move the function .m file to the Class folder, where the Class .m file is. It works as long as the function .m file is in the main folder. What do I have to do so that the constructor finds the fctn in the Class folder?
The error message is: Undefined function 'fctn' for input arguments of type 'double'.
classdef Data
properties
propA;
end
methods
function obj = Data (attrA)
[obj.propA] = fctn(attrA);
end
end
end

Best Answer

You could make a private/ folder in the class folder and put your function in there. You could also place the function in the classdef file as a subfunction.