In lecture, we found that the I() operator becomes
, where ``
'' maps data from
sphere of active basis functions into the Fourier box. To implement
this, include ``global gbl_active'' at the top of cI(). Note that,
regardless of the number of rows of the input data, the output always
has the same size of data, the full FFT box. Thus, you should
change your initial allocation of the output to
out=zeros(prod(gbl_S),size(in,2));Finally, to perform the mapping
if size(in,1)==prod(gbl_S) out(:,col)= ... %# previous code else full=zeros(prod(gbl_S),1); full(gbl_active)=in(:,col); out(:,col)= ... %# previous code with "full" replacing "in(:,col)" end