function sb2slc2s(blkname);
%SB2SLC2S converts a cartesian block to spherical block.
%	SB2SLC2S(BLKNAME) converts a SystemBuild cartesian block
%       to a spherical 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.6 $  $Date: 1993/06/09 22:09:40 $

set_param(blkname,'Location',[0,0,623,352])
add_block('built-in/Fcn',[blkname '/phi'])
set_param([blkname '/phi'],'Expr','atan2(u[2],u[1])',...
		'position',[390,204,495,226])
add_block('built-in/Note',[blkname '/Cartesian to Polar'])
set_param([blkname '/Cartesian to Polar'],...
		'position',[165,30,166,31])
set_param([blkname '/input2'],'Port','2',...
		'position',[20,114,40,136])
set_param([blkname '/input1'],'position',[20,70,40,90])
add_block('built-in/Mux',[blkname '/Mux'])
set_param([blkname '/Mux'],'hide name',0,...
		'inputs','2','position',[75,97,105,133])
add_block('built-in/Fcn',[blkname '/temp'])
set_param([blkname '/temp'],'Expr','hypot(u[1],u[2])',...
		'position',[155,102,260,128])
set_param([blkname '/input3'],'Port','3',...
		'position',[20,159,40,181])
set_param([blkname '/output3'],'Port','3',...
		'position',[565,300,585,320])
set_param([blkname '/output2'],'Port','2',...
		'position',[560,205,580,225])
set_param([blkname '/output1'],...
		'position',[560,115,580,135])
add_block('built-in/Fcn',[blkname '/theta'])
set_param([blkname '/theta'],'Expr','atan2(u[1],u[2])',...
		'position',[395,299,500,321])
add_block('built-in/Fcn',[blkname '/r'])
set_param([blkname '/r'],'Expr','hypot(u[1],u[2])',...
		'position',[395,112,500,138])
add_block('built-in/Mux',[blkname '/Mux1'])
set_param([blkname '/Mux1'],'hide name',0,...
		'inputs','2',...
		'position',[315,107,345,143])
autoline(blkname,'input1/1','Mux/1');
autoline(blkname,'input2/1','Mux/2');
autoline(blkname,'Mux/1','temp/1');
autoline(blkname,'temp/1','Mux1/1');
autoline(blkname,'input3/1','Mux1/2');
autoline(blkname,'Mux1/1','r/1');
autoline(blkname,'Mux/1','phi/1');
autoline(blkname,'Mux1/1','theta/1');
autoline(blkname,'r/1','output1/1');
autoline(blkname,'phi/1','output2/1');
autoline(blkname,'theta/1','output3/1');
set_param(blkname,'Mask Display',...
'plot(0,0,100,100,[45,40,35,40,40],[85,95,85,95,30],[22,10,14,10,40,95,85,95,85],[12,10,20,10,30,30,25,30,35],[70,40],[80,30],[54,52,50,47,44,40],[53,55,56,58,59,59])')
set_param(blkname,'Mask Type','[x,y,z]->[r,phi,theta]',...
  'Mask Dialogue','Tranformation from cartesian to spherical\ncoordinates. p=hypot(x,y), r=hypot(p,z)\nphi=atan(y/x), theta=atan(p/z)')
set_param(blkname,'Mask Translate','',...
		'Mask Help','Unmask this block for more help.')
%end of sb2slc2s.m
