Skip to Main Content Skip to Search
Product Documentation

getstatestruct - State structure from operating point

Syntax

x_struct = getstatestruct(op_point)

Description

x_struct = getstatestruct(op_point) extracts a structure of state values, x_struct, from the operating point object, op_point. The structure, x_struct, uses the same format as Simulink software which allows you to set initial values for states in the model within the Data Import/Export pane of the Configuration Parameters dialog box.

Examples

Create an operating point object for the magball model:

op_magball=operpoint('magball');

Extract a state structure from the operating point object:

states_magball=getstatestruct(op_magball)

This extraction returns

states_magball = 

       time: 0
    signals: [1x5 struct]

To view the values of the states within this structure, use dot-notation to access the values field:

states_magball.signals.values

This dot-notation returns

ans =

     0


ans =

   14.0071


ans =

    7.0036


ans =

     0


ans =

    0.0500

See Also

getinputstruct | getxu | operpoint

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS