function varargout = dspblkupsamp2(action,varargin)
% DSPBLKUPSAMP2 DSP Blockset Upsample block helper function.

% Copyright 1995-2000 The MathWorks, Inc.
% $Revision: 1.2 $ $Date: 2000/06/07 15:50:59 $

if nargin==0, action = 'dynamic'; end

blk   = gcbh;
fullblk = getfullname(blk);

switch action 
case 'icon'
   % Determine string to display in icon
   % This represents the sample count parameter
   eval_fct = varargin{1};  % evaluated sample count (could be empty if problem occurred)
   lit_fct  = varargin{2};   % literal sample count string (exactly what user entered)
   
   if isempty(eval_fct),
      % Problem probably occurred
      fctstr = lit_fct;
   else
      % have an evaluated expression
      if ~isnumeric(eval_fct) | prod(size(eval_fct))~=1,
         fctstr = '?';
      else
         fctstr = num2str(eval_fct);
      end
   end
   x = [0 NaN 1 NaN .3 .3 NaN .2 .3 NaN .4 .3];
   y = [0 NaN 1 NaN .2 .8 NaN .6 .8 NaN .6 .8];
   varargout = {fctstr, x,y};

end
