function sb2slc2p(blkname);
%SB2SLC2P converts cartesian blocks to polar blocks.
%	SB2SLC2P(BLKNAME) converts a SystemBuild cartesian block
%	to a polar block.  BLKNAME is a string containing the name
%	of the block.

% Wes Wang 10/2/92 -- 10/6/92
% Copyright (c) 1990-93 by The MathWorks, Inc
% $Revision: 1.7 $  $Date: 1993/06/09 22:09:40 $

set_param(blkname,'Location',[0,0,359,206])
add_block('built-in/Fcn',[blkname '/x->r'])
set_param([blkname '/x->r'],...
		'Expr','hypot(u[1],u[2])','position',[155,72,260,98])
add_block('built-in/Fcn',[blkname '/x->theta'])
set_param([blkname '/x->theta'],...
		'Expr','atan2(u[2],u[1])','position',[160,129,265,151])
add_block('built-in/Mux',[blkname '/Mux'])
set_param([blkname '/Mux'],'inputs','2',...
		'position',[75,96,105,129])
set_param([blkname '/output1'],'position',[295,75,315,95])
set_param([blkname '/input1'],'position',[20,70,40,90])
set_param([blkname '/input2'],...
  'Port','2','position',[20,129,40,151])
set_param([blkname '/output2'],...
  'Port','2','position',[295,130,315,150])
add_block('built-in/Note',[blkname '/Cartesian to Polar'])
set_param([blkname '/Cartesian to Polar'],'position',[165,30,166,31])
autoline(blkname,'input1/1','Mux/1');
autoline(blkname,'input2/1','Mux/2');
autoline(blkname,'Mux/1','x->r/1');
autoline(blkname,'Mux/1','x->theta/1');
autoline(blkname,'x->r/1','output1/1');
autoline(blkname,'x->theta/1','output2/1');
set_param(blkname,'Mask Display',...
  'plot(0,0,100,100,[24,20,15,20,20],[85,95,85,95,20],[80,20,95,85,95,85],[70,20,20,15,20,24],[56,56,55,52,50,46],[20,26,31,35,38,42])',...
  'Mask Type','[x,y]->[r,theta]')
set_param(blkname,'Mask Dialogue',...
  'Tranformation from cartesian to polar\ncoordinates.\nr=sqrt(x^2+y^2), theta=atan(y/x)',...
  'Mask Translate','','Mask Help','Unmask this block for more help.')

