1 function model = change_mu(model, mu_mod)
2 %
function model = change_mu(model, mu_mod)
4 %
function changing the parameter vector mu in the model
struct
7 % mu_mod = modification of the mu_vector
8 % mu_mod = [10, 0, -4, ...] means, mu_1 is incremented by 10, mu_2
9 % is stays unchanged, mu_3 is decremented by 4, ...
11 % required fields of model:
12 % mu_names : cell array of strings, indicating the fields, which are set
13 % by the current routine
15 % Oliver Zeeb, 14.02.11
17 if length(mu_mod(:))~=length(model.mu_names)
18 error('dimensionality of mu does not fit to model.mu_names');
21 for i=1:length(mu_mod(:))
22 model.(model.mu_names{i}) = model.(model.mu_names{i}) + mu_mod(i);
23 %
if (model.(model.mu_names{i}) < model.mu_ranges{i}(1) ...
24 % || model.(model.mu_names{i}) > model.mu_ranges{i}(2))
25 % warning(
'parameter out of range');