This is a static copy of a profile reportHome
sp2pp (1 call, 0.040 sec)
Generated 05-Nov-2014 07:53:25 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/curvefit/splines/sp2pp.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
spval | function | 1 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
33 | ppi = sp2pp1(spmak(t{i},reshap... | 2 | 0.020 s | 50.0% |  |
40 | pp = ppmak(breaks,coefs,sizec)... | 1 | 0.010 s | 25.0% |  |
24 | sizeval = fnbrk(spline,'dim'); | 1 | 0.010 s | 25.0% |  |
46 | if length(sizeval)>1, pp = ... | 1 | 0 s | 0% |  |
39 | end | 2 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.040 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
sp2pp>sp2pp1 | subfunction | 2 | 0.020 s | 50.0% |  |
ppmak | function | 1 | 0.010 s | 25.0% |  |
fnbrk | function | 1 | 0.010 s | 25.0% |  |
spmak | function | 2 | 0 s | 0% |  |
spbrk | function | 1 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0.040 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 46 |
Non-code lines (comments, blank lines) | 26 |
Code lines (lines that can run) | 20 |
Code lines that did run | 17 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 85.00 % |
Function listing
time calls line
1 function pp = sp2pp(spline)
2 %SP2PP Convert from B-form to ppform.
3 %
4 % SP2PP(SPLINE) converts the B-form in SPLINE to the corresponding ppform
5 % (on its basic interval).
6 %
7 % For example,
8 %
9 % p0 = ppmak([0 1],[3 0 0]); p1 = sp2pp(pp2sp(pprfn(p0,[.4 .6])));
10 %
11 % gives p1 identical to p0 (up to round-off) since the spline has no
12 % discontinuity in any derivative across the additional breaks introduced
13 % by PPRFN, hence PP2SP ignores these additional breaks, and SP2PP does
14 % not retain any knot multiplicities (like the knot multiplicities introduced
15 % by PP2SP at the endpoints of the spline's basic interval).
16 %
17 % See also PP2SP, SP2BB, FN2FM.
18
19 % Copyright 1987-2008 The MathWorks, Inc.
20 % $Revision: 1.1.6.1 $
21
1 22 if ~isstruct(spline), spline = fn2fm(spline); end
23
0.01 1 24 sizeval = fnbrk(spline,'dim');
1 25 if length(sizeval)>1, spline = fnchg(spline,'dz',prod(sizeval)); end
26
1 27 if iscell(spline.knots) % we are dealing with a multivariate spline
28
1 29 [t,a,n,k,d] = spbrk(spline);
1 30 m = length(k);
1 31 coefs = a; sizec = [prod(d),n]; % size(coefs);
1 32 for i=m:-1:1
0.02 2 33 ppi = sp2pp1(spmak(t{i},reshape(coefs,prod(sizec(1:m)),n(i))));
2 34 breaks{i} = ppi.breaks; sizec(m+1) = ppi.pieces*k(i);
2 35 coefs = reshape(ppi.coefs,sizec);
2 36 if m>1
2 37 coefs = permute(coefs,[1,m+1,2:m]); sizec = sizec([1,m+1,2:m]);
2 38 end
2 39 end
0.01 1 40 pp = ppmak(breaks,coefs,sizec);
41
42 else
43 pp = sp2pp1(spline);
44 end
45
1 46 if length(sizeval)>1, pp = fnchg(pp,'dz',sizeval); end
Other subfunctions in this file are not included in this listing.