1% This script multiplies temp by B (i.e., temp*B) without
2% storing B (only b, r1, r2, c1 and c2).
3% recall B = L(b) + L(c1)L(Zr1)
' + L(c2)L(Zr2)'
7% we start with temp*L(c1)
9 temp1(1:hd,(lus1-1)*m+1:lus1*m)=temp(1:hd,(lus1-1)*m+1:end)*c1(1:(N-lus1+1)*m,:);
11% we now obtain (temp*L(c1))*L(Zr1)
'
13 temp1b((lus1-1)*m+1:lus1*m,1:m)=r1((N-lus1-1)*m+1:(N-lus1)*m,:)';
15temp2(1:hd,1:m)=zeros(hd,m);
17 temp2(1:hd,(lus1-1)*m+1:lus1*m)=temp1(1:hd,1:(lus1-1)*m)*...
18 temp1b((N-lus1)*m+1:end,:);
22% we
continue with temp*Lc2
24 temp1(1:hd,(lus1-1)*m+1:lus1*m)=temp(1:hd,(lus1-1)*m+1:end)*c2(1:(N-lus1+1)*m,:);
26% next we store temp*(L(c1)*L(Zr1)
'+L(c2)*L(Zr2)') in temp2.
28 temp1b((lus1-1)*m+1:lus1*m,1:m)=r2((N-lus1-1)*m+1:(N-lus1)*m,:)
';
31 temp2(1:hd,(lus1-1)*m+1:lus1*m)=temp2(1:hd,(lus1-1)*m+1:lus1*m)+...
32 temp1(1:hd,1:(lus1-1)*m)*temp1b((N-lus1)*m+1:end,:);
34% finally we add temp*L(b) to temp2
36 temp2(1:hd,(lus1-1)*m+1:lus1*m)=temp2(1:hd,(lus1-1)*m+1:lus1*m)+...
37 temp(1:hd,(lus1-1)*m+1:end)*b(1:(N-lus1+1)*m,:);