MATLAB: Speed up the program, matrix calculation

matrix

Hello, I would like to know if there is possible to speed up my program.
[ L , U , P] = lu(A); y = L \ (P*torn); x = U \ y ;
Where A is typically a 4000×4000 sparse matrix.
Thanks!

Best Answer

I think you should just do
x=A\torn;
Related Question