Files
LAFF/Answers/Week04/Trmvp_un_unb_var2.m
Julien Lengrand-Lambert d4dce71599 Create repo
2018-05-02 09:13:08 +02:00

56 lines
1.9 KiB
Matlab
Executable File

function [ y_out ] = Trmvp_un_unb_var2( U, x, y )
[ UTL, UTR, ...
UBL, UBR ] = FLA_Part_2x2( U, ...
0, 0, 'FLA_TL' );
[ xT, ...
xB ] = FLA_Part_2x1( x, ...
0, 'FLA_TOP' );
[ yT, ...
yB ] = FLA_Part_2x1( y, ...
0, 'FLA_TOP' );
while ( size( UTL, 1 ) < size( U, 1 ) )
[ U00, u01, U02, ...
u10t, upsilon11, u12t, ...
U20, u21, U22 ] = FLA_Repart_2x2_to_3x3( UTL, UTR, ...
UBL, UBR, ...
1, 1, 'FLA_BR' );
[ x0, ...
chi1, ...
x2 ] = FLA_Repart_2x1_to_3x1( xT, ...
xB, ...
1, 'FLA_BOTTOM' );
[ y0, ...
psi1, ...
y2 ] = FLA_Repart_2x1_to_3x1( yT, ...
yB, ...
1, 'FLA_BOTTOM' );
%------------------------------------------------------------%
y0 = laff_axpy( chi1, u01, y0 );
psi1 = laff_axpy( chi1, upsilon11, psi1 );
%------------------------------------------------------------%
[ UTL, UTR, ...
UBL, UBR ] = FLA_Cont_with_3x3_to_2x2( U00, u01, U02, ...
u10t, upsilon11, u12t, ...
U20, u21, U22, ...
'FLA_TL' );
[ xT, ...
xB ] = FLA_Cont_with_3x1_to_2x1( x0, ...
chi1, ...
x2, ...
'FLA_TOP' );
[ yT, ...
yB ] = FLA_Cont_with_3x1_to_2x1( y0, ...
psi1, ...
y2, ...
'FLA_TOP' );
end
y_out = [ yT
yB ];
return