This is a static copy of a profile report

Home

sorted (404 calls, 0.070 sec)
Generated 05-Nov-2014 07:53:25 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/curvefit/splines/sorted.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
spcolfunction404
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
29
[ignored,index] = sort([meshsi...
4040.050 s71.4%
30
pointer = find(index>length...
4040.020 s28.6%
All other lines  0 s0%
Totals  0.070 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
29The value assigned here to 'ignored' appears to be unused. Consider replacing it by ~.
Coverage results
[ Show coverage for parent directory ]
Total lines in function30
Non-code lines (comments, blank lines)28
Code lines (lines that can run)2
Code lines that did run2
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function pointer = sorted(meshsites, sites)
2 %SORTED Locate sites with respect to meshsites.
3 %
4 % POINTER = SORTED(MESHSITES, SITES) is the r o w vector for which
5 %
6 % POINTER(j) = #{ i : MESHSITES(i) <= sort(SITES)(j) }, all j .
7 %
8 % Thus, if both MESHSITES and SITES are nondecreasing, then
9 %
10 % MESHSITES(POINTER(j)) <= SITES(j) < MESHSITES(POINTER(j)+1), all j,
11 %
12 % with POINTER(j) equal to 0 meaning that SITES(j) < MESHSITES(1), and
13 % equal to length(MESHSITES) meaning that MESHSITES(end) <= SITES(j).
14 %
15 % Example:
16 %
17 % sorted( 1:4 , [0 1 2.1 2.99 3.5 4 5])
18 %
19 % specifies 1:4 as MESHSITES and [0 1 2.1 2.99 3.5 4 5] as SITES and
20 % gives the output [0 1 2 2 3 4 4], as does
21 %
22 % sorted( 1:4 , [2.99 5 4 0 2.1 1 3.5])
23 %
24 % See also PPUAL, SPVAL.
25
26 % Copyright 1987-2008 The MathWorks, Inc.
27 % $Revision: 1.1.6.1 $
28
0.05 404 29 [ignored,index] = sort([meshsites(:).' sites(:).']);
0.02 404 30 pointer = find(index>length(meshsites))-(1:length(sites));