| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → System Identification Toolbox |
| Contents | Index |
| Learn more about System Identification Toolbox |
m = addreg(model,regressors)
m = addreg(model,regressors,output)
m = addreg(model,regressors) adds custom regressors to a nonlinear ARX model by appending the CustomRegressors model property. model and m are idnalrx objects. For single-output models, regressors is an object array of regressors you create using customreg or polyreg, or a cell array of string expressions. For multiple-output models, regressors is 1-by-ny cell array of customreg objects or 1-by-ny cell array of cell arrays of string expressions. addreg adds each element of the ny cells to the corresponding model output channel. If regressors is a single regressor, addreg adds this regressor to all output channels.
m = addreg(model,regressors,output) adds regressors regressors to specific output channels output of a multiple-output model. output is a scalar integer or vector of integers, where each integer is the index of a model output channel. Specify several pairs of regressors and output values to add different regressor variables to the corresponding output channels.
Add regressors to a nonlinear ARX model as a cell array of strings:
% Create nonlinear ARX model with standard regressors:
m1 = idnlarx([4 2 1],'wavenet','nlr',[1:3]);
% Create model with additional custom regressors:
m2 = addreg(m1,{'y1(t-2)^2';'u1(t)*y1(t-7)'})
% List all standard and custom regressors of m2:
getreg(m2)Add regressors to a nonlinear ARX model as customreg objects:
% Create nonlinear ARX model with standard regressors:
m1 = idnlarx([4 2 1],'wavenet','nlr',[1:3]);
% Create a model based on m1 with custom regressors:
r1 = customreg(@(x)x^2, {'y1'}, 2)
r2 = customreg(@(x,y)x*y, {'u1','y1'}, [0 7])
m2 = addreg(m1,[r1 r2]);
customreg | getreg | nlarx | polyreg
![]() | Functions – Alphabetical List | advice | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |