Figuring cputime and runing time of X=inv(A)*b, and the X=A\b.
2 views (last 30 days)
There is a difference between using X=inv(A)*b, and the X=A\b. The second one is faster, but only when the set of linear of equations is of huge size. I need to find out how big the matrix is when the difference of calculation of time can be seen? I want to use cputime to randomize the difference size matrices and to solve equations by both methods, and checking the time to finish the calculation.
t0=cputime .... ... .. RunningTime=cputime - to
Bus141 on 8 Nov 2015
I am not exactly sure what you are trying to do but it seems you are trying to time each operation to find at which point the other method is quicker. My thought is to just loop the matrix sizes.