mirror of
https://github.com/jlengrand/LAFF.git
synced 2026-03-10 08:31:21 +00:00
51 lines
1.5 KiB
Matlab
Executable File
51 lines
1.5 KiB
Matlab
Executable File
function [ A_out ] = Set_to_diagonal_matrix_unb_var1( A, x )
|
|
|
|
[ ATL, ATR, ...
|
|
ABL, ABR ] = FLA_Part_2x2( A, ...
|
|
0, 0, 'FLA_TL' );
|
|
|
|
[ xT, ...
|
|
xB ] = FLA_Part_2x1( x, ...
|
|
0, 'FLA_TOP' );
|
|
|
|
while ( size( ATL, 1 ) < size( A, 1 ) )
|
|
|
|
[ A00, a01, A02, ...
|
|
a10t, alpha11, a12t, ...
|
|
A20, a21, A22 ] = FLA_Repart_2x2_to_3x3( ATL, ATR, ...
|
|
ABL, ABR, ...
|
|
1, 1, 'FLA_BR' );
|
|
|
|
[ x0, ...
|
|
chi1, ...
|
|
x2 ] = FLA_Repart_2x1_to_3x1( xT, ...
|
|
xB, ...
|
|
1, 'FLA_BOTTOM' );
|
|
|
|
%------------------------------------------------------------%
|
|
|
|
a01 = laff_zerov( a01 );
|
|
alpha11 = laff_copy( chi1, alpha11 );
|
|
a21 = laff_zerov( a21 );
|
|
|
|
%------------------------------------------------------------%
|
|
|
|
[ ATL, ATR, ...
|
|
ABL, ABR ] = FLA_Cont_with_3x3_to_2x2( A00, a01, A02, ...
|
|
a10t, alpha11, a12t, ...
|
|
A20, a21, A22, ...
|
|
'FLA_TL' );
|
|
|
|
[ xT, ...
|
|
xB ] = FLA_Cont_with_3x1_to_2x1( x0, ...
|
|
chi1, ...
|
|
x2, ...
|
|
'FLA_TOP' );
|
|
|
|
end
|
|
|
|
A_out = [ ATL, ATR
|
|
ABL, ABR ];
|
|
|
|
return
|