genmat
Generalized matrix with tunable parameters
Description
Generalized matrices (genmat) are matrices that depend on
tunable parameters (see realp). You can use generalized matrices for
parameter studies. You can also use generalized matrices for building generalized LTI models
(see genss) that represent control systems having a mixture of fixed and
tunable components.
Generalized matrices arise when you combine numeric values with static blocks such as
realp objects. You create such combinations
using any of the arithmetic operators +, -,
*, /, \, and ^.
For example, if a and b are tunable parameters, the
expression M = a + b is represented as a generalized matrix.
The internal data structure of the genmat object M
keeps track of how M depends on the parameters a and
b. The Blocks property of M lists
the parameters a and b.
Creation
Syntax
Description
Input Arguments
Properties
Examples
Create generalized matrix by using algebraic combinations of tunable parameters
This example shows how to use algebraic combinations of tunable parameters to create the generalized matrix:
where a and b are tunable parameters with initial values –1 and 3, respectively.
Create the tunable parameters using
realp.a = realp('a',-1); b = realp('b',3);
Define the generalized matrix using algebraic expressions of
aandb.M = [1 a+b;0 a*b]
Mis a generalized matrix whoseBlocksproperty containsaandb. The initial value ofMisM = [1 2;0 -3], from the initial values ofaandb.(Optional) Change the initial value of the parameter
a.M.Blocks.a.Value = -3;
(Optional) Use
doubleto display the new value ofM.double(M)
The new value of
MisM = [1 0;0 -9].
Version History
Introduced in R2011a