Home > src > main > matlab > randreal.m

randreal

PURPOSE ^

SYNOPSIS ^

function flmn = randreal(N, L)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function flmn = randreal(N, L)
0002 
0003 flmn = zeros(N, L^2);
0004 flmn = randn(size(flmn)) + sqrt(-1)*randn(size(flmn));
0005 flmn = 2.*(flmn - (1+sqrt(-1))./2);
0006 % Impose reality on flms.
0007 for en = 1:N
0008    for el = 0:L-1
0009       ind = el*el + el + 1;
0010       flmn(en,ind) = real(flmn(en,ind));
0011       for m = 1:el
0012          ind_pm = el*el + el + m + 1;
0013          ind_nm = el*el + el - m + 1;
0014          flmn(en,ind_nm) = (-1)^m * conj(flmn(en,ind_pm));
0015       end  
0016    end
0017 end
0018 
0019 end

Generated on Mon 24-Sep-2012 12:26:33 by m2html © 2005