-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvecpar.m
More file actions
25 lines (21 loc) · 917 Bytes
/
vecpar.m
File metadata and controls
25 lines (21 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function [ Paralist, varargout ] = vecpar( Model )
%Return list of parameter names from model cell array
% Usage:
% PARALIST = vecpar(MODEL)
% PARALIST is a list that associates the model parameter names to their
% values by their position in the parameter vector PARAS. PARAS is
% needed as input for eval_model(...) and recombfit(...).
% MODEL is a model cell array containing handles to anonymous function
% that fullfill the requirements for a model function. These requirements
% are described in detail creating_advancedmodel.m
%
% [PARALIST, PARAZEROS] = vecpar(MODEL)
% PARAZEROS is a parameter vector containing zeros. Can for instance be
% used as start parameters.
%
% Copyright (c) 2019 Martin Rabe
Paramap = mappar(Model);
% make parameter vector from map
Paralist = Paramap(~cellfun(@isempty,Paramap));
varargout{1} = zeros(size(Paralist));
end