I have to solve in MATLAB a linear system of equations A*x=B
where A
is symmetric and its elements depend on the difference of the indices: Aij=f(i-j)
.
I use iterative solvers because the size of A
is say 40000x40000. The iterative solvers require to determine the product A*x
where x
is the test solution. The evaluation of this product turns out to be a convolution and therefore can be done dy means of fast fourier transforms (cputime ~ Nlog(N)
instead of N^2
). I have the following questions to this problem:
is this convolution circular? Because if it is circular I think that I have to use a specific indexing for the new matrices to take the fft. Is that right?
I find difficult to program the routine for the fft because I cannot understand the indexing I should use. Is there any ready routine which I can use to evaluate by fft directly the product
A*x
and not the convolution? Actually, the matrix A is constructed of 3x3 blocks and is symmetric. A ready routine for the productA*x
would be the best solution for me.- In case that there is no ready routine, could you give me an idea by example how I could construct this routine to evaluate a matrix-vector product by fft?
Thank you in advance,
Panos