customRegressor
Description
A custom regressor represents a single user-provided formula that operates on
delayed input and output variables. For example,
y(t–1)eu(t–1)
is a custom regressor that you can construct using the formula
@(x,y)x.*exp(y)
. A customRegressor
object encapsulates a
set of custom regressors. Use customRegressor
objects when you create
nonlinear ARX models using idnlarx
or nlarx
. You can specify customRegressor
objects along with
linearRegressor
,
polynomialRegressor
,
and periodicRegressor
objects and combine them into a single combined regressor set.
Creation
Syntax
Description
creates a cReg
= customRegressor(Variables,Lags,Fcn)customRegressor
object, with the output and input names in
Variables
, the corresponding lags in Lags
, and the function handle in Fcn
.
Fcn
sets the VariablesToRegressorFcn
property. For example, if
Variables
contains 'y'
,
lags
contains the corresponding lag vector [2
4]
, and the custom function is @(x)sin(x)
, then the
regressors that use 'y'
are
sin(y(t–2)) and
sin(y(t–4)).
specifies whether cReg
= customRegressor(Variables,Lags,Fcn,Vectorized)Fcn
can process a vector of inputs to return a
vector of output values, based on the value of Vectorized
.
Properties
Examples
Version History
Introduced in R2021a
See Also
idnlarx
| nlarx
| getreg
| linearRegressor
| polynomialRegressor
| periodicRegressor