rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
set_mu_general.m
1 function model = set_mu_general(model,mu)
2 %function model = set_mu(model,mu,send_to_dune)
3 %
4 % function setting the parameter vector mu in the model struct
5 % required fields of model:
6 % mu_names : cell array of strings, indicating the fields, which are set
7 % by the current routine
8 
9 % Bernard Haasdonk 20.7.2006
10 % Markus Dihlmann 04.03.2010
11 
12 
13 
14  if nargout == 0
15  warning('set_mu called without return argument!');
16  end
17 
18  if length(mu(:))~=length(model.mu_names)
19  error('dimensionality of mu does not fit to model.mu_names');
20  end;
21 
22  for i=1:length(mu(:))
23  model = setfield(model, model.mu_names{i},mu(i));
24  end;
25 
26 
27 
28