This is a static copy of a profile report

Home

sp2pp>sp2pp1 (2 calls, 0.020 sec)
Generated 05-Nov-2014 07:52:41 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/curvefit/splines/sp2pp.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
sp2ppfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
77
pp = ppmak([t(inter) t(inter(e...
20.010 s50.0%
71
c = sprpp(tx,b);
20.010 s50.0%
70
b = repmat(d*(1-k:0),d*l,1)+re...
20 s0%
69
temp = repmat(d*inter,d,1)+rep...
20 s0%
68
tx = tx-repmat(t(dinter).',1,2...
20 s0%
All other lines  0 s0%
Totals  0.020 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
ppmakfunction20.010 s50.0%
sprppfunction20.010 s50.0%
repmatfunction160 s0%
spbrkfunction20 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.020 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function30
Non-code lines (comments, blank lines)13
Code lines (lines that can run)17
Code lines that did run12
Code lines that did not run5
Coverage (did run/can run)70.59 %
Function listing
   time   calls  line
48 function pp = sp2pp1(spline)
49 % Take apart the spline
50
2 51 [t,a,n,k,d] = spbrk(spline);
52
53 % and augment the knot sequence so that first and last knot each have
54 % multiplicity k .
55
2 56 index = find(diff(t)>0); addl = k-index(1); addr = index(end)-n;
2 57 if (addl>0||addr>0)
58 t = [repmat(t(1),1,addl) t(:).' repmat(t(n+k),1,addr)];
59 a = [zeros(d,addl) a zeros(d,addr)];
60 end
61
62 % From this, generate the pp description.
63
2 64 inter = find( diff(t)>0 ); l = length(inter);
2 65 if k>1
2 66 temp = repmat(inter,d,1); dinter = temp(:);
2 67 tx = repmat(2-k:k-1,d*l,1)+repmat(dinter,1,2*(k-1)); tx(:) = t(tx);
2 68 tx = tx-repmat(t(dinter).',1,2*(k-1)); a = a(:);
2 69 temp = repmat(d*inter,d,1)+repmat((1-d:0).',1,l); dinter(:) = temp(:);
2 70 b = repmat(d*(1-k:0),d*l,1)+repmat(dinter,1,k); b(:) = a(b);
0.01 2 71 c = sprpp(tx,b);
72 else temp = a(:,inter); c = temp(:);
73 end
74
75 % put together the pp
76
0.01 2 77 pp = ppmak([t(inter) t(inter(end)+1)],c,d);