Re: Large matrices in c++



If you are allocating on the stack, as in double foo[1000][1000], you
might be exceeding your stack space. Try allocating it in the heap (as
in double* foo = new double[1000*1000]). Hope that helps.

Hottejonas wrote:
Thanks for your answers to my post concerning Fourier decomposition. I have
now encountered another problem. I am getting a segmentation fault when I'm
declaring matrices larger than approx. 1000x1000 double. But I can easily
declare much larger matrices in MATLAB running on the same machine.

Jonas Dahl

.