This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
sp2pp>sp2pp1subfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
43
v = v(:,k:-1:1);
20 s0%
41
end
50 s0%
40
end
90 s0%
39
v(:,i) = (v(:,i) - v(:,i-1))*f...
90 s0%
38
for i=k:-1:r
50 s0%
All other lines  0.010 s100.0%
Totals  0.010 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function43
Non-code lines (comments, blank lines)29
Code lines (lines that can run)14
Code lines that did run14
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function [v,b] = sprpp(tx,a)
2 %SPRPP Right Taylor coefficients from local B-coefficients.
3 %
4 % [V,B] = SPRPP(TX,A)
5 %
6 % uses knot insertion to derive from the B-spline coefficients
7 % A(.,:) relevant for the interval [TX(.,k-1) .. TX(.,k)] (with
8 % respect to the knot sequence TX(.,1:2k-2) ) the polynomial
9 % coefficients V(.,1:k) relevant for the interval [0 .. TX(.,k)] .
10 % Here, [ ,k] := size(A) .
11 % Also, it is assumed that TX(.,k-1) <= 0 < TX(.,k) .
12 %
13 % In the process, uses repeated insertion of 0 to derive, in
14 % B(.,1:k) , the B-spline coefficients relevant for the interval
15 % [0 .. TX(.,k)] (with respect to the knot sequence
16 % [0,...,0,TX(.,k:2*(k-1))]) .
17 %
18 % See also SPLPP.
19
20 % Carl de Boor 25 feb 89
21 % Copyright 1987-2008 The MathWorks, Inc.
22 % $Revision: 1.1.6.1 $
23
24
2 25 k = length(a(1,:)); km1 = k-1; b = a;
2 26 for r=1:km1
5 27 for i=1:k-r
9 28 b(:,i) =(tx(:,i+km1).*b(:,i)-tx(:,i+r-1).*b(:,i+1))./...
29 (tx(:,i+km1)-tx(:,i+r-1));
9 30 end
5 31 end
32
33 % Use differentiation at 0 to generate the derivatives
34
2 35 v = b;
2 36 for r=2:k
5 37 factor = (k-r+1)/(r-1);
5 38 for i=k:-1:r
9 39 v(:,i) = (v(:,i) - v(:,i-1))*factor./tx(:,i+k-r);
9 40 end
5 41 end
42
2 43 v = v(:,k:-1:1);