%ADAMS	Integrate a system of ODEs using the Adams method.
%
%	ADAMS('SYSTEM',TF) integrates the system of ODEs described in 
%	the SIMULINK system (or other S-function) SYSTEM from 0 to TF 
%	'time' units (typically but not necessarily seconds).
%	Without left hand arguments results are displayed in graphical form.
%	If SYSTEM has output ports, then ADAMS plots the output 
%	trajectories versus time (otherwise state trajectories are plotted).
% 
%	When used with left hand arguments, [T,X,Y]=ADAMS('SYSTEM',TF), ADAMS
%	returns, without plotting, the integration time	points, T, the output 
%	trajectories, Y, and the state trajectories, X.
%
%	[T,X,Y]=ADAMS('SYSTEM',TF,XI) allows initial conditions (other that
%	those defined in SYSTEM), XI on the states to be defined.
%
%	ADAMS('SYSTEM',TF,XI,OPTIONS) allows a vector of optional parameters, 
%	OPTIONS, defined below:
%
%	OPTIONS(1)  relative error used in ADAMS           (default 1e-3).
%	OPTIONS(2)  minimum step size used              (default TF/2000).
%	OPTIONS(3)  maximum step size used                (default TF/50).
%	OPTIONS(4)  not used in ADAMS                         (default 0).
%	OPTIONS(5)  display warnings parameter (when min step size is reached)
%	            (0 is no warnings, 3 is all)              (default 0).
%	OPTIONS(6)  plot parameter (1 is plot-on, 2 plot-off) (default 0).
%	    the default is to set plot-on when no left arguments are supplied,
%	    otherwise set plot-off.
%
%	For more information enter TYPE ADAMS.M.
%
%	See also RK23, RK45, GEAR, EULER, LINSIM, SFUNC, DSFUNC, TRIM, LINMOD

%	ADAMS('SYSTEM',10) integrates SYSTEM over the time interval 
%	from 0 to 10 seconds. [T,X,Y]=ADAMS('SYSTEM',[3 10]) integrates 
%	SYSTEM over the time interval from 3 to 10 seconds.
%
%	[T,X,Y]=ADAMS('SYSTEM',TF,XI,OPTIONS,UT) allows inputs, u(t), to be defined. 
%	If UT is a string then at each iteration the function u=UT(t) is evaluated.
%	UT may also be in tabular form in which case the first m column define
%	the inputs given by the vector of times, T, which should be provided
%	in the last column of UT. Values of time not specified in UT are 
%	interpolated or extrapolated by ADAMS. 
%
%	Any or all of XI, OPTIONS, or UT may be empty matrices in which case
%	these parameters will be assumed to be undefined and the default option 
%	will be used. 
%	For example, ADAMS('SYSTEM',10,[],[],'sin') integrates SYSTEM over the time 
%	interval from 0 seconds to 10 seconds with default error settings and a sine
%	wave input. 
%
%	[T,X,Y]=ADAMS('SYSTEM',T,XI,OPTIONS,UT,P1,P2,...) allows parameters, 
%	P1,P2,..., to be passed directly to SYSTEM at each call from ADAMS, as in
%	SYS=SYSTEM(T,X,U,FLAG,P1,P2,...).
%
%	The function 'SYSTEM' should return state derivatives and an optional
%	set of outputs given input and state information: SYS=SYSTEM(T,X,U,FLAG).
%	Calling SYSTEM without arguments should return the vector SIZES
%	containing the number of inputs, outputs and states. See the example SFUNC.

%	Copyright (c) 1990-94 by The MathWorks, Inc.

%	Built-in function




