function [stat,post] = blks1interp(path,prop,bstr,bint,bflt,parent,name,catalog,ws,node)
%BLKS1INTERP This block performs cubic spline interpolation between a given set of input and
%     output breakpoints.
%
% See also BLKC1INTERP, BLKS1INTERP, BLKL2INTERP, BLKS2INTERP.

% Initial coding by A S Bozin, 18-05-98
% Copyright 1997-2000 The MathWorks, Inc.
% $Revision: 1.4 $ $Date: 2000/06/14 16:10:45 $

   stat = 0;			   		   % Error flag
   nInputs = bint(5);
   nOutputs = bint(6);
   %
   % Add mux and demux blocks if necessary
   %
   [post,rect] = blkio('port',nInputs,nOutputs,prop,path);
   %
   % Get the input and output breakpoints
   %
   indFlt = bint(16);
   indStr = bint(17)+1;
   indInt = bint(18)+1;
   indInt = bint(indInt)+indInt;		   % Skip icon data
   nColumns = bint(indInt);
   indInt = bint(15)+1;
   npar = 2;					   % Number of parameters
   symInd = zeros(1,npar);
   if (bitand(bint(indInt),16))
      indVar = indInt+2;
      vRange = 1:bint(indVar);
      symInd(bint(indVar+vRange)) = 1;
   end
   rDims = [nColumns;nColumns];
   cDims = [nInputs;nOutputs];
   ub = cumsum(rDims.*cDims);
   lb = [0;ub(1:end-1)]+1;
   str = cell(npar,1);
   for (k = find(symInd))
      ind = mfindstr(bstr,indStr,'|');
      str{k} = bstr(indStr:ind-1);
      indStr = ind+1;
   end
   %
   % Get the block parameter variables
   %
   [symInd,str] = mgetscope(symInd,str,catalog,ws,node);
   for (k = find(~symInd))
      points = zeros(rDims(k),cDims(k));
      bRange = lb(k):ub(k);
      points(:) = bflt(indFlt+bRange);
      str{k} = mat2char(points');
   end
   %
   % Linear interpolation block.
   %
   bh = add_block('libsb2sl/NTP/CubicInterp',path,...
		  'ForegroundColor',prop.fgColor,...
		  'BackgroundColor',prop.bgColor,...
		  'Orientation',prop.orientation,...
		  'DropShadow',prop.border,...
		  'Position',rect,...
		  'in1BrkPoints',str{1},...
		  'outBrkPoints',str{2});
   %
   % Connect the current linear interpolation block with the mux and demux blocks
   %
   blkio('line',nInputs,nOutputs,post,parent,name);
   return					   % Last card of BLKS1INTERP
