function [breaks,coefs,l,k,d]=unmkpp(pp)
%UNMKPP Supply details about piecewise polynomial.
%   [BREAKS,COEFS,L,K,D] = UNMKPP(PP) takes apart the PP function
%   into its constituent pieces.
%
%   See also MKPP, SPLINE, PPVAL.

%   Carl de Boor 7-2-86
%   Revised 11-19-93 CB to match spline toolbox format
%   Revised 10-14-97 CB to handle vector-valued function, including
%   the possibility of PP being a column rather than a row
%   Copyright (c) 1984-1998 by The MathWorks, Inc.
%   $Revision: 1.2 $  $Date: 1998/08/12 14:07:24 $

if pp(1)==10
   d = pp(2); l=pp(3); breaks=reshape(pp(3+(1:l+1)),1,l+1);
   k=pp(5+l); coefs=reshape(pp(5+l+(1:d*l*k)),d*l,k);
else
   error('the input array does not seem to describe a pp function')
end

