I need to create a Fourier matrix in order to apply it to a huge matrix that I needed to define as sparse using spalloc. I tried:
F=dftmtx(N);
but N is too large so I can't create it. Is there any way to solve this problem? Thank you for your help!
For each column, you can form a reduced DFT matrix by leaving out the entries that will multiply zeros. Something like
You'll have to iterate over the columns unless the zeros in the input matrix don't change column-to-column. However, the above still seems silly to me. I'd just pull off one column at a time and use
fft()
.