| 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 |
YP = predict(NLSYS,DATA);
[YP,X0,XFINAL] = predict(NLSYS,DATA);
[YP,X0,XFINAL] = predict(NLSYS,DATA,K);
[YP,X0,XFINAL] = predict(NLSYS,DATA,K,X0INIT);
YP = predict(NLSYS,DATA); predicts the k-step ahead output with an idnlgrey model.
[YP,X0,XFINAL] = predict(NLSYS,DATA); returns the initial states used in the prediction as well as the final states computed, in addition to the predicted output.
[YP,X0,XFINAL] = predict(NLSYS,DATA,K); specifies the prediction horizon to use during prediction.
[YP,X0,XFINAL] = predict(NLSYS,DATA,K,X0INIT); specifies the initialization for the k-step ahead prediction.
NLSYS: idnlgrey model for which output is to be predicted.
DATA: Input-output data [Y U]. U is the input data that can be given either as an iddata object or as a matrix U = [U1 U2 ... Um], where the k:th column vector is input Uk. Similarly, Y is either an iddata object or a matrix of outputs (with as many columns as there are outputs). For time-continuous idnlgrey objects, DATA passed as a matrix will lead to that the data sample interval, Ts, is set to one.
K: Prediction horizon. K and can be set to an integer between 1 and inf (pure simulation). As idnlgrey assumes an output error model structure, where prediction and simulation coincide, K has no meaning.
X0INIT: Initial state to use. It can take the following values:
'zero' : Zero initial state x(0) with all states fixed (nlsys.InitialStates.Fixed is thus ignored).
'fixed': (or NLSYS.InitialState) Determines the values of the model initial states, but all states are fixed (NLSYS.InitialStates.Fixed is ignored).
'estimate': NLSYS.InitialState determines the value of the initial states and all initial states are estimated (NLSYS.InitialStates.Fixed is ignored).
(Default) 'model': NLSYS.InitialState determines the value of the initial states, which initial states to estimate, and minimum and maximum state values.
vector/matrix: Column vector of initial states. For multiple-experiment DATA, x(0) can be a matrix where each column contains initial states for the corresponding experiment. All initial states are fixed (nlsys.InitialStates.Fixed is ignored).
struct array : An Nx-by-1 structure array with fields:
Name: Name of the state (a string).
Unit: Unit of the state (a string).
Value: Value of the states (a finite real 1-by-Ne vector, where Ne is the number of experiments.)
Minimum: Minimum values of the states (a real 1-by-Ne vector or a real scalar, in which case all initial states have the same minimum value).
Maximum: Maximum values of the states (a real 1-by-Ne vector or a real scalar, in which case all initial states have the same maximum value).
(Default) Fixed: Uses initial state values from NLSYS.InitialState.Value. Ignores NLSYS.InitialState.Fixed.
The initial state can also be specified using the property-value pair InitialState or X0, followed by the value X0INIT. For example: predict(NLSYS,DATA,K,'InitialState',X0INIT).
YP: Predicted output. If DATA is an iddata object, then YP will also be an iddata object. Otherwise, YP will be a matrix where the k:th output is found in the k:th column of YP. If DATA is a multiple experiment iddata object, then YP will be as well.
X0: Initial states. In the single experiment case it is a column vector of length Nx. For multi-experiment data, X0 is an Nx-by-Ne matrix with the ith column specifying the initial state of experiment i.
XFINAL: Final states computed. In the single experiment case it is a column vector of length Nx. For multi-experiment data, XFINAL is an Nx-by-Ne matrix with the ith column specifying the initial state of experiment i.
| sim(idnlgrey) | |
| pe | |
| pem |
![]() | predict(idnlarx) | predict(idnlhw) | ![]() |

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 |