rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
insert_affine_decompositions.m
Go to the documentation of this file.
1 function model = insert_affine_decompositions(model)
2 %function model = insert_affine_decompositions(model)
3 % the field '<name>' is created as a parameter separable function, if both
4 % '<name>_components' and '<name>_coefficients' are present fields of model
5 
6 names = fieldnames(model);
7 
8 for i = 1:length(names)
9 
10  index = regexp(names{i}, '_components');
11 
12  if ~isempty(index) && isfield(model, [names{i}(1:index-1), '_coefficients'])
13 
14  model.(names{i}(1:index-1)) = @(varargin) eval_affine_decomp_general(...
15  model.(names{i}), ...
16  model.([names{i}(1:index-1), '_coefficients']), ...
17  varargin{:});
18  end
19 end
20 
21 end
function model = insert_affine_decompositions(model)
the field is created as a parameter separable function, if both _components and _c...