2

I am using MatLab to solve a system of linear regressions: Ax=b. But my matrix A is really big. Its shape is (4098,3628800). I used A\b to solve this problem. It takes about 1 hour to do. I was wondering if there are more efficient ways to do this in Matlab?

KevinKim
  • 1,382
  • 3
  • 18
  • 34
  • 2
    That time doesn't surprise me. That matrix is huge - Matlab is pretty well optimised for Matrix calculations, so the only way you could make it go much faster is to get a faster computer. Perhaps the parallel computing toolbox can help, but I've not used it in that context so I'm not sure. – Dan Pollard Feb 05 '21 at 08:32
  • 1
    As @DanPollard says, Matlab will probably be pretty efficient - your main problem is that the matrix is very large. Is the matrix sparse? If so, exploiting this using `sparse` could give you significant speed-ups. Also, you should be aware that your matrix is very underdetermined, which may cause you issues. – RPM Feb 05 '21 at 11:20

0 Answers0