This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
spcol | function | 404 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
29 | [ignored,index] = sort([meshsi... | 404 | 0.050 s | 71.4% |  |
30 | pointer = find(index>length... | 404 | 0.020 s | 28.6% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.070 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
29 | The value assigned here to 'ignored' appears to be unused. Consider replacing it by ~. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 30 |
Non-code lines (comments, blank lines) | 28 |
Code lines (lines that can run) | 2 |
Code lines that did run | 2 |
Code lines that did not run | 0 |
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));