function err=sb2slerr(blkname,message,flag);
%SB2SLERR generates an error message inside blocks that cannot be converted.
%	output error = 1
%	If you enter SB2SLERR at the MATLAB prompt, a strange face
%	will be displayed in a SIMULINK window with the message
%	"Don't hate me!" at the bottom.  If you double-click on the
%	face, another window opens with a subsequent message.

% Copyright (c) 1990-93 by The MathWorks, Inc.
% $Revision: 1.7 $  $Date: 1993/06/09 22:09:40 $

%face1 = 'y1=[0:20];y=exp(j*y1/10*pi);y1=real(y);y2=imag(y);';
%face1 = [face1 'z1=y1(11:21);z2=y2(11:21);'];
%face2 = 'plot(y1,y2,z1*.5,z2*.5,y1*.1,y2*.1,';
%face2 = [face2 'z1*.25-.5,-z2*.25+.2,z1*.25+.5,'];
%face2 = [face2 '-z2*.25+.2,-y1(4:14)*.5,z2*.5-.4)'];
face1 = '';
face2 = '????????\nNot Supported';
if nargin <=0
   new_system('sb2slerr');
   set_param('sb2slerr','Location',[114,98,1257,1033]);
   open_system('sb2slerr');
   blkname = 'sb2slerr/Don''t hate me!';
   new_system(blkname);
   set_param(blkname,'position',[10,10,1100,800]);
   message = 'Sorry -- that is a block I cannot transfer.';
   face1 = 'y1=[0:200];y=exp(j*y1/100*pi);y1=real(y);y2=imag(y);';
   face1 = [face1 'z1=y1(101:201);z2=y2(101:201);'];
   face2 = 'plot(y1,y2,z1*.5,z2*.5,y1*.1,y2*.1,';
   face2 = [face2 'z1*.25-.5,-z2*.25+.2,z1*.25+.5,'];
   face2 = [face2 '-z2*.25+.2,-y1(41:141)*.5,z2*.4-.48)'];
end;

set_param(blkname,'Mask Translate',face1,'Mask Display',face2);

if nargin <= 2
  add_block('built-in/Note',[blkname,'/',message]);
  set_param([blkname,'/',message],'position',[100,30,110,40]);
end;
if nargin <=0 
  return
end;

err = 1;

fprintf('\n**Block '''); fprintf(blkname); 
fprintf(''' Cannot be transfered by current version.\n');



