Main Content

getState

Class: Aero.FixedWing.State
Namespace: Aero

Get state value

Since R2021a

Syntax

value = getState(state,statename)

Description

value = getState(state,statename) gets the state value from the state name statename.

Input Arguments

expand all

Aero.FixedWing.State object, specified as a scalar.

State names, specified as a vector. For more information on state names, see the Aero.FixedWing.State Properties.

Data Types: char | string

Output Arguments

expand all

State values, returned as a vector.

  • If the states are all scalar constants, value is a numeric vector.

  • If one of more states are not scalar constants, value is a cell vector.

Examples

expand all

These examples show how to get the Aero.FixedWing.State value.

Get Angle of Attack from Cruise State

Get the angle of attack from a cruise state.

[C182, CruiseState] = astC182();
alpha = getState(CruiseState, 'Alpha')
alpha = 
0

Get U, V, and W Velocity Components

Get the U, V, and W velocity components from a cruise state.

[C182, CruiseState] = astC182();
uvw = getState(CruiseState, {'U', 'V', 'W'})
uvw = 1×3

  220.1000         0         0

Version History

Introduced in R2021a