rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
eval_affine_decomp.m
1 function R = eval_affine_decomp(R_comp_ptr,R_coeff_ptr,varargin)
2 %function R = eval_affine_decomp(R_comp_ptr,R_coeff_ptr,varargin)
3 %
4 % function returning either the components, coefficients or their
5 % linear combination depending on params.decomp_mode, where
6 % params.decomp_mode is assumed to be the last argument in
7 % varargin. Both function pointers are assumed to have the
8 % identical command line syntax R_comp_ptr(varargin(:));
9 
10 params = varargin{end};
11 if params.decomp_mode == 2
12  R = R_coeff_ptr(varargin{:});
13 else
14  if params.decomp_mode == 1
15  R = R_comp_ptr(varargin{:});
16  else
17  Rcomp = R_comp_ptr(varargin{:});
18  Rcoeff = R_coeff_ptr(varargin{:});
19  R = lincomb_sequence(Rcomp,Rcoeff);
20  end;
21 end;
22 
23 %| \docupdate