function sb2slp2c(blkname)
%SB2SLP2C converts polar blocks to cartesian blocks.
%	SB2SLP2C(BLKNAME) converts a SystemBuild block to a SIMULINK
%	block. BLKNAME is a string containing the name of the block.

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

set_param(blkname,'Location',[0,0,359,206])
add_block('built-in/Note',[blkname '/Polar to Cartesian'])
set_param([blkname '/Polar to Cartesian'],...
		'position',[170,25,171,26])

%add_block('built-in/Outport',[blkname '/output2'])
set_param([blkname '/output2'],'Port','2',...
		'position',[295,130,315,150])

%add_block('built-in/Inport',[blkname '/input2'])
set_param([blkname '/input2'],'Port','2','position',[20,129,40,151])

%add_block('built-in/Inport',[blkname '/r'])
set_param([blkname '/input1'],'position',[20,70,40,90])

%add_block('built-in/Outport',[blkname '/x'])
set_param([blkname '/output1'],'position',[295,75,315,95])

add_block('built-in/Mux',[blkname '/Mux'])
set_param([blkname '/Mux'],'hide name',0,...
		'inputs','2','position',[75,96,105,129])

add_block('built-in/Fcn',[blkname '/theta->y'])
set_param([blkname '/theta->y'],'Expr','u[1]*sin(u[2])',...
		'position',[160,129,265,151])

add_block('built-in/Fcn',[blkname '/r->x'])
set_param([blkname '/r->x'],'Expr','u[1]*cos(u[2])',...
		'position',[155,72,260,98])
autoline(blkname,'input1/1','Mux/1');
autoline(blkname,'input2/1','Mux/2');
autoline(blkname,'Mux/1','r->x/1');
autoline(blkname,'Mux/1','theta->y/1');
autoline(blkname,'r->x/1','output1/1');
autoline(blkname,'theta->y/1','output2/1');
set_param(blkname,'Mask Display',...
'plot(0,0,100,100,[25,20,15,20,20],[85,95,85,95,20],[70,20,95,86,95,85],[60,20,20,15,20,25],[70,70],[45,54],[70,70],[30,40],[70,70],[20,25],[55,65],[60,60],[40,50],[60,60],[25,34],[60,60],[20,21],[60,60],[70,70,68],[57,60,60])')
set_param(blkname,'Mask Type','[r,theta]->[x,y]',...
		'Mask Dialogue','Tranformation from polar to cartesian\ncoordinates.\nx=rcos(theta), y=rsin(theta)',...
		'Mask Translate','')
set_param(blkname,'Mask Help','Unmask this block for more help.')
