get

MPC property values

Syntax

Value = get(MPCobj,PropertyName)
Struct = get(MPCobj)
get(MPCobj)

Description

Value = get(MPCobj,PropertyName) returns the current value of the property PropertyName of the MPC controller MPCobj. Specify PropertyName as a character vector or string that contains the full property name (for example, 'UserData') or any unambiguous case-insensitive abbreviation (for example, 'user'). You can specify any generic MPC property.

Struct = get(MPCobj) converts the MPC controller MPCobj into a standard MATLAB® structure with the property names as field names and the property values as field values.

get(MPCobj) without a left-side argument displays all properties of MPCobj and their values.

Tips

An alternative to the syntax

Value = get(MPCobj,'PropertyName')

is the structure-like referencing

Value = MPCobj.PropertyName

For example,

MPCobj.Ts
MPCobj.p

return the values of the sampling time and prediction horizon of the MPC controller MPCobj.

See Also

|

Introduced before R2006a