function [ret,x0,str,ts,xts]=ben2csys(t,x,u,flag);
%BEN2CSYS	is the M-file description of the SIMULINK system named BEN2CSYS.
%	The block-diagram can be displayed by typing: BEN2CSYS.
%
%	SYS=BEN2CSYS(T,X,U,FLAG) returns depending on FLAG certain
%	system values given time point, T, current state vector, X,
%	and input vector, U.
%	FLAG is used to indicate the type of output to be returned in SYS.
%
%	Setting FLAG=1 causes BEN2CSYS to return state derivatives, FLAG=2
%	discrete states, FLAG=3 system outputs and FLAG=4 next sample
%	time. For more information and other options see SFUNC.
%
%	Calling BEN2CSYS with a FLAG of zero:
%	[SIZES]=BEN2CSYS([],[],[],0),  returns a vector, SIZES, which
%	contains the sizes of the state vector and other parameters.
%		SIZES(1) number of states
%		SIZES(2) number of discrete states
%		SIZES(3) number of outputs
%		SIZES(4) number of inputs
%		SIZES(5) number of roots (currently unsupported)
%		SIZES(6) direct feedthrough flag
%		SIZES(7) number of sample times
%
%	For the definition of other parameters in SIZES, see SFUNC.
%	See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

% Note: This M-file is only used for saving graphical information;
%       after the model is loaded into memory an internal model
%       representation is used.

% the system will take on the name of this mfile:
sys = mfilename;
new_system(sys)
simver(1.3)
if (0 == (nargin + nargout))
     set_param(sys,'Location',[27,95,503,389])
     open_system(sys)
end;
set_param(sys,'algorithm',     'Gear')
set_param(sys,'Start time',    '0.0')
set_param(sys,'Stop time',     '10')
set_param(sys,'Min step size', '0.1')
set_param(sys,'Max step size', '0.1')
set_param(sys,'Relative error','1e-3')
set_param(sys,'Return vars',   '')
set_param(sys,'Load callback','ben2cdat');


%     Subsystem  'Autopilot'.

new_system([sys,'/','Autopilot'])
set_param([sys,'/','Autopilot'],'Location',[0,0,306,328])

add_block('built-in/Outport',[sys,'/','Autopilot/U1'])
set_param([sys,'/','Autopilot/U1'],...
		'position',[240,30,260,50])

add_block('built-in/Inport',[sys,'/','Autopilot/Y2'])
set_param([sys,'/','Autopilot/Y2'],...
		'Port','9',...
		'position',[95,155,115,175])

add_block('built-in/Inport',[sys,'/','Autopilot/Y3'])
set_param([sys,'/','Autopilot/Y3'],...
		'Port','7',...
		'position',[95,220,115,240])


%     Subsystem  'Autopilot/RAutoC'.

new_system([sys,'/','Autopilot/RAutoC'])
set_param([sys,'/','Autopilot/RAutoC'],'Location',[0,0,213,229])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G14'])
set_param([sys,'/','Autopilot/RAutoC/G14'],...
		'Numerator','gn14',...
		'Denominator','gd14',...
		'position',[320,45,375,85])

add_block('built-in/Sum',[sys,'/','Autopilot/RAutoC/Sum2'])
set_param([sys,'/','Autopilot/RAutoC/Sum2'],...
		'inputs','2',...
		'position',[275,55,305,75])


%     Subsystem  'Autopilot/RAutoC/G7 G11'.

new_system([sys,'/','Autopilot/RAutoC/G7 G11'])
set_param([sys,'/','Autopilot/RAutoC/G7 G11'],'Location',[100,100,300,300])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G7 G11/G11'])
set_param([sys,'/','Autopilot/RAutoC/G7 G11/G11'],...
		'Numerator','gn11',...
		'Denominator','gd11',...
		'position',[175,15,230,55])

add_block('built-in/Outport',[sys,'/','Autopilot/RAutoC/G7 G11/Out_1'])
set_param([sys,'/','Autopilot/RAutoC/G7 G11/Out_1'],...
		'position',[275,25,295,45])

add_block('built-in/Inport',[sys,'/','Autopilot/RAutoC/G7 G11/In_1'])
set_param([sys,'/','Autopilot/RAutoC/G7 G11/In_1'],...
		'position',[20,25,40,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G7 G11/G7'])
set_param([sys,'/','Autopilot/RAutoC/G7 G11/G7'],...
		'Numerator','gn7',...
		'Denominator','gd7',...
		'position',[85,15,140,55])
add_line([sys,'/','Autopilot/RAutoC/G7 G11'],[235,35;270,35])
add_line([sys,'/','Autopilot/RAutoC/G7 G11'],[145,35;170,35])
add_line([sys,'/','Autopilot/RAutoC/G7 G11'],[45,35;80,35])


%     Finished composite block 'Autopilot/RAutoC/G7 G11'.

set_param([sys,'/','Autopilot/RAutoC/G7 G11'],...
		'position',[290,110,320,160])


%     Subsystem  'Autopilot/RAutoC/K11 G16'.

new_system([sys,'/','Autopilot/RAutoC/K11 G16'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16'],'Location',[100,100,300,300])


%     Subsystem  'Autopilot/RAutoC/K11 G16/G161 G162 G163'.

new_system([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163'],'Location',[100,100,300,300])

add_block('built-in/Inport',[sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/In_1'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/In_1'],...
		'position',[15,25,35,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/G161'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/G161'],...
		'Numerator','gn161',...
		'Denominator','gd161',...
		'position',[85,10,135,50])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/G162'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/G162'],...
		'Numerator','gn162',...
		'Denominator','gd162',...
		'position',[175,10,225,50])

add_block('built-in/Outport',[sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/Out_1'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/Out_1'],...
		'position',[360,25,380,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/G163'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163/G163'],...
		'Numerator','gn163',...
		'Denominator','gd163',...
		'position',[270,10,320,50])
add_line([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163'],[140,30;170,30])
add_line([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163'],[40,35;80,30])
add_line([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163'],[230,30;265,30])
add_line([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163'],[325,30;355,35])


%     Finished composite block 'Autopilot/RAutoC/K11 G16/G161 G162 G163'.

set_param([sys,'/','Autopilot/RAutoC/K11 G16/G161 G162 G163'],...
		'position',[150,5,180,55])

add_block('built-in/Inport',[sys,'/','Autopilot/RAutoC/K11 G16/In_1'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/In_1'],...
		'position',[15,20,35,40])

add_block('built-in/Gain',[sys,'/','Autopilot/RAutoC/K11 G16/K11'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/K11'],...
		'Gain','k11',...
		'position',[75,15,105,45])

add_block('built-in/Outport',[sys,'/','Autopilot/RAutoC/K11 G16/Out_1'])
set_param([sys,'/','Autopilot/RAutoC/K11 G16/Out_1'],...
		'position',[250,20,270,40])
add_line([sys,'/','Autopilot/RAutoC/K11 G16'],[185,30;245,30])
add_line([sys,'/','Autopilot/RAutoC/K11 G16'],[110,30;145,30])
add_line([sys,'/','Autopilot/RAutoC/K11 G16'],[40,30;70,30])


%     Finished composite block 'Autopilot/RAutoC/K11 G16'.

set_param([sys,'/','Autopilot/RAutoC/K11 G16'],...
		'position',[215,160,245,210])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G12'])
set_param([sys,'/','Autopilot/RAutoC/G12'],...
		'Numerator','gn12',...
		'Denominator','gd12',...
		'position',[100,15,150,55])

add_block('built-in/Inport',[sys,'/','Autopilot/RAutoC/Y3'])
set_param([sys,'/','Autopilot/RAutoC/Y3'],...
		'position',[40,115,60,125])

add_block('built-in/Sum',[sys,'/','Autopilot/RAutoC/Sum1'])
set_param([sys,'/','Autopilot/RAutoC/Sum1'],...
		'inputs','--',...
		'position',[415,80,445,100])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G15'])
set_param([sys,'/','Autopilot/RAutoC/G15'],...
		'Numerator','gn15',...
		'Denominator','gd15',...
		'position',[465,70,510,110])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G17'])
set_param([sys,'/','Autopilot/RAutoC/G17'],...
		'Numerator','gn17',...
		'Denominator','gd17',...
		'position',[185,76,235,114])


%     Subsystem  'Autopilot/RAutoC/G7 G8'.

new_system([sys,'/','Autopilot/RAutoC/G7 G8'])
set_param([sys,'/','Autopilot/RAutoC/G7 G8'],'Location',[100,100,300,300])

add_block('built-in/Outport',[sys,'/','Autopilot/RAutoC/G7 G8/Out_1'])
set_param([sys,'/','Autopilot/RAutoC/G7 G8/Out_1'],...
		'position',[270,25,290,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G7 G8/G7'])
set_param([sys,'/','Autopilot/RAutoC/G7 G8/G7'],...
		'Numerator','gn7',...
		'Denominator','gd7',...
		'position',[75,15,125,55])

add_block('built-in/Inport',[sys,'/','Autopilot/RAutoC/G7 G8/In_1'])
set_param([sys,'/','Autopilot/RAutoC/G7 G8/In_1'],...
		'position',[20,25,40,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G7 G8/G8'])
set_param([sys,'/','Autopilot/RAutoC/G7 G8/G8'],...
		'Numerator','gn8',...
		'Denominator','gd8',...
		'position',[170,15,220,55])
add_line([sys,'/','Autopilot/RAutoC/G7 G8'],[45,35;70,35])
add_line([sys,'/','Autopilot/RAutoC/G7 G8'],[130,35;165,35])
add_line([sys,'/','Autopilot/RAutoC/G7 G8'],[225,35;265,35])


%     Finished composite block 'Autopilot/RAutoC/G7 G8'.

set_param([sys,'/','Autopilot/RAutoC/G7 G8'],...
		'position',[670,95,700,145])

add_block('built-in/Outport',[sys,'/','Autopilot/RAutoC/U2'])
set_param([sys,'/','Autopilot/RAutoC/U2'],...
		'position',[735,115,755,125])

add_block('built-in/Gain',[sys,'/','Autopilot/RAutoC/K9'])
set_param([sys,'/','Autopilot/RAutoC/K9'],...
		'Gain','k9',...
		'position',[615,105,645,135])

add_block('built-in/Sum',[sys,'/','Autopilot/RAutoC/Sum3'])
set_param([sys,'/','Autopilot/RAutoC/Sum3'],...
		'inputs','+-',...
		'position',[555,110,585,130])


%     Subsystem  'Autopilot/RAutoC/G13'.

new_system([sys,'/','Autopilot/RAutoC/G13'])
set_param([sys,'/','Autopilot/RAutoC/G13'],'Location',[100,100,300,300])

add_block('built-in/Outport',[sys,'/','Autopilot/RAutoC/G13/Out_1'])
set_param([sys,'/','Autopilot/RAutoC/G13/Out_1'],...
		'position',[350,25,370,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G13/G132'])
set_param([sys,'/','Autopilot/RAutoC/G13/G132'],...
		'Numerator','gn132',...
		'Denominator','gd132',...
		'position',[255,15,310,55])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G13/G131'])
set_param([sys,'/','Autopilot/RAutoC/G13/G131'],...
		'Numerator','gn131',...
		'Denominator','gd131',...
		'position',[165,15,220,55])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/RAutoC/G13/G13d'])
set_param([sys,'/','Autopilot/RAutoC/G13/G13d'],...
		'Numerator','gn13d',...
		'Denominator','gd13d',...
		'position',[75,15,130,55])

add_block('built-in/Inport',[sys,'/','Autopilot/RAutoC/G13/In_1'])
set_param([sys,'/','Autopilot/RAutoC/G13/In_1'],...
		'position',[20,25,40,45])
add_line([sys,'/','Autopilot/RAutoC/G13'],[45,35;70,35])
add_line([sys,'/','Autopilot/RAutoC/G13'],[135,35;160,35])
add_line([sys,'/','Autopilot/RAutoC/G13'],[225,35;250,35])
add_line([sys,'/','Autopilot/RAutoC/G13'],[315,35;345,35])


%     Finished composite block 'Autopilot/RAutoC/G13'.

set_param([sys,'/','Autopilot/RAutoC/G13'],...
		'position',[195,10,225,60])
add_line([sys,'/','Autopilot/RAutoC'],[155,35;157,95;180,95])
add_line([sys,'/','Autopilot/RAutoC'],[590,120;610,120])
add_line([sys,'/','Autopilot/RAutoC'],[515,90;515,90;540,115;550,115])
add_line([sys,'/','Autopilot/RAutoC'],[450,90;460,90])
add_line([sys,'/','Autopilot/RAutoC'],[380,65;380,65;400,85;410,85])
add_line([sys,'/','Autopilot/RAutoC'],[310,65;315,65])
add_line([sys,'/','Autopilot/RAutoC'],[230,35;260,60;270,60])
add_line([sys,'/','Autopilot/RAutoC'],[240,95;260,70;270,70])
add_line([sys,'/','Autopilot/RAutoC'],[155,35;190,35])
add_line([sys,'/','Autopilot/RAutoC'],[325,135;355,135;404,95;410,95])
add_line([sys,'/','Autopilot/RAutoC'],[250,185;480,185;540,125;550,125])
add_line([sys,'/','Autopilot/RAutoC'],[65,120;65,35;95,35])
add_line([sys,'/','Autopilot/RAutoC'],[65,120;155,120;155,135;285,135])
add_line([sys,'/','Autopilot/RAutoC'],[65,120;155,120;155,185;210,185])
add_line([sys,'/','Autopilot/RAutoC'],[705,120;730,120])
add_line([sys,'/','Autopilot/RAutoC'],[650,120;665,120])


%     Finished composite block 'Autopilot/RAutoC'.

set_param([sys,'/','Autopilot/RAutoC'],...
		'position',[155,202,195,258])

add_block('built-in/Inport',[sys,'/','Autopilot/Ncy'])
set_param([sys,'/','Autopilot/Ncy'],...
		'Port','2',...
		'position',[15,100,35,120])

add_block('built-in/Inport',[sys,'/','Autopilot/Ny'])
set_param([sys,'/','Autopilot/Ny'],...
		'Port','3',...
		'position',[40,120,60,140])

add_block('built-in/Inport',[sys,'/','Autopilot/Y6'])
set_param([sys,'/','Autopilot/Y6'],...
		'Port','8',...
		'position',[65,140,85,160])

add_block('built-in/Outport',[sys,'/','Autopilot/U3'])
set_param([sys,'/','Autopilot/U3'],...
		'Port','3',...
		'position',[245,120,265,140])


%     Subsystem  'Autopilot/YAutoC'.

new_system([sys,'/','Autopilot/YAutoC'])
set_param([sys,'/','Autopilot/YAutoC'],'Location',[0,0,213,229])


%     Subsystem  'Autopilot/YAutoC/G7 G8 G9'.

new_system([sys,'/','Autopilot/YAutoC/G7 G8 G9'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9'],'Location',[100,100,300,300])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G7 G8 G9/G8'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/G8'],...
		'Numerator','gn8',...
		'Denominator','gd8',...
		'position',[160,12,210,58])


%     Subsystem  'Autopilot/YAutoC/G7 G8 G9/G91 G92'.

new_system([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92'],'Location',[100,100,300,300])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92/G91'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92/G91'],...
		'Numerator','gn91',...
		'Denominator','gd91',...
		'position',[75,12,130,58])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92/In_1'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92/In_1'],...
		'position',[15,25,35,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92/G92'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92/G92'],...
		'Numerator','gn92',...
		'Denominator','gd92',...
		'position',[170,12,225,58])

add_block('built-in/Outport',[sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92/Out_1'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92/Out_1'],...
		'position',[270,25,290,45])
add_line([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92'],[230,35;265,35])
add_line([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92'],[135,35;165,35])
add_line([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92'],[40,35;70,35])


%     Finished composite block 'Autopilot/YAutoC/G7 G8 G9/G91 G92'.

set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/G91 G92'],...
		'position',[245,10,275,60])

add_block('built-in/Outport',[sys,'/','Autopilot/YAutoC/G7 G8 G9/Out_1'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/Out_1'],...
		'position',[335,25,355,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G7 G8 G9/G7'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/G7'],...
		'Numerator','gn7',...
		'Denominator','gd7',...
		'position',[65,12,115,58])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/G7 G8 G9/In_1'])
set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9/In_1'],...
		'position',[15,25,35,45])
add_line([sys,'/','Autopilot/YAutoC/G7 G8 G9'],[40,35;60,35])
add_line([sys,'/','Autopilot/YAutoC/G7 G8 G9'],[120,35;155,35])
add_line([sys,'/','Autopilot/YAutoC/G7 G8 G9'],[215,35;240,35])
add_line([sys,'/','Autopilot/YAutoC/G7 G8 G9'],[280,35;330,35])


%     Finished composite block 'Autopilot/YAutoC/G7 G8 G9'.

set_param([sys,'/','Autopilot/YAutoC/G7 G8 G9'],...
		'position',[605,175,635,225])


%     Subsystem  'Autopilot/YAutoC/G1 G3'.

new_system([sys,'/','Autopilot/YAutoC/G1 G3'])
set_param([sys,'/','Autopilot/YAutoC/G1 G3'],'Location',[100,100,300,300])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/G1 G3/In_1'])
set_param([sys,'/','Autopilot/YAutoC/G1 G3/In_1'],...
		'position',[15,25,35,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G1 G3/G3'])
set_param([sys,'/','Autopilot/YAutoC/G1 G3/G3'],...
		'Numerator','gn3',...
		'Denominator','gd3',...
		'position',[145,12,170,58])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G1 G3/G1'])
set_param([sys,'/','Autopilot/YAutoC/G1 G3/G1'],...
		'Numerator','gn1',...
		'Denominator','gd1',...
		'position',[80,12,105,58])

add_block('built-in/Outport',[sys,'/','Autopilot/YAutoC/G1 G3/Out_1'])
set_param([sys,'/','Autopilot/YAutoC/G1 G3/Out_1'],...
		'position',[205,25,225,45])
add_line([sys,'/','Autopilot/YAutoC/G1 G3'],[175,35;200,35])
add_line([sys,'/','Autopilot/YAutoC/G1 G3'],[110,35;140,35])
add_line([sys,'/','Autopilot/YAutoC/G1 G3'],[40,35;75,35])


%     Finished composite block 'Autopilot/YAutoC/G1 G3'.

set_param([sys,'/','Autopilot/YAutoC/G1 G3'],...
		'position',[245,125,275,175])


%     Subsystem  'Autopilot/YAutoC/G1 G2'.

new_system([sys,'/','Autopilot/YAutoC/G1 G2'])
set_param([sys,'/','Autopilot/YAutoC/G1 G2'],'Location',[100,100,300,300])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/G1 G2/In_1'])
set_param([sys,'/','Autopilot/YAutoC/G1 G2/In_1'],...
		'position',[10,25,30,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G1 G2/G1'])
set_param([sys,'/','Autopilot/YAutoC/G1 G2/G1'],...
		'Numerator','gn1',...
		'Denominator','gd1',...
		'position',[65,15,100,55])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G1 G2/G2'])
set_param([sys,'/','Autopilot/YAutoC/G1 G2/G2'],...
		'Numerator','gn2',...
		'Denominator','gd2',...
		'position',[135,15,170,55])

add_block('built-in/Outport',[sys,'/','Autopilot/YAutoC/G1 G2/Out_1'])
set_param([sys,'/','Autopilot/YAutoC/G1 G2/Out_1'],...
		'position',[210,25,230,45])
add_line([sys,'/','Autopilot/YAutoC/G1 G2'],[175,35;205,35])
add_line([sys,'/','Autopilot/YAutoC/G1 G2'],[105,35;130,35])
add_line([sys,'/','Autopilot/YAutoC/G1 G2'],[35,35;60,35])


%     Finished composite block 'Autopilot/YAutoC/G1 G2'.

set_param([sys,'/','Autopilot/YAutoC/G1 G2'],...
		'position',[245,55,275,105])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/K1 K2(1)'])
set_param([sys,'/','Autopilot/YAutoC/K1 K2(1)'],...
		'Gain','k1*k2',...
		'position',[245,10,275,40])

add_block('built-in/Outport',[sys,'/','Autopilot/YAutoC/U3'])
set_param([sys,'/','Autopilot/YAutoC/U3'],...
		'position',[660,195,680,205])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/K9'])
set_param([sys,'/','Autopilot/YAutoC/K9'],...
		'Gain','k9',...
		'position',[555,185,585,215])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/Y6'])
set_param([sys,'/','Autopilot/YAutoC/Y6'],...
		'Port','3',...
		'position',[25,170,45,180])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/K3'])
set_param([sys,'/','Autopilot/YAutoC/K3'],...
		'Gain','k3',...
		'position',[70,160,100,190])

add_block('built-in/Sum',[sys,'/','Autopilot/YAutoC/Sum'])
set_param([sys,'/','Autopilot/YAutoC/Sum'],...
		'inputs','2',...
		'position',[130,105,160,125])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/K1 K2(2)'])
set_param([sys,'/','Autopilot/YAutoC/K1 K2(2)'],...
		'Gain','k1*k2',...
		'position',[195,65,225,95])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/K2 K4'])
set_param([sys,'/','Autopilot/YAutoC/K2 K4'],...
		'Gain','k2*k4',...
		'position',[195,135,225,165])

add_block('built-in/Sum',[sys,'/','Autopilot/YAutoC/Sum2'])
set_param([sys,'/','Autopilot/YAutoC/Sum2'],...
		'inputs','-++++',...
		'position',[505,166,525,224])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/1.2'])
set_param([sys,'/','Autopilot/YAutoC/1.2'],...
		'Gain','1.2',...
		'position',[195,10,225,40])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G4'])
set_param([sys,'/','Autopilot/YAutoC/G4'],...
		'Numerator','gn4',...
		'Denominator','gd4',...
		'position',[150,217,175,263])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G5'])
set_param([sys,'/','Autopilot/YAutoC/G5'],...
		'Numerator','gn5',...
		'Denominator','gd5',...
		'position',[340,243,390,287])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/K2 K6'])
set_param([sys,'/','Autopilot/YAutoC/K2 K6'],...
		'Gain','k2*k6',...
		'position',[245,250,275,280])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/K2 K5'])
set_param([sys,'/','Autopilot/YAutoC/K2 K5'],...
		'Gain','k2*k5',...
		'position',[245,205,275,235])

add_block('built-in/Sum',[sys,'/','Autopilot/YAutoC/Sum1'])
set_param([sys,'/','Autopilot/YAutoC/Sum1'],...
		'inputs','2',...
		'position',[340,185,370,205])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/Y2'])
set_param([sys,'/','Autopilot/YAutoC/Y2'],...
		'Port','4',...
		'position',[25,235,45,245])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/Ncy'])
set_param([sys,'/','Autopilot/YAutoC/Ncy'],...
		'position',[25,20,45,30])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/Ny'])
set_param([sys,'/','Autopilot/YAutoC/Ny'],...
		'Port','2',...
		'position',[25,105,45,115])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/U2'])
set_param([sys,'/','Autopilot/YAutoC/U2'],...
		'Port','5',...
		'position',[25,325,45,335])

add_block('built-in/Gain',[sys,'/','Autopilot/YAutoC/K7 K10'])
set_param([sys,'/','Autopilot/YAutoC/K7 K10'],...
		'Gain','k7*k10',...
		'position',[245,315,275,345])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G10'])
set_param([sys,'/','Autopilot/YAutoC/G10'],...
		'Numerator','gn10',...
		'Denominator','gd10',...
		'position',[340,308,390,352])


%     Subsystem  'Autopilot/YAutoC/G6'.

new_system([sys,'/','Autopilot/YAutoC/G6'])
set_param([sys,'/','Autopilot/YAutoC/G6'],'Location',[100,100,300,300])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G6/G63'])
set_param([sys,'/','Autopilot/YAutoC/G6/G63'],...
		'Numerator','gn63',...
		'Denominator','gd63',...
		'position',[270,42,320,88])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G6/G62'])
set_param([sys,'/','Autopilot/YAutoC/G6/G62'],...
		'Numerator','gn62',...
		'Denominator','gd62',...
		'position',[190,42,240,88])

add_block('built-in/Outport',[sys,'/','Autopilot/YAutoC/G6/Out_1'])
set_param([sys,'/','Autopilot/YAutoC/G6/Out_1'],...
		'position',[680,55,700,75])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G6/G61'])
set_param([sys,'/','Autopilot/YAutoC/G6/G61'],...
		'Numerator','gn61',...
		'Denominator','gd61',...
		'position',[100,42,150,88])

add_block('built-in/Inport',[sys,'/','Autopilot/YAutoC/G6/In_1'])
set_param([sys,'/','Autopilot/YAutoC/G6/In_1'],...
		'position',[55,55,75,75])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G6/G64'])
set_param([sys,'/','Autopilot/YAutoC/G6/G64'],...
		'Numerator','gn64',...
		'Denominator','gd64',...
		'position',[355,42,405,88])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G6/G66'])
set_param([sys,'/','Autopilot/YAutoC/G6/G66'],...
		'Numerator','gn66',...
		'Denominator','gd66',...
		'position',[525,42,575,88])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G6/G65'])
set_param([sys,'/','Autopilot/YAutoC/G6/G65'],...
		'Numerator','gn65',...
		'Denominator','gd65',...
		'position',[445,42,495,88])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/YAutoC/G6/G67'])
set_param([sys,'/','Autopilot/YAutoC/G6/G67'],...
		'Numerator','gn67',...
		'Denominator','gd67',...
		'position',[600,42,650,88])
add_line([sys,'/','Autopilot/YAutoC/G6'],[245,65;265,65])
add_line([sys,'/','Autopilot/YAutoC/G6'],[155,65;185,65])
add_line([sys,'/','Autopilot/YAutoC/G6'],[80,65;95,65])
add_line([sys,'/','Autopilot/YAutoC/G6'],[410,65;440,65])
add_line([sys,'/','Autopilot/YAutoC/G6'],[500,65;520,65])
add_line([sys,'/','Autopilot/YAutoC/G6'],[325,65;350,65])
add_line([sys,'/','Autopilot/YAutoC/G6'],[580,65;595,65])
add_line([sys,'/','Autopilot/YAutoC/G6'],[655,65;675,65])


%     Finished composite block 'Autopilot/YAutoC/G6'.

set_param([sys,'/','Autopilot/YAutoC/G6'],...
		'position',[410,170,440,220])
add_line([sys,'/','Autopilot/YAutoC'],[640,200;655,200])
add_line([sys,'/','Autopilot/YAutoC'],[590,200;600,200])
add_line([sys,'/','Autopilot/YAutoC'],[50,240;145,240])
add_line([sys,'/','Autopilot/YAutoC'],[50,175;65,175])
add_line([sys,'/','Autopilot/YAutoC'],[50,110;125,110])
add_line([sys,'/','Autopilot/YAutoC'],[50,25;190,25])
add_line([sys,'/','Autopilot/YAutoC'],[530,195;550,200])
add_line([sys,'/','Autopilot/YAutoC'],[280,150;286,150;326,190;335,190])
add_line([sys,'/','Autopilot/YAutoC'],[230,150;240,150])
add_line([sys,'/','Autopilot/YAutoC'],[165,115;175,115;175,80;190,80])
add_line([sys,'/','Autopilot/YAutoC'],[165,115;175,115;175,150;190,150])
add_line([sys,'/','Autopilot/YAutoC'],[230,80;240,80])
add_line([sys,'/','Autopilot/YAutoC'],[280,80;370,80;475,185;500,185])
add_line([sys,'/','Autopilot/YAutoC'],[280,25;475,25;475,175;500,175])
add_line([sys,'/','Autopilot/YAutoC'],[105,175;115,175;125,120])
add_line([sys,'/','Autopilot/YAutoC'],[445,195;500,195])
add_line([sys,'/','Autopilot/YAutoC'],[375,195;405,195])
add_line([sys,'/','Autopilot/YAutoC'],[395,265;425,265;485,205;500,205])
add_line([sys,'/','Autopilot/YAutoC'],[280,220;305,220;325,200;335,200])
add_line([sys,'/','Autopilot/YAutoC'],[230,25;240,25])
add_line([sys,'/','Autopilot/YAutoC'],[180,240;205,240;205,265;240,265])
add_line([sys,'/','Autopilot/YAutoC'],[180,240;205,240;205,220;240,220])
add_line([sys,'/','Autopilot/YAutoC'],[280,265;335,265])
add_line([sys,'/','Autopilot/YAutoC'],[50,330;240,330])
add_line([sys,'/','Autopilot/YAutoC'],[280,330;335,330])
add_line([sys,'/','Autopilot/YAutoC'],[395,330;425,330;425,285;500,215])


%     Finished composite block 'Autopilot/YAutoC'.

set_param([sys,'/','Autopilot/YAutoC'],...
		'position',[155,101,195,159])


%     Subsystem  'Autopilot/PAutoC'.

new_system([sys,'/','Autopilot/PAutoC'])
set_param([sys,'/','Autopilot/PAutoC'],'Location',[0,0,707,370])


%     Subsystem  'Autopilot/PAutoC/G6'.

new_system([sys,'/','Autopilot/PAutoC/G6'])
set_param([sys,'/','Autopilot/PAutoC/G6'],'Location',[100,100,300,300])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G6/G67'])
set_param([sys,'/','Autopilot/PAutoC/G6/G67'],...
		'Numerator','gn67',...
		'Denominator','gd67',...
		'position',[565,12,615,58])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G6/G65'])
set_param([sys,'/','Autopilot/PAutoC/G6/G65'],...
		'Numerator','gn65',...
		'Denominator','gd65',...
		'position',[410,12,460,58])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G6/G66'])
set_param([sys,'/','Autopilot/PAutoC/G6/G66'],...
		'Numerator','gn66',...
		'Denominator','gd66',...
		'position',[490,12,540,58])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G6/G64'])
set_param([sys,'/','Autopilot/PAutoC/G6/G64'],...
		'Numerator','gn64',...
		'Denominator','gd64',...
		'position',[320,12,370,58])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/G6/In_1'])
set_param([sys,'/','Autopilot/PAutoC/G6/In_1'],...
		'position',[20,25,40,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G6/G61'])
set_param([sys,'/','Autopilot/PAutoC/G6/G61'],...
		'Numerator','gn61',...
		'Denominator','gd61',...
		'position',[65,12,115,58])

add_block('built-in/Outport',[sys,'/','Autopilot/PAutoC/G6/Out_1'])
set_param([sys,'/','Autopilot/PAutoC/G6/Out_1'],...
		'position',[645,25,665,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G6/G62'])
set_param([sys,'/','Autopilot/PAutoC/G6/G62'],...
		'Numerator','gn62',...
		'Denominator','gd62',...
		'position',[155,12,205,58])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G6/G63'])
set_param([sys,'/','Autopilot/PAutoC/G6/G63'],...
		'Numerator','gn63',...
		'Denominator','gd63',...
		'position',[235,12,285,58])
add_line([sys,'/','Autopilot/PAutoC/G6'],[620,35;640,35])
add_line([sys,'/','Autopilot/PAutoC/G6'],[545,35;560,35])
add_line([sys,'/','Autopilot/PAutoC/G6'],[290,35;315,35])
add_line([sys,'/','Autopilot/PAutoC/G6'],[465,35;485,35])
add_line([sys,'/','Autopilot/PAutoC/G6'],[375,35;405,35])
add_line([sys,'/','Autopilot/PAutoC/G6'],[45,35;60,35])
add_line([sys,'/','Autopilot/PAutoC/G6'],[120,35;150,35])
add_line([sys,'/','Autopilot/PAutoC/G6'],[210,35;230,35])


%     Finished composite block 'Autopilot/PAutoC/G6'.

set_param([sys,'/','Autopilot/PAutoC/G6'],...
		'position',[410,170,440,220])


%     Subsystem  'Autopilot/PAutoC/G7 G8 G9'.

new_system([sys,'/','Autopilot/PAutoC/G7 G8 G9'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9'],'Location',[100,100,300,300])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G7 G8 G9/G8'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/G8'],...
		'Numerator','gn8',...
		'Denominator','gd8',...
		'position',[230,13,290,57])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G7 G8 G9/G7'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/G7'],...
		'Numerator','gn7',...
		'Denominator','gd7',...
		'position',[105,13,165,57])


%     Subsystem  'Autopilot/PAutoC/G7 G8 G9/G91 G92'.

new_system([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92'],'Location',[100,100,300,300])

add_block('built-in/Outport',[sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92/Out_1'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92/Out_1'],...
		'position',[280,25,300,45])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92/In_1'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92/In_1'],...
		'position',[20,25,40,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92/G91'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92/G91'],...
		'Numerator','gn91',...
		'Denominator','gd91',...
		'position',[75,12,130,58])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92/G92'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92/G92'],...
		'Numerator','gn92',...
		'Denominator','gd92',...
		'position',[180,12,230,58])
add_line([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92'],[235,35;275,35])
add_line([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92'],[135,35;175,35])
add_line([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92'],[45,35;70,35])


%     Finished composite block 'Autopilot/PAutoC/G7 G8 G9/G91 G92'.

set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/G91 G92'],...
		'position',[370,10,400,60])

add_block('built-in/Outport',[sys,'/','Autopilot/PAutoC/G7 G8 G9/Out_1'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/Out_1'],...
		'position',[455,25,475,45])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/G7 G8 G9/In_1'])
set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9/In_1'],...
		'position',[15,25,35,45])
add_line([sys,'/','Autopilot/PAutoC/G7 G8 G9'],[40,35;100,35])
add_line([sys,'/','Autopilot/PAutoC/G7 G8 G9'],[170,35;225,35])
add_line([sys,'/','Autopilot/PAutoC/G7 G8 G9'],[295,35;365,35])
add_line([sys,'/','Autopilot/PAutoC/G7 G8 G9'],[405,35;450,35])


%     Finished composite block 'Autopilot/PAutoC/G7 G8 G9'.

set_param([sys,'/','Autopilot/PAutoC/G7 G8 G9'],...
		'position',[605,175,635,225])


%     Subsystem  'Autopilot/PAutoC/G1 G3'.

new_system([sys,'/','Autopilot/PAutoC/G1 G3'])
set_param([sys,'/','Autopilot/PAutoC/G1 G3'],'Location',[100,100,300,300])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/G1 G3/In_1'])
set_param([sys,'/','Autopilot/PAutoC/G1 G3/In_1'],...
		'position',[15,25,35,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G1 G3/G3'])
set_param([sys,'/','Autopilot/PAutoC/G1 G3/G3'],...
		'Numerator','gn3',...
		'Denominator','gd3',...
		'position',[145,12,170,58])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G1 G3/G1'])
set_param([sys,'/','Autopilot/PAutoC/G1 G3/G1'],...
		'Numerator','gn1',...
		'Denominator','gd1',...
		'position',[80,12,105,58])

add_block('built-in/Outport',[sys,'/','Autopilot/PAutoC/G1 G3/Out_1'])
set_param([sys,'/','Autopilot/PAutoC/G1 G3/Out_1'],...
		'position',[205,25,225,45])
add_line([sys,'/','Autopilot/PAutoC/G1 G3'],[175,35;200,35])
add_line([sys,'/','Autopilot/PAutoC/G1 G3'],[110,35;140,35])
add_line([sys,'/','Autopilot/PAutoC/G1 G3'],[40,35;75,35])


%     Finished composite block 'Autopilot/PAutoC/G1 G3'.

set_param([sys,'/','Autopilot/PAutoC/G1 G3'],...
		'position',[245,125,275,175])


%     Subsystem  'Autopilot/PAutoC/G1 G2'.

new_system([sys,'/','Autopilot/PAutoC/G1 G2'])
set_param([sys,'/','Autopilot/PAutoC/G1 G2'],'Location',[100,100,300,300])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/G1 G2/In_1'])
set_param([sys,'/','Autopilot/PAutoC/G1 G2/In_1'],...
		'position',[10,25,30,45])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G1 G2/G1'])
set_param([sys,'/','Autopilot/PAutoC/G1 G2/G1'],...
		'Numerator','gn1',...
		'Denominator','gd1',...
		'position',[65,15,100,55])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G1 G2/G2'])
set_param([sys,'/','Autopilot/PAutoC/G1 G2/G2'],...
		'Numerator','gn2',...
		'Denominator','gd2',...
		'position',[135,15,170,55])

add_block('built-in/Outport',[sys,'/','Autopilot/PAutoC/G1 G2/Out_1'])
set_param([sys,'/','Autopilot/PAutoC/G1 G2/Out_1'],...
		'position',[210,25,230,45])
add_line([sys,'/','Autopilot/PAutoC/G1 G2'],[175,35;205,35])
add_line([sys,'/','Autopilot/PAutoC/G1 G2'],[105,35;130,35])
add_line([sys,'/','Autopilot/PAutoC/G1 G2'],[35,35;60,35])


%     Finished composite block 'Autopilot/PAutoC/G1 G2'.

set_param([sys,'/','Autopilot/PAutoC/G1 G2'],...
		'position',[245,55,275,105])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/K1 K2(1)'])
set_param([sys,'/','Autopilot/PAutoC/K1 K2(1)'],...
		'Gain','k1*k2',...
		'position',[245,10,275,40])

add_block('built-in/Outport',[sys,'/','Autopilot/PAutoC/U1'])
set_param([sys,'/','Autopilot/PAutoC/U1'],...
		'position',[660,195,680,205])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/K9'])
set_param([sys,'/','Autopilot/PAutoC/K9'],...
		'Gain','k9',...
		'position',[555,185,585,215])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/Y4'])
set_param([sys,'/','Autopilot/PAutoC/Y4'],...
		'Port','3',...
		'position',[25,170,45,180])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/K3'])
set_param([sys,'/','Autopilot/PAutoC/K3'],...
		'Gain','k3',...
		'position',[70,160,100,190])

add_block('built-in/Sum',[sys,'/','Autopilot/PAutoC/Sum'])
set_param([sys,'/','Autopilot/PAutoC/Sum'],...
		'inputs','2',...
		'position',[130,105,160,125])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/K1 K2(2)'])
set_param([sys,'/','Autopilot/PAutoC/K1 K2(2)'],...
		'Gain','k1*k2',...
		'position',[195,65,225,95])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/K2 K4'])
set_param([sys,'/','Autopilot/PAutoC/K2 K4'],...
		'Gain','k2*k4',...
		'position',[195,135,225,165])

add_block('built-in/Sum',[sys,'/','Autopilot/PAutoC/Sum2'])
set_param([sys,'/','Autopilot/PAutoC/Sum2'],...
		'inputs','-++++',...
		'position',[505,166,525,224])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/1.2'])
set_param([sys,'/','Autopilot/PAutoC/1.2'],...
		'Gain','1.2',...
		'position',[195,10,225,40])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G4'])
set_param([sys,'/','Autopilot/PAutoC/G4'],...
		'Numerator','gn4',...
		'Denominator','gd4',...
		'position',[135,217,175,263])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G5'])
set_param([sys,'/','Autopilot/PAutoC/G5'],...
		'Numerator','gn5',...
		'Denominator','gd5',...
		'position',[345,242,390,288])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/K2 K6'])
set_param([sys,'/','Autopilot/PAutoC/K2 K6'],...
		'Gain','k2*k6',...
		'position',[245,250,275,280])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/K2 K5'])
set_param([sys,'/','Autopilot/PAutoC/K2 K5'],...
		'Gain','k2*k5',...
		'position',[245,205,275,235])

add_block('built-in/Sum',[sys,'/','Autopilot/PAutoC/Sum1'])
set_param([sys,'/','Autopilot/PAutoC/Sum1'],...
		'inputs','2',...
		'position',[340,185,370,205])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/Y1'])
set_param([sys,'/','Autopilot/PAutoC/Y1'],...
		'Port','4',...
		'position',[25,235,45,245])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/Ncp'])
set_param([sys,'/','Autopilot/PAutoC/Ncp'],...
		'position',[25,20,45,30])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/Np'])
set_param([sys,'/','Autopilot/PAutoC/Np'],...
		'Port','2',...
		'position',[25,105,45,115])

add_block('built-in/Inport',[sys,'/','Autopilot/PAutoC/U2'])
set_param([sys,'/','Autopilot/PAutoC/U2'],...
		'Port','5',...
		'position',[25,325,45,335])

add_block('built-in/Gain',[sys,'/','Autopilot/PAutoC/K7 K8'])
set_param([sys,'/','Autopilot/PAutoC/K7 K8'],...
		'Gain','k7*k8',...
		'position',[245,315,275,345])

add_block('built-in/Transfer Fcn',[sys,'/','Autopilot/PAutoC/G10'])
set_param([sys,'/','Autopilot/PAutoC/G10'],...
		'Numerator','gn10',...
		'Denominator','gd10',...
		'position',[345,308,390,352])
add_line([sys,'/','Autopilot/PAutoC'],[640,200;655,200])
add_line([sys,'/','Autopilot/PAutoC'],[590,200;600,200])
add_line([sys,'/','Autopilot/PAutoC'],[50,240;130,240])
add_line([sys,'/','Autopilot/PAutoC'],[50,175;65,175])
add_line([sys,'/','Autopilot/PAutoC'],[50,110;125,110])
add_line([sys,'/','Autopilot/PAutoC'],[50,25;190,25])
add_line([sys,'/','Autopilot/PAutoC'],[530,195;550,200])
add_line([sys,'/','Autopilot/PAutoC'],[280,150;286,150;326,190;335,190])
add_line([sys,'/','Autopilot/PAutoC'],[230,150;240,150])
add_line([sys,'/','Autopilot/PAutoC'],[165,115;175,115;175,80;190,80])
add_line([sys,'/','Autopilot/PAutoC'],[165,115;175,115;175,150;190,150])
add_line([sys,'/','Autopilot/PAutoC'],[230,80;240,80])
add_line([sys,'/','Autopilot/PAutoC'],[280,80;370,80;475,185;500,185])
add_line([sys,'/','Autopilot/PAutoC'],[280,25;475,25;475,175;500,175])
add_line([sys,'/','Autopilot/PAutoC'],[105,175;115,175;125,120])
add_line([sys,'/','Autopilot/PAutoC'],[445,195;500,195])
add_line([sys,'/','Autopilot/PAutoC'],[375,195;405,195])
add_line([sys,'/','Autopilot/PAutoC'],[395,265;425,265;485,205;500,205])
add_line([sys,'/','Autopilot/PAutoC'],[280,220;305,220;325,200;335,200])
add_line([sys,'/','Autopilot/PAutoC'],[230,25;240,25])
add_line([sys,'/','Autopilot/PAutoC'],[180,240;205,240;205,265;240,265])
add_line([sys,'/','Autopilot/PAutoC'],[180,240;205,240;205,220;240,220])
add_line([sys,'/','Autopilot/PAutoC'],[280,265;340,265])
add_line([sys,'/','Autopilot/PAutoC'],[50,330;240,330])
add_line([sys,'/','Autopilot/PAutoC'],[280,330;340,330])
add_line([sys,'/','Autopilot/PAutoC'],[395,330;425,330;425,285;500,215])


%     Finished composite block 'Autopilot/PAutoC'.

set_param([sys,'/','Autopilot/PAutoC'],...
		'position',[155,12,195,68])

add_block('built-in/Inport',[sys,'/','Autopilot/Y1'])
set_param([sys,'/','Autopilot/Y1'],...
		'Port','5',...
		'position',[95,65,115,85])

add_block('built-in/Inport',[sys,'/','Autopilot/Y4'])
set_param([sys,'/','Autopilot/Y4'],...
		'Port','6',...
		'position',[70,45,90,65])

add_block('built-in/Inport',[sys,'/','Autopilot/Np'])
set_param([sys,'/','Autopilot/Np'],...
		'Port','4',...
		'position',[40,30,60,50])

add_block('built-in/Inport',[sys,'/','Autopilot/Ncp'])
set_param([sys,'/','Autopilot/Ncp'],...
		'position',[15,10,35,30])

add_block('built-in/Outport',[sys,'/','Autopilot/U2'])
set_param([sys,'/','Autopilot/U2'],...
		'Port','2',...
		'position',[245,220,265,240])
add_line([sys,'/','Autopilot'],[200,230;240,230])
add_line([sys,'/','Autopilot'],[215,230;215,190;135,190;135,150;150,150])
add_line([sys,'/','Autopilot'],[215,190;285,190;285,95;135,95;135,60;150,60])
add_line([sys,'/','Autopilot'],[120,230;150,230])
add_line([sys,'/','Autopilot'],[120,165;125,140;150,140])
add_line([sys,'/','Autopilot'],[200,130;240,130])
add_line([sys,'/','Autopilot'],[90,150;100,130;150,130])
add_line([sys,'/','Autopilot'],[65,130;75,120;150,120])
add_line([sys,'/','Autopilot'],[40,110;150,110])
add_line([sys,'/','Autopilot'],[120,75;125,50;150,50])
add_line([sys,'/','Autopilot'],[200,40;235,40])
add_line([sys,'/','Autopilot'],[95,55;105,40;150,40])
add_line([sys,'/','Autopilot'],[65,40;75,30;150,30])
add_line([sys,'/','Autopilot'],[40,20;150,20])


%     Finished composite block 'Autopilot'.

set_param([sys,'/','Autopilot'],...
		'position',[195,14,235,226])

add_block('built-in/To Workspace',[sys,'/','Ny data'])
set_param([sys,'/','Ny data'],...
		'mat-name','Ny_data',...
		'position',[390,15,450,45])

add_block('built-in/Note',[sys,'/',' Ncy'])
set_param([sys,'/',' Ncy'],...
		'position',[176,31,181,36])

add_block('built-in/Note',[sys,'/',' Ncp'])
set_param([sys,'/',' Ncp'],...
		'position',[174,5,179,10])

add_block('built-in/Note',[sys,'/',' Ny'])
set_param([sys,'/',' Ny'],...
		'position',[177,55,182,60])

add_block('built-in/Note',[sys,'/',' Np'])
set_param([sys,'/',' Np'],...
		'position',[176,80,181,85])

add_block('built-in/Note',[sys,'/',' Y1'])
set_param([sys,'/',' Y1'],...
		'position',[179,104,184,109])

add_block('built-in/Note',[sys,'/',' Y4'])
set_param([sys,'/',' Y4'],...
		'position',[178,129,183,134])

add_block('built-in/Note',[sys,'/',' Y3'])
set_param([sys,'/',' Y3'],...
		'position',[177,154,182,159])

add_block('built-in/Note',[sys,'/',' Y2'])
set_param([sys,'/',' Y2'],...
		'position',[177,201,182,206])

add_block('built-in/Note',[sys,'/',' Y6'])
set_param([sys,'/',' Y6'],...
		'position',[176,177,181,182])

add_block('built-in/Note',[sys,'/','Y2'])
set_param([sys,'/','Y2'],...
		'position',[307,190,312,195])

add_block('built-in/Note',[sys,'/','Y6'])
set_param([sys,'/','Y6'],...
		'position',[307,160,312,165])

add_block('built-in/Note',[sys,'/','Y3'])
set_param([sys,'/','Y3'],...
		'position',[307,130,312,135])

add_block('built-in/Note',[sys,'/','Y4'])
set_param([sys,'/','Y4'],...
		'position',[307,100,312,105])

add_block('built-in/Note',[sys,'/','Y1'])
set_param([sys,'/','Y1'],...
		'position',[307,70,312,75])

add_block('built-in/Note',[sys,'/','Np '])
set_param([sys,'/','Np '],...
		'position',[312,40,317,45])

add_block('built-in/Note',[sys,'/','Ny '])
set_param([sys,'/','Ny '],...
		'position',[312,10,317,15])

add_block('built-in/Note',[sys,'/','U3'])
set_param([sys,'/','U3'],...
		'position',[237,165,249,172])

add_block('built-in/Note',[sys,'/','U2'])
set_param([sys,'/','U2'],...
		'position',[242,100,247,105])

add_block('built-in/Note',[sys,'/','U1'])
set_param([sys,'/','U1'],...
		'position',[242,30,247,35])

add_block('built-in/Step Fcn',[sys,'/','Ncy'])
set_param([sys,'/','Ncy'],...
		'Time','0',...
		'position',[25,64,50,86])

add_block('built-in/Step Fcn',[sys,'/','Ncp'])
set_param([sys,'/','Ncp'],...
		'Time','0',...
		'After','0',...
		'position',[25,9,50,31])


%     Subsystem  'Airframe'.

new_system([sys,'/','Airframe'])
set_param([sys,'/','Airframe'],'Location',[0,56,455,427])

add_block('built-in/Outport',[sys,'/','Airframe/Y6'])
set_param([sys,'/','Airframe/Y6'],...
		'Port','6',...
		'position',[370,275,390,295])

add_block('built-in/Outport',[sys,'/','Airframe/Np'])
set_param([sys,'/','Airframe/Np'],...
		'Port','2',...
		'position',[380,5,400,25])

add_block('built-in/Outport',[sys,'/','Airframe/Y1'])
set_param([sys,'/','Airframe/Y1'],...
		'Port','3',...
		'position',[350,30,370,50])

add_block('built-in/Outport',[sys,'/','Airframe/Y4'])
set_param([sys,'/','Airframe/Y4'],...
		'Port','4',...
		'position',[325,55,345,75])

add_block('built-in/Outport',[sys,'/','Airframe/Y3'])
set_param([sys,'/','Airframe/Y3'],...
		'Port','5',...
		'position',[330,140,350,160])

add_block('built-in/Outport',[sys,'/','Airframe/Y2'])
set_param([sys,'/','Airframe/Y2'],...
		'Port','7',...
		'position',[340,290,360,310])

add_block('built-in/Outport',[sys,'/','Airframe/Ny'])
set_param([sys,'/','Airframe/Ny'],...
		'position',[310,315,330,335])


%     Subsystem  'Airframe/PAC'.

new_system([sys,'/','Airframe/PAC'])
set_param([sys,'/','Airframe/PAC'],'Location',[0,0,706,471])

add_block('built-in/Outport',[sys,'/','Airframe/PAC/Y8'])
set_param([sys,'/','Airframe/PAC/Y8'],...
		'Port','4',...
		'position',[615,420,635,440])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/c4'])
set_param([sys,'/','Airframe/PAC/c4'],...
		'orientation',1,...
		'Gain','c4',...
		'position',[345,295,365,315])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a10'])
set_param([sys,'/','Airframe/PAC/a10'],...
		'Gain','a10',...
		'position',[205,337,225,353])

add_block('built-in/Outport',[sys,'/','Airframe/PAC/Y4'])
set_param([sys,'/','Airframe/PAC/Y4'],...
		'Port','3',...
		'position',[615,270,635,290])

add_block('built-in/Outport',[sys,'/','Airframe/PAC/Y1'])
set_param([sys,'/','Airframe/PAC/Y1'],...
		'Port','2',...
		'position',[615,230,635,250])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a11'])
set_param([sys,'/','Airframe/PAC/a11'],...
		'Gain','a11',...
		'position',[340,82,360,98])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a5'])
set_param([sys,'/','Airframe/PAC/a5'],...
		'orientation',3,...
		'Gain','a5',...
		'position',[255,135,275,155])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a9'])
set_param([sys,'/','Airframe/PAC/a9'],...
		'orientation',1,...
		'Gain','a9',...
		'position',[255,180,275,200])

add_block('built-in/Sum',[sys,'/','Airframe/PAC/Sum5'])
set_param([sys,'/','Airframe/PAC/Sum5'],...
		'inputs','3',...
		'position',[280,75,295,105])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a12'])
set_param([sys,'/','Airframe/PAC/a12'],...
		'Gain','a12',...
		'position',[425,82,445,98])

add_block('built-in/Sum',[sys,'/','Airframe/PAC/Sum10'])
set_param([sys,'/','Airframe/PAC/Sum10'],...
		'orientation',2,...
		'inputs','-+',...
		'position',[495,154,510,181])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a13'])
set_param([sys,'/','Airframe/PAC/a13'],...
		'orientation',2,...
		'Gain','a13',...
		'position',[430,157,450,173])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a14'])
set_param([sys,'/','Airframe/PAC/a14'],...
		'Gain','a14',...
		'position',[410,192,430,208])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a15'])
set_param([sys,'/','Airframe/PAC/a15'],...
		'orientation',2,...
		'Gain','a15',...
		'position',[535,192,555,208])

add_block('built-in/Integrator',[sys,'/','Airframe/PAC/Integrator2'])
set_param([sys,'/','Airframe/PAC/Integrator2'],...
		'position',[545,232,575,248])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a16'])
set_param([sys,'/','Airframe/PAC/a16'],...
		'Gain','a16',...
		'position',[505,232,525,248])

add_block('built-in/Sum',[sys,'/','Airframe/PAC/Sum11'])
set_param([sys,'/','Airframe/PAC/Sum11'],...
		'inputs','3',...
		'position',[470,225,485,255])

add_block('built-in/Sum',[sys,'/','Airframe/PAC/Sum6'])
set_param([sys,'/','Airframe/PAC/Sum6'],...
		'inputs','3',...
		'position',[285,235,300,265])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a7'])
set_param([sys,'/','Airframe/PAC/a7'],...
		'Gain','a7',...
		'position',[165,242,185,258])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a6'])
set_param([sys,'/','Airframe/PAC/a6'],...
		'Gain','a6',...
		'position',[165,187,185,203])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a8'])
set_param([sys,'/','Airframe/PAC/a8'],...
		'Gain','a8',...
		'position',[165,287,185,303])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a2'])
set_param([sys,'/','Airframe/PAC/a2'],...
		'Gain','a2',...
		'position',[165,82,185,98])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a3'])
set_param([sys,'/','Airframe/PAC/a3'],...
		'Gain','a3',...
		'position',[170,137,190,153])

add_block('built-in/Sum',[sys,'/','Airframe/PAC/Sum1'])
set_param([sys,'/','Airframe/PAC/Sum1'],...
		'inputs','3',...
		'position',[225,235,240,265])

add_block('built-in/Sum',[sys,'/','Airframe/PAC/Sum'])
set_param([sys,'/','Airframe/PAC/Sum'],...
		'inputs','3',...
		'position',[225,75,240,105])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a1'])
set_param([sys,'/','Airframe/PAC/a1'],...
		'Gain','a1',...
		'position',[175,47,195,63])

add_block('built-in/Inport',[sys,'/','Airframe/PAC/U3'])
set_param([sys,'/','Airframe/PAC/U3'],...
		'Port','3',...
		'position',[120,135,140,155])

add_block('built-in/Inport',[sys,'/','Airframe/PAC/U2'])
set_param([sys,'/','Airframe/PAC/U2'],...
		'Port','2',...
		'position',[85,80,105,100])

add_block('built-in/Inport',[sys,'/','Airframe/PAC/U1'])
set_param([sys,'/','Airframe/PAC/U1'],...
		'position',[50,45,70,65])

add_block('built-in/Inport',[sys,'/','Airframe/PAC/Y9'])
set_param([sys,'/','Airframe/PAC/Y9'],...
		'Port','4',...
		'position',[5,335,25,355])

add_block('built-in/Gain',[sys,'/','Airframe/PAC/a4'])
set_param([sys,'/','Airframe/PAC/a4'],...
		'Gain','a4',...
		'position',[235,17,255,33])

add_block('built-in/Integrator',[sys,'/','Airframe/PAC/Integrator'])
set_param([sys,'/','Airframe/PAC/Integrator'],...
		'orientation',2,...
		'position',[335,157,365,173])

add_block('built-in/Outport',[sys,'/','Airframe/PAC/C4'])
set_param([sys,'/','Airframe/PAC/C4'],...
		'Port','5',...
		'position',[615,370,635,390])

add_block('built-in/Outport',[sys,'/','Airframe/PAC/Np'])
set_param([sys,'/','Airframe/PAC/Np'],...
		'position',[610,55,630,75])
add_line([sys,'/','Airframe/PAC'],[330,165;330,430;610,430])
add_line([sys,'/','Airframe/PAC'],[330,165;330,280;355,290])
add_line([sys,'/','Airframe/PAC'],[30,345;200,345])
add_line([sys,'/','Airframe/PAC'],[580,240;610,240])
add_line([sys,'/','Airframe/PAC'],[365,90;365,65;605,65])
add_line([sys,'/','Airframe/PAC'],[245,90;275,90])
add_line([sys,'/','Airframe/PAC'],[265,130;275,100])
add_line([sys,'/','Airframe/PAC'],[260,25;265,25;275,80])
add_line([sys,'/','Airframe/PAC'],[300,90;335,90])
add_line([sys,'/','Airframe/PAC'],[365,90;420,90])
add_line([sys,'/','Airframe/PAC'],[450,90;535,90;535,160;515,160])
add_line([sys,'/','Airframe/PAC'],[425,165;370,165])
add_line([sys,'/','Airframe/PAC'],[490,170;455,165])
add_line([sys,'/','Airframe/PAC'],[305,250;465,250])
add_line([sys,'/','Airframe/PAC'],[425,165;395,165;405,200])
add_line([sys,'/','Airframe/PAC'],[435,200;445,200;445,240;465,240])
add_line([sys,'/','Airframe/PAC'],[580,240;595,240;595,175;515,175])
add_line([sys,'/','Airframe/PAC'],[530,200;455,200;465,230])
add_line([sys,'/','Airframe/PAC'],[490,240;500,240])
add_line([sys,'/','Airframe/PAC'],[230,345;265,345;265,260;280,260])
add_line([sys,'/','Airframe/PAC'],[245,250;280,250])
add_line([sys,'/','Airframe/PAC'],[265,205;265,240;280,240])
add_line([sys,'/','Airframe/PAC'],[580,240;595,240;595,200;560,200])
add_line([sys,'/','Airframe/PAC'],[530,240;530,280;610,280])
add_line([sys,'/','Airframe/PAC'],[530,240;540,240])
add_line([sys,'/','Airframe/PAC'],[75,55;75,295;160,295])
add_line([sys,'/','Airframe/PAC'],[110,90;110,250;160,250])
add_line([sys,'/','Airframe/PAC'],[145,145;145,195;160,195])
add_line([sys,'/','Airframe/PAC'],[145,145;165,145])
add_line([sys,'/','Airframe/PAC'],[190,195;220,240])
add_line([sys,'/','Airframe/PAC'],[190,250;220,250])
add_line([sys,'/','Airframe/PAC'],[190,295;220,260])
add_line([sys,'/','Airframe/PAC'],[190,90;220,90])
add_line([sys,'/','Airframe/PAC'],[200,55;220,80])
add_line([sys,'/','Airframe/PAC'],[195,145;220,100])
add_line([sys,'/','Airframe/PAC'],[75,55;170,55])
add_line([sys,'/','Airframe/PAC'],[110,90;160,90])
add_line([sys,'/','Airframe/PAC'],[30,345;30,25;230,25])
add_line([sys,'/','Airframe/PAC'],[330,165;265,175])
add_line([sys,'/','Airframe/PAC'],[330,165;265,160])
add_line([sys,'/','Airframe/PAC'],[355,320;355,380;610,380])


%     Finished composite block 'Airframe/PAC'.

set_param([sys,'/','Airframe/PAC'],...
		'position',[220,12,265,78])


%     Subsystem  'Airframe/YAC'.

new_system([sys,'/','Airframe/YAC'])
set_param([sys,'/','Airframe/YAC'],'Location',[100,100,300,300])

add_block('built-in/Outport',[sys,'/','Airframe/YAC/Ny'])
set_param([sys,'/','Airframe/YAC/Ny'],...
		'Port','5',...
		'position',[695,360,715,380])

add_block('built-in/Outport',[sys,'/','Airframe/YAC/Y9'])
set_param([sys,'/','Airframe/YAC/Y9'],...
		'Port','2',...
		'position',[695,405,715,425])

add_block('built-in/Outport',[sys,'/','Airframe/YAC/Y2'])
set_param([sys,'/','Airframe/YAC/Y2'],...
		'Port','4',...
		'position',[690,155,710,175])

add_block('built-in/Outport',[sys,'/','Airframe/YAC/Y6'])
set_param([sys,'/','Airframe/YAC/Y6'],...
		'Port','3',...
		'position',[690,115,710,135])

add_block('built-in/Outport',[sys,'/','Airframe/YAC/C5'])
set_param([sys,'/','Airframe/YAC/C5'],...
		'position',[690,65,710,85])

add_block('built-in/Inport',[sys,'/','Airframe/YAC/U3'])
set_param([sys,'/','Airframe/YAC/U3'],...
		'Port','6',...
		'position',[70,365,90,385])

add_block('built-in/Inport',[sys,'/','Airframe/YAC/U2'])
set_param([sys,'/','Airframe/YAC/U2'],...
		'Port','5',...
		'position',[105,315,125,335])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b10'])
set_param([sys,'/','Airframe/YAC/b10'],...
		'Gain','b10',...
		'position',[240,87,260,103])

add_block('built-in/Inport',[sys,'/','Airframe/YAC/U1'])
set_param([sys,'/','Airframe/YAC/U1'],...
		'Port','4',...
		'position',[145,255,165,275])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b6'])
set_param([sys,'/','Airframe/YAC/b6'],...
		'Gain','b6',...
		'position',[190,102,210,118])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b7'])
set_param([sys,'/','Airframe/YAC/b7'],...
		'Gain','b7',...
		'position',[190,152,210,168])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b8'])
set_param([sys,'/','Airframe/YAC/b8'],...
		'Gain','b8',...
		'position',[190,197,210,213])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b2'])
set_param([sys,'/','Airframe/YAC/b2'],...
		'Gain','b2',...
		'position',[190,317,210,333])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b3'])
set_param([sys,'/','Airframe/YAC/b3'],...
		'Gain','b3',...
		'position',[190,367,210,383])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b1'])
set_param([sys,'/','Airframe/YAC/b1'],...
		'Gain','b1',...
		'position',[195,257,215,273])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b12'])
set_param([sys,'/','Airframe/YAC/b12'],...
		'Gain','b12',...
		'position',[480,317,500,333])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b11'])
set_param([sys,'/','Airframe/YAC/b11'],...
		'Gain','b11',...
		'position',[395,317,415,333])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b5'])
set_param([sys,'/','Airframe/YAC/b5'],...
		'Gain','b5',...
		'position',[270,372,290,388])

add_block('built-in/Sum',[sys,'/','Airframe/YAC/Sum9'])
set_param([sys,'/','Airframe/YAC/Sum9'],...
		'inputs','3',...
		'position',[325,310,340,340])

add_block('built-in/Sum',[sys,'/','Airframe/YAC/Sum4'])
set_param([sys,'/','Airframe/YAC/Sum4'],...
		'inputs','3',...
		'position',[260,310,275,340])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b13'])
set_param([sys,'/','Airframe/YAC/b13'],...
		'Gain','b13',...
		'position',[460,207,480,223])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b15'])
set_param([sys,'/','Airframe/YAC/b15'],...
		'orientation',2,...
		'Gain','b15',...
		'position',[590,207,610,223])

add_block('built-in/Sum',[sys,'/','Airframe/YAC/Sum8'])
set_param([sys,'/','Airframe/YAC/Sum8'],...
		'inputs','3',...
		'position',[320,145,335,175])

add_block('built-in/Sum',[sys,'/','Airframe/YAC/Sum3'])
set_param([sys,'/','Airframe/YAC/Sum3'],...
		'inputs','3',...
		'position',[250,145,265,175])

add_block('built-in/Sum',[sys,'/','Airframe/YAC/Sum12'])
set_param([sys,'/','Airframe/YAC/Sum12'],...
		'inputs','-+++',...
		'position',[515,145,530,185])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b14'])
set_param([sys,'/','Airframe/YAC/b14'],...
		'orientation',1,...
		'Gain','b14',...
		'position',[490,100,510,120])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b16'])
set_param([sys,'/','Airframe/YAC/b16'],...
		'Gain','b16',...
		'position',[550,157,570,173])

add_block('built-in/Integrator',[sys,'/','Airframe/YAC/Integrator3'])
set_param([sys,'/','Airframe/YAC/Integrator3'],...
		'position',[590,157,620,173])

add_block('built-in/Sum',[sys,'/','Airframe/YAC/Sum13'])
set_param([sys,'/','Airframe/YAC/Sum13'],...
		'orientation',2,...
		'inputs','-++',...
		'position',[530,235,540,275])

add_block('built-in/Integrator',[sys,'/','Airframe/YAC/Integrator4'])
set_param([sys,'/','Airframe/YAC/Integrator4'],...
		'orientation',2,...
		'position',[370,252,400,268])

add_block('built-in/Inport',[sys,'/','Airframe/YAC/Y8'])
set_param([sys,'/','Airframe/YAC/Y8'],...
		'Port','3',...
		'position',[20,85,40,105])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/c5'])
set_param([sys,'/','Airframe/YAC/c5'],...
		'orientation',3,...
		'Gain','c5',...
		'position',[355,115,375,135])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b4'])
set_param([sys,'/','Airframe/YAC/b4'],...
		'orientation',1,...
		'Gain','b4',...
		'position',[295,285,315,305])

add_block('built-in/Gain',[sys,'/','Airframe/YAC/b9'])
set_param([sys,'/','Airframe/YAC/b9'],...
		'orientation',3,...
		'Gain','b9',...
		'position',[295,210,315,230])

add_block('built-in/Inport',[sys,'/','Airframe/YAC/Y3'])
set_param([sys,'/','Airframe/YAC/Y3'],...
		'Port','2',...
		'position',[20,45,40,65])

add_block('built-in/Inport',[sys,'/','Airframe/YAC/B17'])
set_param([sys,'/','Airframe/YAC/B17'],...
		'position',[20,5,40,25])
add_line([sys,'/','Airframe/YAC'],[365,110;365,75;685,75])
add_line([sys,'/','Airframe/YAC'],[575,165;575,125;685,125])
add_line([sys,'/','Airframe/YAC'],[95,375;95,110;185,110])
add_line([sys,'/','Airframe/YAC'],[130,325;130,160;185,160])
add_line([sys,'/','Airframe/YAC'],[170,265;170,205;185,205])
add_line([sys,'/','Airframe/YAC'],[420,325;420,370;690,370])
add_line([sys,'/','Airframe/YAC'],[365,260;365,415;690,415])
add_line([sys,'/','Airframe/YAC'],[95,375;185,375])
add_line([sys,'/','Airframe/YAC'],[130,325;185,325])
add_line([sys,'/','Airframe/YAC'],[170,265;190,265])
add_line([sys,'/','Airframe/YAC'],[575,165;585,165])
add_line([sys,'/','Airframe/YAC'],[625,165;685,165])
add_line([sys,'/','Airframe/YAC'],[525,255;430,255;430,215;455,215])
add_line([sys,'/','Airframe/YAC'],[525,255;405,260])
add_line([sys,'/','Airframe/YAC'],[345,325;390,325])
add_line([sys,'/','Airframe/YAC'],[420,325;475,325])
add_line([sys,'/','Airframe/YAC'],[340,160;510,160])
add_line([sys,'/','Airframe/YAC'],[295,380;305,380;305,335;320,335])
add_line([sys,'/','Airframe/YAC'],[305,310;305,315;320,315])
add_line([sys,'/','Airframe/YAC'],[305,205;315,170])
add_line([sys,'/','Airframe/YAC'],[215,375;255,335])
add_line([sys,'/','Airframe/YAC'],[215,325;255,325])
add_line([sys,'/','Airframe/YAC'],[220,265;255,315])
add_line([sys,'/','Airframe/YAC'],[485,215;490,215;490,170;510,170])
add_line([sys,'/','Airframe/YAC'],[625,165;650,165;650,215;615,215])
add_line([sys,'/','Airframe/YAC'],[585,215;500,215;510,180])
add_line([sys,'/','Airframe/YAC'],[265,95;280,95;280,150;315,150])
add_line([sys,'/','Airframe/YAC'],[270,160;315,160])
add_line([sys,'/','Airframe/YAC'],[215,110;245,150])
add_line([sys,'/','Airframe/YAC'],[215,160;245,160])
add_line([sys,'/','Airframe/YAC'],[215,205;245,170])
add_line([sys,'/','Airframe/YAC'],[625,165;650,165;650,240;545,240])
add_line([sys,'/','Airframe/YAC'],[365,260;365,140])
add_line([sys,'/','Airframe/YAC'],[500,125;510,150])
add_line([sys,'/','Airframe/YAC'],[535,165;545,165])
add_line([sys,'/','Airframe/YAC'],[505,325;585,325;585,270;545,270])
add_line([sys,'/','Airframe/YAC'],[280,325;320,325])
add_line([sys,'/','Airframe/YAC'],[45,95;235,95])
add_line([sys,'/','Airframe/YAC'],[45,95;45,420;225,420;265,380])
add_line([sys,'/','Airframe/YAC'],[45,55;455,55;500,95])
add_line([sys,'/','Airframe/YAC'],[365,260;305,235])
add_line([sys,'/','Airframe/YAC'],[365,260;305,280])
add_line([sys,'/','Airframe/YAC'],[45,15;735,15;735,255;545,255])


%     Finished composite block 'Airframe/YAC'.

set_param([sys,'/','Airframe/YAC'],...
		'position',[220,254,265,316])

add_block('built-in/Inport',[sys,'/','Airframe/U1'])
set_param([sys,'/','Airframe/U1'],...
		'position',[10,100,30,120])

add_block('built-in/Inport',[sys,'/','Airframe/U2'])
set_param([sys,'/','Airframe/U2'],...
		'Port','2',...
		'position',[40,135,60,155])

add_block('built-in/Inport',[sys,'/','Airframe/U3'])
set_param([sys,'/','Airframe/U3'],...
		'Port','3',...
		'position',[70,165,90,185])


%     Subsystem  'Airframe/RAC'.

new_system([sys,'/','Airframe/RAC'])
set_param([sys,'/','Airframe/RAC'],'Location',[0,56,701,324])

add_block('built-in/Outport',[sys,'/','Airframe/RAC/B17'])
set_param([sys,'/','Airframe/RAC/B17'],...
		'Port','2',...
		'position',[640,200,660,220])

add_block('built-in/Outport',[sys,'/','Airframe/RAC/Y3'])
set_param([sys,'/','Airframe/RAC/Y3'],...
		'position',[645,30,665,50])

add_block('built-in/Inport',[sys,'/','Airframe/RAC/C5'])
set_param([sys,'/','Airframe/RAC/C5'],...
		'Port','5',...
		'position',[25,245,45,265])

add_block('built-in/Inport',[sys,'/','Airframe/RAC/C4'])
set_param([sys,'/','Airframe/RAC/C4'],...
		'position',[25,5,45,25])

add_block('built-in/Inport',[sys,'/','Airframe/RAC/U3'])
set_param([sys,'/','Airframe/RAC/U3'],...
		'Port','4',...
		'position',[25,185,45,205])

add_block('built-in/Gain',[sys,'/','Airframe/RAC/c3'])
set_param([sys,'/','Airframe/RAC/c3'],...
		'Gain','c3',...
		'position',[70,187,90,203])

add_block('built-in/Inport',[sys,'/','Airframe/RAC/U1'])
set_param([sys,'/','Airframe/RAC/U1'],...
		'Port','2',...
		'position',[25,60,45,80])

add_block('built-in/Gain',[sys,'/','Airframe/RAC/c1'])
set_param([sys,'/','Airframe/RAC/c1'],...
		'Gain','c1',...
		'position',[70,62,90,78])

add_block('built-in/Gain',[sys,'/','Airframe/RAC/c6'])
set_param([sys,'/','Airframe/RAC/c6'],...
		'orientation',2,...
		'Gain','c6',...
		'position',[360,77,380,93])

add_block('built-in/Integrator',[sys,'/','Airframe/RAC/Integrator5'])
set_param([sys,'/','Airframe/RAC/Integrator5'],...
		'position',[415,117,445,133])

add_block('built-in/Gain',[sys,'/','Airframe/RAC/c7'])
set_param([sys,'/','Airframe/RAC/c7'],...
		'Gain','c7',...
		'position',[360,117,380,133])

add_block('built-in/Sum',[sys,'/','Airframe/RAC/Sum7'])
set_param([sys,'/','Airframe/RAC/Sum7'],...
		'inputs','4',...
		'position',[305,105,320,145])

add_block('built-in/Sum',[sys,'/','Airframe/RAC/Sum2'])
set_param([sys,'/','Airframe/RAC/Sum2'],...
		'inputs','3',...
		'position',[120,115,135,145])

add_block('built-in/Gain',[sys,'/','Airframe/RAC/c2'])
set_param([sys,'/','Airframe/RAC/c2'],...
		'Gain','c2',...
		'position',[70,122,90,138])

add_block('built-in/Gain',[sys,'/','Airframe/RAC/b17'])
set_param([sys,'/','Airframe/RAC/b17'],...
		'orientation',1,...
		'Gain','b17',...
		'position',[530,150,550,170])

add_block('built-in/Inport',[sys,'/','Airframe/RAC/U2'])
set_param([sys,'/','Airframe/RAC/U2'],...
		'Port','3',...
		'position',[25,120,45,140])
add_line([sys,'/','Airframe/RAC'],[540,175;540,210;635,210])
add_line([sys,'/','Airframe/RAC'],[450,125;540,125;540,40;640,40])
add_line([sys,'/','Airframe/RAC'],[50,255;228,255;228,140;300,140])
add_line([sys,'/','Airframe/RAC'],[50,15;225,15;225,120;300,120])
add_line([sys,'/','Airframe/RAC'],[50,195;65,195])
add_line([sys,'/','Airframe/RAC'],[50,70;65,70])
add_line([sys,'/','Airframe/RAC'],[355,85;280,85;280,110;300,110])
add_line([sys,'/','Airframe/RAC'],[450,125;475,125;475,85;385,85])
add_line([sys,'/','Airframe/RAC'],[385,125;410,125])
add_line([sys,'/','Airframe/RAC'],[325,125;355,125])
add_line([sys,'/','Airframe/RAC'],[140,130;300,130])
add_line([sys,'/','Airframe/RAC'],[95,195;115,140])
add_line([sys,'/','Airframe/RAC'],[95,130;115,130])
add_line([sys,'/','Airframe/RAC'],[95,70;115,120])
add_line([sys,'/','Airframe/RAC'],[450,125;540,125;540,145])
add_line([sys,'/','Airframe/RAC'],[50,130;65,130])


%     Finished composite block 'Airframe/RAC'.

set_param([sys,'/','Airframe/RAC'],...
		'position',[220,134,265,196])
add_line([sys,'/','Airframe'],[270,75;280,75;280,95;205,125;215,145])
add_line([sys,'/','Airframe'],[270,15;375,15])
add_line([sys,'/','Airframe'],[270,30;320,30;345,40])
add_line([sys,'/','Airframe'],[270,45;300,45;320,65])
add_line([sys,'/','Airframe'],[270,180;280,180;280,215;200,240;200,260;215,260])
add_line([sys,'/','Airframe'],[270,305;290,305;305,325])
add_line([sys,'/','Airframe'],[270,295;305,295;335,300])
add_line([sys,'/','Airframe'],[270,285;365,285])
add_line([sys,'/','Airframe'],[270,275;305,275;305,120;205,95;215,70])
add_line([sys,'/','Airframe'],[270,60;292,60;292,105;180,105;180,280;215,280])
add_line([sys,'/','Airframe'],[270,265;280,265;280,245;200,215;200,185;215,185])
add_line([sys,'/','Airframe'],[270,150;325,150])
add_line([sys,'/','Airframe'],[290,150;290,230;190,230;190,270;215,270])
add_line([sys,'/','Airframe'],[35,110;115,155;215,155])
add_line([sys,'/','Airframe'],[115,155;115,290;215,290])
add_line([sys,'/','Airframe'],[65,145;110,165;215,165])
add_line([sys,'/','Airframe'],[125,165;125,300;215,300])
add_line([sys,'/','Airframe'],[95,175;215,175])
add_line([sys,'/','Airframe'],[135,175;135,310;215,310])
add_line([sys,'/','Airframe'],[125,155;125,25;215,25])
add_line([sys,'/','Airframe'],[135,165;135,40;215,40])
add_line([sys,'/','Airframe'],[145,175;145,55;215,55])


%     Finished composite block 'Airframe'.

set_param([sys,'/','Airframe'],...
		'position',[260,14,295,226])

add_block('built-in/Scope',[sys,'/','Ny'])
set_param([sys,'/','Ny'],...
		'Vgain','1.500000',...
		'Hgain','10.200000',...
		'Vmax','2.000000',...
		'Hmax','20.400000',...
		'Window',[538,163,794,329],...
		'position',[390,71,425,109])
add_line(sys,[300,210;317,210;317,245;162,245;162,220;190,220])
add_line(sys,[300,180;322,180;322,250;157,250;157,195;190,195])
add_line(sys,[300,150;327,150;327,255;152,255;152,170;190,170])
add_line(sys,[300,120;332,120;332,260;147,260;147,145;190,145])
add_line(sys,[300,90;337,90;337,265;142,265;142,120;190,120])
add_line(sys,[300,60;345,60;345,270;137,270;137,95;190,95])
add_line(sys,[55,20;190,20])
add_line(sys,[240,50;255,50])
add_line(sys,[240,120;255,120])
add_line(sys,[240,190;255,190])
add_line(sys,[55,75;80,75;80,45;190,45])
add_line(sys,[300,30;385,30])
add_line(sys,[355,30;355,280;125,280;125,70;190,70])
add_line(sys,[355,90;385,90])

drawnow

% Return any arguments.
if (nargin | nargout)
	% Must use feval here to access system in memory
	if (nargin > 3)
		if (flag == 0)
			eval(['[ret,x0,str,ts,xts]=',sys,'(t,x,u,flag);'])
		else
			eval(['ret =', sys,'(t,x,u,flag);'])
		end
	else
		[ret,x0,str,ts,xts] = feval(sys);
	end
else
	drawnow % Flash up the model and execute load callback
end
