Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

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

| |

Was this topic helpful?