Documentation 
Estimate parameters of ARMAX model using timedomain data
sys = armax(data,[na
nb nc nk])
sys = armax(data,[na
nb nc nk],Name,Value)
sys = armax(data,init_sys)
sys = armax(data,___,opt)
Note: armax supports only timedomain data. For frequencydomain data, use oe. 
sys = armax(data,[na nb nc nk]) returns an idpoly model, sys, with estimated parameters and covariance (parameter uncertainties). Estimates the parameters using the predictionerror method and specified polynomial orders.
sys = armax(data,[na nb nc nk],Name,Value) returns an idpoly model, sys, with additional options specified by one or more Name,Value pair arguments.
sys = armax(data,init_sys) estimates a polynomial model using the ARMAX structure polynomial model init_sys to configure the initial parameterization.
sys = armax(data,___,opt) specifies estimation options using the option set opt.
data 
Estimation data. Specify data as an iddata object containing the timedomain inputoutput data. You cannot use frequencydomain data for estimating ARMAX models. 
[na nb nc nk] 
Polynomial orders. [na nb nc nk] define the polynomial orders of an ARMAX Model.

init_sys 
Linear polynomial model that configures the initial parameterization of sys. init_sys must be an ARMAX model. You may obtain init_sys by either performing an estimation using measured data, or by direct construction. Use the Structure property of init_sys to configure initial guesses and constraints for A(q), B(q), and C(q). To specify an initial guess for, say, the A(q) term of init_sys, set init_sys.Structure.a.Value as the initial guess. To specify constraints for, say, the B(q) term of init_sys:
You can similarly specify the initial guess and constraints for the other polynomials. If opt is not specified, and init_sys was created by estimation, then the estimation options from init_sys.Report.OptionsUsed are used. 
opt 
Estimation options. opt is an options set that specifies estimation options, including:
Use armaxOptions to create the options set. 
Specify optional commaseparated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
sys 
Identified ARMAX structure polynomial model. sys is a discretetime idpoly model, which encapsulates the estimated A, B and C polynomials and the parameter covariance information. 
armax does not support continuoustime model estimation. Use tfest to estimate a continuoustime transfer function model, or ssest to estimate a continuoustime statespace model.