1 function res = lincomb_sequence3(seq,sigma1,sigma2,sigma3)
2 %
function res = lincomb_sequence3(seq,sigma1,sigma2,sigma3)
4 %
function performing a linear combination of the elements in the
5 % 3d cell array seq with coefficients in sigma1, sigma2, sigma3 result is a
6 % vector/matrix the same size as the entries of seq.
7 % size of seq is length(sigma1) x length(sigma2) x length(sigma3)
8 % if some sigma = 0, the component is not touched, i.e. the component
9 % may also be an empty matrix.
11 % Bernard Haasdonk 15.5.2007
16 res = zeros(size(seq{1,1,1}));
23 res = res + sigma1(q1)*sigma2(q2)*sigma3(q3)* seq{q1,q2,q3};