function [ret,x0,str,ts,xts]=extras(t,x,u,flag);
%EXTRAS	is the M-file description of the SIMULINK system named EXTRAS.
%	The block-diagram can be displayed by typing: EXTRAS.
%
%	SYS=EXTRAS(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 EXTRAS 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 EXTRAS with a FLAG of zero:
%	[SIZES]=EXTRAS([],[],[],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',[379,98,862,433])
     open_system(sys)
end;
set_param(sys,'algorithm',     'Euler')
set_param(sys,'Start time',    '0.0')
set_param(sys,'Stop time',     '999999')
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',   '')


%     Subsystem  ['MuTools',13,'Demos'].

new_system([sys,'/',['MuTools',13,'Demos']])
set_param([sys,'/',['MuTools',13,'Demos']],'Location',[0,0,123,235])
set_param([sys,'/',['MuTools',13,'Demos']],...
		'Mask Display','',...
		'Mask Dialogue','eval(''if ~exist(''''sysic''''), fprintf(''''\n Must be licensed for Mutoolbox\n>>''''), else musyndm; end;'')')


%     Finished composite block ['MuTools',13,'Demos'].

set_param([sys,'/',['MuTools',13,'Demos']],...
		'position',[345,235,375,285])


%     Subsystem  ['Robust',13,'Control',13,'Demos'].

new_system([sys,'/',['Robust',13,'Control',13,'Demos']])
set_param([sys,'/',['Robust',13,'Control',13,'Demos']],'Location',[0,0,123,235])
set_param([sys,'/',['Robust',13,'Control',13,'Demos']],...
		'Mask Display','',...
		'Mask Dialogue','eval(''if ~exist(''''ltry''''), fprintf(''''\n Must be licensed for RCT toolbox\n>>''''), else rctdm; end;'')')


%     Finished composite block ['Robust',13,'Control',13,'Demos'].

set_param([sys,'/',['Robust',13,'Control',13,'Demos']],...
		'position',[270,235,300,285])


%     Subsystem  'System ID'.

new_system([sys,'/','System ID'])
set_param([sys,'/','System ID'],'Location',[0,0,123,235])
set_param([sys,'/','System ID'],...
		'Mask Display','',...
		'Mask Dialogue','eval(''extrid'')')


%     Finished composite block 'System ID'.

set_param([sys,'/','System ID'],...
		'position',[190,235,220,285])


%     Subsystem  'Controllers'.

new_system([sys,'/','Controllers'])
set_param([sys,'/','Controllers'],'Location',[0,0,123,235])
set_param([sys,'/','Controllers'],...
		'Mask Display','',...
		'Mask Dialogue','eval(''extrcont'')')


%     Finished composite block 'Controllers'.

set_param([sys,'/','Controllers'],...
		'position',[40,235,70,285])

add_block('built-in/Note',[sys,'/','Additional blocks using the mask utility (documented in release notes): '])
set_param([sys,'/','Additional blocks using the mask utility (documented in release notes): '],...
		'position',[240,85,245,90])


%     Subsystem  ['Filters',13,''].

new_system([sys,'/',['Filters',13,'']])
set_param([sys,'/',['Filters',13,'']],'Location',[0,0,123,235])
set_param([sys,'/',['Filters',13,'']],...
		'Mask Display','')
set_param([sys,'/',['Filters',13,'']],...
		'Mask Dialogue','eval(''extrfilt; if ~exist(''''butter''''), fprintf(''''Warning: The Signal Processing Toolbox is not installed\nand the filters will not display or execute.\n''''); end'')')


%     Finished composite block ['Filters',13,''].

set_param([sys,'/',['Filters',13,'']],...
		'position',[110,235,140,285])


%     Subsystem  ['Most commonly',13,'used blocks'].

new_system([sys,'/',['Most commonly',13,'used blocks']])
set_param([sys,'/',['Most commonly',13,'used blocks']],'Location',[-10,380,117,533])
set_param([sys,'/',['Most commonly',13,'used blocks']],...
		'Mask Display','Block\nLibrary',...
		'Mask Dialogue','eval(''blocklib'')')


%     Finished composite block ['Most commonly',13,'used blocks'].

set_param([sys,'/',['Most commonly',13,'used blocks']],...
		'position',[260,19,331,55])


%     Subsystem  ['SIMULINK',13,'Demos'].

new_system([sys,'/',['SIMULINK',13,'Demos']])
set_param([sys,'/',['SIMULINK',13,'Demos']],'Location',[-10,380,117,533])
set_param([sys,'/',['SIMULINK',13,'Demos']],...
		'Mask Display','DEMOS',...
		'Mask Dialogue','eval(''simdemo'')')


%     Finished composite block ['SIMULINK',13,'Demos'].

set_param([sys,'/',['SIMULINK',13,'Demos']],...
		'position',[135,19,206,55])

add_block('built-in/Note',[sys,'/','Blocks and demos which require toolboxes:'])
set_param([sys,'/','Blocks and demos which require toolboxes:'],...
		'position',[240,205,245,210])


%     Subsystem  'Conversion'.

new_system([sys,'/','Conversion'])
set_param([sys,'/','Conversion'],'Location',[0,0,123,235])
set_param([sys,'/','Conversion'],...
		'Mask Display','',...
		'Mask Dialogue','eval(''extrconv'')')


%     Finished composite block 'Conversion'.

set_param([sys,'/','Conversion'],...
		'position',[95,125,125,175])


%     Subsystem  'Flip-Flops'.

new_system([sys,'/','Flip-Flops'])
set_param([sys,'/','Flip-Flops'],'Location',[0,0,123,235])
set_param([sys,'/','Flip-Flops'],...
		'Mask Display','',...
		'Mask Dialogue','eval(''extrflip'')')


%     Finished composite block 'Flip-Flops'.

set_param([sys,'/','Flip-Flops'],...
		'position',[175,125,205,175])


%     Subsystem  'PID Controllers'.

new_system([sys,'/','PID Controllers'])
set_param([sys,'/','PID Controllers'],'Location',[0,0,123,235])
set_param([sys,'/','PID Controllers'],...
		'Mask Display','',...
		'Mask Dialogue','eval(''extrpid'')')


%     Finished composite block 'PID Controllers'.

set_param([sys,'/','PID Controllers'],...
		'position',[255,125,285,175])


%     Subsystem  'Analyzers'.

new_system([sys,'/','Analyzers'])
set_param([sys,'/','Analyzers'],'Location',[0,0,123,235])
set_param([sys,'/','Analyzers'],...
		'Mask Display','',...
		'Mask Dialogue','eval(''extrdisp'')')


%     Finished composite block 'Analyzers'.

set_param([sys,'/','Analyzers'],...
		'position',[335,125,365,175])


%     Subsystem  ['Neural',13,'Networks'].

new_system([sys,'/',['Neural',13,'Networks']])
set_param([sys,'/',['Neural',13,'Networks']],'Location',[0,0,123,235])
set_param([sys,'/',['Neural',13,'Networks']],...
		'Mask Display','',...
		'Mask Dialogue','eval(''extrnn'')')


%     Finished composite block ['Neural',13,'Networks'].

set_param([sys,'/',['Neural',13,'Networks']],...
		'position',[420,235,450,285])

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
