% GETDEFAULTPLIST returns a default plist for the model % % CALL: utils.models.functionForVersion(@getModelDescription, @versionTable)% CALL: utils.models.functionForVersion(@getModelDescription, @versionTable, version, @getFileVersion)% function pl = getDefaultPlist(varargin) getModelDescription = varargin{1}; versionTable = varargin{2}; options = {}; if nargin > 2 if ischar(varargin{3}) options = varargin(3); else options = varargin{3}; end end % default plist for all model versions vt = versionTable(); idx = 1; % we take the first version as default versions = vt(1:2:end); if numel(options)>=1 && ischar(options{1}) idx = find(strcmp(options{1}, versions)); if ~utils.helper.ismember(options{1}, versions) error('requested version does not exist'); end end version = versions{idx}; pl = plist({'VERSION', 'Model version'}, {idx, vt(1:2:end), paramValue.SINGLE}); % add plist for this version fcn = utils.models.functionForVersion(getModelDescription, versionTable, version); pl.combine(fcn('plist')); pl.setName(sprintf('Parameter List for version: %s', version));end