Home > src > main > matlab > flag_mw_vec2arr.m

flag_mw_vec2arr

PURPOSE ^

SYNOPSIS ^

function arr = flag_mw_vec2arr(vec)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function arr = flag_mw_vec2arr(vec)
0002 
0003 sz = size(vec);
0004 
0005 if sz(1) == 1   % array 1 x L*(2L-1)
0006     delta = sqrt(1 + 8*(sz(2)));
0007     L = ( 1 + delta ) / 4;
0008 else            % array L*(2L-1) x 1
0009     delta = sqrt(1 + 8*(sz(1)));
0010     L = ( 1 + delta ) / 4;
0011 end
0012 
0013 arr = zeros(L, 2*L-1);
0014 
0015 for t = 1:L
0016     for p = 1:2*L-1
0017         arr(t,p) = vec((t-1)*(2*L-1)+p);
0018     end
0019 end
0020 
0021 
0022 end

Generated on Wed 14-Nov-2012 17:56:30 by m2html © 2005