I finally found I was missing the "@" operator when assigning function to point to. @chrisw23 thanks for yor answer, I would bet it works, but I wanted to avoid the switch statement.
This worked fine finally:
classdef PSDType < handle
enumeration
DAVENPORT (@PSDType.DavenportPSD)
VON_KARMAN (@PSDType.VonKarmanPSD)
KAIMAL (@PSDType.KaimalPSD)
EUROCODE (@PSDType.EurocodePSD)
ORNSTEIN_UHLENBECK (@PSDType.OU_PSD)
end
properties (Access = private)
psd_func_ptr function_handle
end
methods (Access = public)
function this = PSDType(f_ptr)
this.psd_func_ptr = f_ptr;
end
function PSDeval = evaluate(this, varargin)
...
PSDeval = this.psd_func_ptr(varargin{:});
end % evaluate()
end
end