Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

Introduced before R2006a

Was this topic helpful?