f = flopsflops(0)
f = flops returns the cumulative number of floating-point operations.
flops(0) resets the count to zero.
A and B are real n-by-n matrices, some typical flop counts for different operations are
--------------------- Operation Flop Count ---------------------MATLAB's version of the LINPACK benchmark isA+Bn^2A*B2*n^3A^10099*(2*n^3)lu(A)(2/3)*n^3---------------------
n = 100;A = rand(n,n);b = rand(n,1);flops(0)tic;x = A\b;t = tocmegaflops = flops/t/1.e6
(c) Copyright 1994 by The MathWorks, Inc.