function varargout = train(fid, varargin) % If a function name is given, use it to call subfunction.
fid = strcat(fid,'_train');
fh = str2func(fid);
[varargout{1:nargout}] = fh(varargin{:});

function []=train(varargin)  % This was the original myFunc
ME_train(varargin);
SVM_train(varargin);
RF_train(varargin);
RT_train(varargin);

train('ME_train');
train('SVM_train');
train('RF_train');
train('RT_train');
end
end