flops(0)
A=rand(10);
B=rand(20);
C=conv2(A,B);
flops
returns 0. Several other examples I tried all returned 0. The "conv"
function does not seem to have this problem. The problem was repeated
at three different installations of Matlab, two here at UIC and one at
Auburn University.
This problem has been reported to MathWorks, where it has been
assigned Technical Support Reference Number 35206. The problem "will
be addressed for a future release" according to Howard Taitel,
Technical Support Engineer.
MathWork's response to my email report was prompt, polite, and
appreciative.
--
Steven L. Eddins, Asst. Professor Internet: edd...@bert.eecs.uic.edu
EECS Dept. (M/C 154) Voice: (312) 996-5771
University of Illinois at Chicago FAX: (312) 413-0024
851 S. Morgan Rm. 1120 SEO, Chicago, IL 60607-7053
This is because, on many machines, "conv2" is a MEX file. As such,
it is not part of the core of MATLAB, and doesn't access any functions
in the core, so flops don't get counted. This is true of any MEX
file. Most versions of MATLAB are now distributed with several MEX
files, include conv2, ode23, ode45, and remez. If you want these
functions to register flops, rename the MEX files or remove them
from the MATLAB path. The corresponding .M files will then be used.
The computations will run a little slower, but the operations will
be counted.
We need to add something to the MEX library so that MEX functions
can report flops.
-- Cleve Moler
mo...@mathworks.com