This is a static copy of a profile report

Home

dot (1000 calls, 0.022 sec)
Generated 05-Aug-2011 13:03:51 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/specfun/dot.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
calc_loadcorrect_finalfunction1000
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
29
if any(size(a)~=size(b)),
10000.011 s50.0%
25
if min(size(b))==1, b = b(:); ...
10000.011 s50.0%
34
c = sum(conj(a).*b);
10000 s0%
33
if nargin==2,
10000 s0%
26
end;
10000 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function37
Non-code lines (comments, blank lines)25
Code lines (lines that can run)12
Code lines that did run7
Code lines that did not run5
Coverage (did run/can run)58.33 %
Function listing
   time   calls  line
1 function c = dot(a,b,dim)
2 %DOT Vector dot product.
3 % C = DOT(A,B) returns the scalar product of the vectors A and B.
4 % A and B must be vectors of the same length. When A and B are both
5 % column vectors, DOT(A,B) is the same as A'*B.
6 %
7 % DOT(A,B), for N-D arrays A and B, returns the scalar product
8 % along the first non-singleton dimension of A and B. A and B must
9 % have the same size.
10 %
11 % DOT(A,B,DIM) returns the scalar product of A and B in the
12 % dimension DIM.
13 %
14 % Class support for inputs A,B:
15 % float: double, single
16 %
17 % See also CROSS.
18
19 % Copyright 1984-2010 The MathWorks, Inc.
20 % $Revision: 5.13.4.4 $ $Date: 2010/08/23 23:13:02 $
21
22 % Special case: A and B are vectors and dim not supplied
1000 23 if ismatrix(a) && ismatrix(b) && nargin<3
1000 24 if min(size(a))==1, a = a(:); end
0.01 1000 25 if min(size(b))==1, b = b(:); end
1000 26 end;
27
28 % Check dimensions
0.01 1000 29 if any(size(a)~=size(b)),
30 error(message('MATLAB:dot:InputSizeMismatch'));
31 end
32
1000 33 if nargin==2,
1000 34 c = sum(conj(a).*b);
35 else
36 c = sum(conj(a).*b,dim);
37 end