if true % code
A = [1,2,-1;2,5,-1;1,3,-3];b = [6;13;4];ticfor i=1:1000 X = A\b;endtocticfor i=1:1000 x = A^-1 * b;endtoc
Elapsed time is 0.003520 seconds. Elapsed time is 0.017500 seconds.
matrix algebra
if true % code
A = [1,2,-1;2,5,-1;1,3,-3];b = [6;13;4];ticfor i=1:1000 X = A\b;endtocticfor i=1:1000 x = A^-1 * b;endtoc
Best Answer