This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Set parameter covariance data in identified model


sys = setcov(sys0,cov)


sys = setcov(sys0,cov) modifies the parameter covariance of sys0 to the value specified by cov.

The model parameter covariance is calculated and stored automatically when a model is estimated. Therefore, you do not need to set the parameter covariance explicitly for estimated models. Use this function for analysis, such as to study how the parameter covariance affects the response of a model obtained by explicit construction.

Input Arguments


Identified model.


Parameter covariance matrix.

cov is one of the following:

  • an np-by-np semi-positive definite symmetric matrix, where np is equal to the number of parameters of sys0.

  • a structure with the following fields that describe the parameter covariance in a factored form:

    • R — usually the Cholesky factor of inverse of covariance.

    • T — transformation matrix.

    • Free — logical vector of length np indicating if a parameter is free. Here np is equal to the number of parameters of sys0.

    cov(Free,Free) = T*inv(R'*R)*T'.

Output Arguments


Identified model.

The values of all the properties of sys are the same as those in sys0, except for the parameter covariance values which are modified as specified by cov.


collapse all

Create a transfer function model for the following system:

$$sys0 = \frac{4}{{{s^2} + 2s + 1}}$$

sys0 = idtf(4,[1 2 1]);
np = nparams(sys0);

sys0 contains np model parameters.

Specify the covariance values for the denominator parameters only.

cov = zeros(np);
den_index = 2:3;
cov(den_index,den_index) = diag([0.04 0.001]);

cov is a covariance matrix with nonzero entries for the denominator parameters.

Set the covariance for sys0.

sys = setcov(sys0,cov);

See Also

| | |

Introduced in R2012a

Was this topic helpful?