home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 5.ddi / SPLINES.DI$ / SPLST.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  4.3 KB  |  92 lines

  1. % SPLST    List available M-files for work with splines.
  2. % Copyright (c) 1990-92 by Carl de Boor and The MathWorks, Inc.
  3.                                           %latest change: September 28, 1990
  4.       %latest change: May 1, 1991 (replace  csapn  by  csape,  add  optknt )
  5.                                     %latest change: 4 mar 92 (  add  fncmb )
  6. clc;home;echo on
  7. %    The following M-files are available for spline work.
  8.  
  9. %  sp = spmak(knots, coefs)  returns the spline with the given knots and
  10. %          coefficients.
  11. %  [t,a,n,k,d] = spbrk(sp)   takes apart  sp .
  12. %  pp = sp2pp(sp)  converts the spline in  sp  to pp form.
  13. %  [values =] fnplt(sp[,symbol[,interval]])  plots the spline in  sp .
  14. %  values = fnval(sp,x)  returns the values at  x  of the spline in  sp .
  15. %  dsp = fnder(sp[,m])  returns the [m-th] derivative of the spline in  sp 
  16. %                       (which is again a spline).
  17. %  isp = fnint(sp)  returns an indefinite integral of the spline in  sp
  18. %                       (which is again a spline).
  19. %  sp = fncmb(sp1,sc1[,sp2[,sc2]])   returns weighted sum of two like splines.
  20. %  c = spcol(t,k,tau[,slvblk])  returns the matrix whose j-th column contains 
  21. %       the value at  tau  of the j-th B-spline of order  k  for the knots t ;
  22. %       repeated values in  tau  cause the appropriate derivative values to be
  23. %       supplied instead. 
  24. %  sp = spapi(t,tau,ftau)  returns the spline of order  k := length(t) -
  25. %          length(tau)  with knots  t  which matches the data  (tau, ftau) .
  26. %  sp = spap2(t,k,tau,ftau)  returns the spline of order  k  with knots  t 
  27. %       which matches the data  (tau, ftau)  in the least-squares sense.
  28.  
  29. pause;                                      % Touch any key to continue
  30.  
  31. %    In addition, there are routines for constructing  c u b i c  splines:
  32. %
  33. %   interpolating  c u b i c  spline:
  34. %
  35. %  values = csapi(x,y,xx)  returns the values at  xx  of the cubic spline 
  36. %          interpolant to the given data  (x,y)  (using the not-a-knot end 
  37. %          condition).  The alternative call
  38. %  pp = csapi(x,y)   returns the pp-form of the spline interpolant instead.
  39. %  pp = csape(x,y,conds,valconds) returns the pp-form of the spline
  40. %          interpolant satisfying the specified end conditions.
  41. %  pp = cscvn(points)  returns a parametric cubic spline  c u r v e  through 
  42. %          the given points .
  43.  
  44.  
  45. %  smoothing  c u b i c  spline:
  46. %
  47. %  values = csaps(x,y,p,xx)  returns the values at  xx  of the cubic smoothing
  48. %          spline with smoothing parameter  p (from [0,1]).
  49. %  pp = csaps(x,y,p) returns the pp-form of the cubic smoothing spline instead.
  50.  
  51. pause;                                      % Touch any key to continue
  52.  
  53. %    For fast display of a spline  c u r v e , there is:
  54. %
  55. %  [curve=] spcrv(c[,k,symbol,maxpnt])   uses repeated midpoint knot 
  56. %          insertion to generate (and plot) the curve
  57. %         
  58. %                t /-->  sum  B(t-k/2;j,...,j+k)*c(j) ,
  59. %                         j          
  60. %
  61. %         from the input (d,n)-array  c  ,  with  d=1 or 2 .  The insertion 
  62. %          process stops as soon as there are >= maxpnt knots.
  63.  
  64. %    In addition, there are some service routines:
  65. %
  66. pause;                                      % Touch any key to continue
  67. %  [v,b] = sprpp(tx,a)  which uses knot insertion followed by differentiation
  68. %          to construct the power form  v  of the pol.piece which agrees on  
  69. %           [0,tx(k)]  with the spline identified by the knots  tx  and the 
  70. %          B-spline coefs  a . Also returns the B-coefs. for that piece, in b.
  71. %
  72. %  [v,b] = splpp(tx,a)  which does the same as  sprpp(tx,a) , but for the 
  73. %          interval [tx(k-1),0]  rather than the interval  [0,tx(k)] .
  74. %  [augknot,addl] = augknt(knots,k)  which returns a knotsequence augmented to
  75. %         have its first and last knot of exact multiplicity  k .
  76. %
  77. %  tstar=aveknt(t,k)  which returns the knot averages recommended as good
  78. %         interpolation points.
  79. %
  80. %  [newbrk,distfn]=newknt(pp,newl)  which provides a more appropriately
  81. %         distributed breakpoint sequence.
  82. %
  83. %  xi = optknt(tau,k)  returns the optimal knots for interpolation at  tau
  84. %
  85. %  pointer=sorted(knots, points)
  86. %         and
  87. %  [nb,rows,ncols,last,blocks]=bkbrk(blokmat[,print])
  88. %        are used in  slvblk.m (q.v.)
  89.  
  90. pause;                                      % Touch any key to finish
  91.