function out=cI(in)
Input:
Global variables:
Output:
Generalize the software in your file ``cI.m'' to have the above capability.
To do this, note that by block matrix multiplication,
In octave this type of operation is most efficient when you first form the output matrix with data of the appropriate size with a statement like
out=zeros(size(in));Doing this avoids extra calls to malloc() as the data for out is actually computed. Then, you should loop over the columns of in with a code fragment of the form
for col=1:size(in,2) %# size(in,2) gives 2nd dimension (# of columns) of in
out(:,col)=fftw3(in(:,col), ... ); %# <= Same operation you had before
end
where you compute out(:,col) from in(:,col) in the same was as you
previously computed out from in.
Tomas Arias 2004-04-23