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

  1. function [breaks,coefs,l,k,d]=ppbrk(pp,print)
  2. % PPBRK    Break a pp into pieces.
  3. %        [breaks,coefs,l,k,d] = ppbrk(pp[,print])
  4. %
  5. %  breaks apart the  pp  function into its pieces, and, optionally, prints them.
  6.  
  7. % C. de Boor / latest change: Feb.25, 1989
  8. % Copyright (c) 1990-92 by Carl de Boor and The MathWorks, Inc.
  9.  
  10.  
  11. if (pp(1)==10),
  12.    d=pp(2);
  13.    l=pp(3);
  14.    breaks=pp(3+[1:l+1]);
  15.    k=pp(5+l);
  16.    coefs=zeros(d*l,k);coefs(:)=pp(5+l+[1:d*l*k]);
  17.    if (nargin>1),breaks,coefs,l,k,d,end
  18. else,
  19.    error('the input array does not seem to describe a pp function')
  20. end
  21.