# 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:

$$M=\left[\begin{array}{cc}1& a+b\\ 0& ab\end{array}\right],$$

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

`a`

and`b`

.M = [1 a+b;0 a*b]

`M`

is a generalized matrix whose`Blocks`

property contains`a`

and`b`

. The initial value of`M`

is`M = [1 2;0 -3]`

, from the initial values of`a`

and`b`

.(Optional) Change the initial value of the parameter

`a`

.M.Blocks.a.Value = -3;

(Optional) Use

`double`

to display the new value of`M`

.double(M)

The new value of

`M`

is`M = [1 0;0 -9]`

.

## Version History

**Introduced in R2011a**