Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

nparams

Number of model parameters

Syntax

np = nparams(sys)
np = nparams(sys,'free')

Description

np = nparams(sys) returns the number of parameters in the identified model sys.

np = nparams(sys,'free') returns the number free estimation parameters in the identified model sys.

Note

Not all model coefficients are parameters, such as the leading entry of the denominator polynomials in idpoly and idtf models.

Input Arguments

sys

Identified linear model.

Output Arguments

np

Number of parameters of sys.

For the syntax np = nparams(sys,'free'), np is the number of free estimation parameters of sys.

idgrey models can contain non-scalar parameters. nparams accounts for each individual entry of the non-scalar parameters in the total parameter count.

Examples

Obtain the number of parameters of a transfer function model.

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

Obtain the number of free estimation parameters of a transfer function model.

sys0 = idtf([1 0],[1 2 0]);
sys0.Structure.Denominator.Free(3) = false;
np = nparams(sys,'free');

See Also

| | | | | |

Introduced in R2012a

Was this topic helpful?