function [ret,x0,str,ts,xts]=ben2asys(t,x,u,flag);
%BEN2ASYS	is the M-file description of the SIMULINK system named BEN2ASYS.
%	The block-diagram can be displayed by typing: BEN2ASYS.
%
%	SYS=BEN2ASYS(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 BEN2ASYS 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 BEN2ASYS with a FLAG of zero:
%	[SIZES]=BEN2ASYS([],[],[],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.
%	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',[51,102,663,320])
     open_system(sys)
end;
set_param(sys,'algorithm',     'RK-45')
set_param(sys,'Start time',    '0.0')
set_param(sys,'Stop time',     '5')
set_param(sys,'Min step size', '0.0001')
set_param(sys,'Max step size', '10')
set_param(sys,'Relative error','1e-3')
set_param(sys,'Return vars',   '')
set_param(sys,'Load callback','ben2adat');

add_block('built-in/Sum',[sys,'/','Sum'])
set_param([sys,'/','Sum'],...
		'hide name',0,...
		'position',[130,20,150,40])

add_block('built-in/Outport',[sys,'/','y'])
set_param([sys,'/','y'],...
		'position',[550,135,570,155])

add_block('built-in/To Workspace',[sys,'/','Np_data'])
set_param([sys,'/','Np_data'],...
		'ForeGround',17248,...
		'mat-name','Np_data',...
		'position',[535,25,595,45])

add_block('built-in/Step Fcn',[sys,'/','Ncp'])
set_param([sys,'/','Ncp'],...
		'Time','0',...
		'position',[15,10,55,40])

add_block('built-in/Note',[sys,'/','Np '])
set_param([sys,'/','Np '],...
		'position',[413,18,418,23])

add_block('built-in/Note',[sys,'/','Ncp  '])
set_param([sys,'/','Ncp  '],...
		'position',[195,5,229,13])

add_block('built-in/Note',[sys,'/',' Y1       '])
set_param([sys,'/',' Y1       '],...
		'position',[423,59,433,70])

add_block('built-in/Note',[sys,'/','Y4      '])
set_param([sys,'/','Y4      '],...
		'position',[422,32,432,43])


%     Subsystem  ['Pitch Aircraft',13,'Channel'].

new_system([sys,'/',['Pitch Aircraft',13,'Channel']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel']],'Location',[0,0,578,274])

add_block('built-in/Outport',[sys,'/',['Pitch Aircraft',13,'Channel/Np_1']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Np_1']],...
		'position',[505,10,520,30])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain1']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain1']],...
		'hide name',0,...
		'Gain','a8',...
		'position',[70,165,105,195])

add_block('built-in/Outport',[sys,'/',['Pitch Aircraft',13,'Channel/Y4_2']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Y4_2']],...
		'Port','2',...
		'position',[510,200,525,220])

add_block('built-in/Integrator',[sys,'/',['Pitch Aircraft',13,'Channel/Integrator']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Integrator']],...
		'hide name',0,...
		'position',[445,157,475,173])

add_block('built-in/Sum',[sys,'/',['Pitch Aircraft',13,'Channel/Sum3']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Sum3']],...
		'hide name',0,...
		'inputs','2',...
		'position',[135,165,150,185])

add_block('built-in/Integrator',[sys,'/',['Pitch Aircraft',13,'Channel/Integrator1']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Integrator1']],...
		'orientation',2,...
		'hide name',0,...
		'position',[190,84,220,106])

add_block('built-in/Sum',[sys,'/',['Pitch Aircraft',13,'Channel/Sum1']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Sum1']],...
		'hide name',0,...
		'inputs','3',...
		'position',[335,150,350,180])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain5']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain5']],...
		'hide name',0,...
		'Gain','a12',...
		'position',[325,30,375,60])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain4']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain4']],...
		'hide name',0,...
		'Gain','a11',...
		'position',[225,30,275,60])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain7']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain7']],...
		'hide name',0,...
		'Gain','a14',...
		'position',[260,115,295,145])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain9']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain9']],...
		'hide name',0,...
		'Gain','a16',...
		'position',[370,150,415,180])

add_block('built-in/Sum',[sys,'/',['Pitch Aircraft',13,'Channel/Sum']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Sum']],...
		'orientation',2,...
		'hide name',0,...
		'inputs','-+',...
		'position',[390,85,405,105])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain10']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain10']],...
		'orientation',2,...
		'hide name',0,...
		'Gain','a9',...
		'position',[130,100,160,130])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain11']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain11']],...
		'orientation',2,...
		'hide name',0,...
		'Gain','a5',...
		'position',[130,60,160,90])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain8']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain8']],...
		'orientation',2,...
		'hide name',0,...
		'Gain','a15',...
		'position',[415,115,445,145])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain6']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain6']],...
		'orientation',2,...
		'hide name',0,...
		'Gain','a13',...
		'position',[260,80,290,110])

add_block('built-in/Outport',[sys,'/',['Pitch Aircraft',13,'Channel/Y1_3']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Y1_3']],...
		'Port','3',...
		'position',[510,155,525,175])

add_block('built-in/Gain',[sys,'/',['Pitch Aircraft',13,'Channel/Gain']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Gain']],...
		'hide name',0,...
		'Gain','a1',...
		'position',[75,25,105,55])

add_block('built-in/Inport',[sys,'/',['Pitch Aircraft',13,'Channel/U']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/U']],...
		'position',[20,29,35,51])

add_block('built-in/Sum',[sys,'/',['Pitch Aircraft',13,'Channel/Sum2']])
set_param([sys,'/',['Pitch Aircraft',13,'Channel/Sum2']],...
		'hide name',0,...
		'inputs','2',...
		'position',[140,35,155,55])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[185,95;175,95;165,115])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[175,95;165,75])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[480,165;505,165])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[40,40;70,40])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[110,40;135,40])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[125,75;135,50])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[110,180;130,180])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[125,115;120,115;130,170])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[160,45;220,45])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[280,45;320,45])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[255,95;225,95])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[155,175;330,175])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[355,165;365,165])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[420,165;440,165])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[410,130;325,130;330,155])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[380,45;490,45;490,90;410,90])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[385,95;295,95])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[490,165;490,100;410,100])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[490,130;450,130])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[430,165;430,210;505,210])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[50,40;50,180;65,180])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[300,130;310,130;310,165;330,165])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[235,95;235,130;255,130])
add_line([sys,'/',['Pitch Aircraft',13,'Channel']],[300,45;300,20;500,20])


%     Finished composite block ['Pitch Aircraft',13,'Channel'].

set_param([sys,'/',['Pitch Aircraft',13,'Channel']],...
		'position',[345,20,395,100])

add_block('built-in/Note',[sys,'/',' U '])
set_param([sys,'/',' U '],...
		'position',[300,40,305,45])


%     Subsystem  ['Pitch Autopilot',13,'Channel'].

new_system([sys,'/',['Pitch Autopilot',13,'Channel']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel']],'Location',[0,56,587,363])

add_block('built-in/Sum',[sys,'/',['Pitch Autopilot',13,'Channel/Sum1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Sum1']],...
		'hide name',0,...
		'inputs','2',...
		'position',[340,190,370,210])


%     Subsystem  ['Pitch Autopilot',13,'Channel/G6'].

new_system([sys,'/',['Pitch Autopilot',13,'Channel/G6']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G6']],'Location',[100,100,300,300])

add_block('built-in/Outport',[sys,'/',['Pitch Autopilot',13,'Channel/G6/Out_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G6/Out_1']],...
		'position',[295,30,315,40])

add_block('built-in/Inport',[sys,'/',['Pitch Autopilot',13,'Channel/G6/In_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G6/In_1']],...
		'position',[25,30,45,40])

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/G6/Transfer Fcn2']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G6/Transfer Fcn2']],...
		'hide name',0,...
		'Numerator','gn61',...
		'Denominator','gd61',...
		'position',[70,12,120,58])

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/G6/Transfer Fcn3']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G6/Transfer Fcn3']],...
		'hide name',0,...
		'Numerator','gn62',...
		'Denominator','gd62',...
		'position',[140,12,190,58])

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/G6/Transfer Fcn4']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G6/Transfer Fcn4']],...
		'hide name',0,...
		'Numerator','gn63',...
		'Denominator','gd63',...
		'position',[220,12,270,58])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G6']],[50,35;65,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G6']],[125,35;135,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G6']],[195,35;215,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G6']],[275,35;290,35])


%     Finished composite block ['Pitch Autopilot',13,'Channel/G6'].

set_param([sys,'/',['Pitch Autopilot',13,'Channel/G6']],...
		'position',[405,175,435,225])

add_block('built-in/Gain',[sys,'/',['Pitch Autopilot',13,'Channel/Gain7']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Gain7']],...
		'hide name',0,...
		'Gain','k9',...
		'position',[555,180,585,210])

add_block('built-in/Sum',[sys,'/',['Pitch Autopilot',13,'Channel/Sum2']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Sum2']],...
		'hide name',0,...
		'inputs','-+++',...
		'position',[505,172,525,218])


%     Subsystem  ['Pitch Autopilot',13,'Channel/G7G8G9'].

new_system([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9']],'Location',[100,100,300,300])


%     Subsystem  ['Pitch Autopilot',13,'Channel/G7G8G9/G9'].

new_system([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9']],'Location',[100,100,300,300])

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9/Transfer Fcn8']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9/Transfer Fcn8']],...
		'hide name',0,...
		'Numerator','gn92',...
		'Denominator','gd92',...
		'position',[155,15,210,55])

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9/Transfer Fcn7']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9/Transfer Fcn7']],...
		'hide name',0,...
		'Numerator','gn91',...
		'Denominator','gd91',...
		'position',[70,15,125,55])

add_block('built-in/Outport',[sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9/Out_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9/Out_1']],...
		'position',[260,30,280,40])

add_block('built-in/Inport',[sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9/In_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9/In_1']],...
		'position',[25,30,45,40])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9']],[50,35;65,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9']],[130,35;150,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9']],[215,35;255,35])


%     Finished composite block ['Pitch Autopilot',13,'Channel/G7G8G9/G9'].

set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/G9']],...
		'position',[240,10,270,60])

add_block('built-in/Inport',[sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/In_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/In_1']],...
		'position',[25,30,45,40])

add_block('built-in/Outport',[sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/Out_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/Out_1']],...
		'position',[320,30,340,40])

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/Transfer Fcn5']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9/Transfer Fcn5']],...
		'hide name',0,...
		'Numerator','gn7',...
		'Denominator','gd7',...
		'position',[70,15,115,55])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9']],[50,35;65,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9']],[120,35;235,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9']],[275,35;315,35])


%     Finished composite block ['Pitch Autopilot',13,'Channel/G7G8G9'].

set_param([sys,'/',['Pitch Autopilot',13,'Channel/G7G8G9']],...
		'position',[605,170,635,220])

add_block('built-in/Outport',[sys,'/',['Pitch Autopilot',13,'Channel/U']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/U']],...
		'position',[670,184,685,206])

add_block('built-in/Sum',[sys,'/',['Pitch Autopilot',13,'Channel/Sum']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Sum']],...
		'hide name',0,...
		'inputs','2',...
		'position',[130,110,160,130])

add_block('built-in/Gain',[sys,'/',['Pitch Autopilot',13,'Channel/Gain8']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Gain8']],...
		'hide name',0,...
		'Gain','k3',...
		'position',[70,165,100,195])

add_block('built-in/Gain',[sys,'/',['Pitch Autopilot',13,'Channel/Gain1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Gain1']],...
		'hide name',0,...
		'Gain','k1 * k2',...
		'position',[260,20,290,50])

add_block('built-in/Gain',[sys,'/',['Pitch Autopilot',13,'Channel/Gain']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Gain']],...
		'hide name',0,...
		'Gain','1.2',...
		'position',[190,20,220,50])

add_block('built-in/Gain',[sys,'/',['Pitch Autopilot',13,'Channel/Gain6']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Gain6']],...
		'hide name',0,...
		'Gain','k2 * k5',...
		'position',[190,190,220,220])

add_block('built-in/Inport',[sys,'/',['Pitch Autopilot',13,'Channel/Y1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Y1']],...
		'Port','4',...
		'position',[30,245,45,265])

add_block('built-in/Inport',[sys,'/',['Pitch Autopilot',13,'Channel/Y4']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Y4']],...
		'Port','3',...
		'position',[30,170,45,190])

add_block('built-in/Inport',[sys,'/',['Pitch Autopilot',13,'Channel/Np']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Np']],...
		'Port','2',...
		'position',[30,105,45,125])

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

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/Transfer Fcn4']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Transfer Fcn4']],...
		'hide name',0,...
		'Numerator','gn5',...
		'Denominator','gd5',...
		'position',[330,235,375,275])

add_block('built-in/Gain',[sys,'/',['Pitch Autopilot',13,'Channel/Gain5']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Gain5']],...
		'hide name',0,...
		'Gain','k2 * k6',...
		'position',[190,240,220,270])

add_block('built-in/Gain',[sys,'/',['Pitch Autopilot',13,'Channel/Gain4']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Gain4']],...
		'hide name',0,...
		'Gain','k2 * k4',...
		'position',[190,140,220,170])

add_block('built-in/Gain',[sys,'/',['Pitch Autopilot',13,'Channel/Gain2']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/Gain2']],...
		'hide name',0,...
		'Gain','k1 * k2',...
		'position',[190,70,220,100])


%     Subsystem  ['Pitch Autopilot',13,'Channel/G1G2'].

new_system([sys,'/',['Pitch Autopilot',13,'Channel/G1G2']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G2']],'Location',[100,100,300,300])

add_block('built-in/Inport',[sys,'/',['Pitch Autopilot',13,'Channel/G1G2/In_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G2/In_1']],...
		'position',[25,30,45,40])

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/G1G2/Transfer Fcn']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G2/Transfer Fcn']],...
		'hide name',0,...
		'Numerator','gn2',...
		'Denominator','gd2',...
		'position',[145,15,195,55])

add_block('built-in/Outport',[sys,'/',['Pitch Autopilot',13,'Channel/G1G2/Out_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G2/Out_1']],...
		'position',[230,30,250,40])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G1G2']],[50,35;140,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G1G2']],[200,35;225,35])


%     Finished composite block ['Pitch Autopilot',13,'Channel/G1G2'].

set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G2']],...
		'position',[260,62,290,108])


%     Subsystem  ['Pitch Autopilot',13,'Channel/G1G3'].

new_system([sys,'/',['Pitch Autopilot',13,'Channel/G1G3']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G3']],'Location',[100,100,300,300])

add_block('built-in/Inport',[sys,'/',['Pitch Autopilot',13,'Channel/G1G3/In_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G3/In_1']],...
		'position',[25,30,45,40])

add_block('built-in/Transfer Fcn',[sys,'/',['Pitch Autopilot',13,'Channel/G1G3/z']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G3/z']],...
		'hide name',0,...
		'Numerator','gn3',...
		'Denominator','gd3',...
		'position',[150,12,205,58])

add_block('built-in/Outport',[sys,'/',['Pitch Autopilot',13,'Channel/G1G3/Out_1']])
set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G3/Out_1']],...
		'position',[235,30,255,40])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G1G3']],[50,35;145,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel/G1G3']],[210,35;230,35])


%     Finished composite block ['Pitch Autopilot',13,'Channel/G1G3'].

set_param([sys,'/',['Pitch Autopilot',13,'Channel/G1G3']],...
		'position',[260,130,290,180])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[165,120;175,120;185,85])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[175,120;185,155])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[50,255;185,255])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[115,255;115,205;185,205])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[375,200;400,200])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[590,195;600,195])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[530,195;550,195])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[225,35;255,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[50,180;65,180])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[50,115;125,115])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[50,35;185,35])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[295,155;315,155;315,195;335,195])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[225,155;255,155])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[225,85;255,85])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[225,255;325,255])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[225,205;335,205])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[380,255;415,255;475,210;500,210])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[440,200;500,200])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[105,180;115,180;125,125])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[295,35;330,35;475,180;500,180])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[295,85;370,85;475,190;500,190])
add_line([sys,'/',['Pitch Autopilot',13,'Channel']],[640,195;665,195])


%     Finished composite block ['Pitch Autopilot',13,'Channel'].

set_param([sys,'/',['Pitch Autopilot',13,'Channel']],...
		'position',[230,20,285,100])

add_block('built-in/Inport',[sys,'/','u'])
set_param([sys,'/','u'],...
		'position',[20,70,40,90])

add_block('built-in/Scope',[sys,'/','Np'])
set_param([sys,'/','Np'],...
		'Vgain','1.500000',...
		'Hgain','10.200000',...
		'Vmax','2.000000',...
		'Hmax','20.400000',...
		'Window',[686,245,930,407],...
		'position',[545,73,575,107])
add_line(sys,[400,35;490,35;490,187;150,187;150,50;225,50])
add_line(sys,[490,90;540,90])
add_line(sys,[45,80;65,80;65,35;125,35])
add_line(sys,[60,25;125,25])
add_line(sys,[155,30;225,30])
add_line(sys,[490,145;545,145])
add_line(sys,[400,35;530,35])
add_line(sys,[400,60;475,60;475,167;175,167;175,70;225,70])
add_line(sys,[400,85;460,85;460,145;195,145;195,90;225,90])
add_line(sys,[290,60;340,60])

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
end
