setState
Class: Aero.FixedWing.State
Namespace: Aero
Syntax
state = setState(state,statename,value)
Description
Input Arguments
Aero.FixedWing.State object, specified as a scalar.
State names, specified in a vector. You cannot set effective control variables
created with asymmetric control surfaces. For more information on state names, see the
Aero.FixedWing.State
Properties.
Tip
Each vector of statename and value must
be the same length.
Data Types: char | string
State values, specified as a vector.
If the states are all scalar constants,
valueis a numeric vector.If one of more states are not scalar constants,
valueis a cell vector.
Tip
Each vector of statename and value must
be the same length.
Output Arguments
Modified input object with the modified states at the specified locations.
Examples
These examples show how to set the state value to specified state name.
Set Pitch Angle of Cruise State
Set the pitch angle of a cruise state.
[C182, CruiseState] = astC182();
CruiseState = setState(CruiseState, "Alpha", 5)CruiseState =
State with properties:
Alpha: NaN
Beta: NaN
AlphaDot: 0
BetaDot: 0
Mass: 82.2981
Inertia: [3×3 table]
CenterOfGravity: [1.2936 0 0]
CenterOfPressure: [1.2250 0 0]
AltitudeMSL: 5000
GroundHeight: 0
XN: 0
XE: 0
XD: -5000
U: 220.1000
V: 0
W: 0
Phi: 0
Theta: -0.0073
Psi: 0
P: 0
Q: 0
R: 0
Weight: 2.6488e+03
AltitudeAGL: 5000
Airspeed: NaN
GroundSpeed: 220.1000
MachNumber: NaN
BodyVelocity: [NaN NaN NaN]
GroundVelocity: [220.1000 0 0]
Ur: NaN
Vr: NaN
Wr: NaN
FlightPathAngle: 0
CourseAngle: 0
InertialToBodyMatrix: [3×3 double]
BodyToInertialMatrix: [3×3 double]
BodyToWindMatrix: [3×3 double]
WindToBodyMatrix: [3×3 double]
BodyToStabilityMatrix: [3×3 double]
StabilityToBodyMatrix: [3×3 double]
DynamicPressure: NaN
Environment: [1×1 Aero.Aircraft.Environment]
ControlStates: [1×4 Aero.Aircraft.ControlState]
OutOfRangeAction: "Limit"
DiagnosticAction: "Warning"
Properties: [1×1 Aero.Aircraft.Properties]
UnitSystem: "English (ft/s)"
TemperatureSystem: "Fahrenheit"
AngleSystem: "Radians"
Set U, V, and W Velocity Components
Set the U, V, and W velocity components of a cruise state.
[C182, CruiseState] = astC182(); CruiseState = setState(CruiseState, ["U", "V", "W"], [50, 1, 10])
CruiseState =
State with properties:
Alpha: 0.1974
Beta: 0.0196
AlphaDot: 0
BetaDot: 0
Mass: 82.2981
Inertia: [3×3 table]
CenterOfGravity: [1.2936 0 0]
CenterOfPressure: [1.2250 0 0]
AltitudeMSL: 5000
GroundHeight: 0
XN: 0
XE: 0
XD: -5000
U: 50
V: 1
W: 10
Phi: 0
Theta: -0.0073
Psi: 0
P: 0
Q: 0
R: 0
Weight: 2.6488e+03
AltitudeAGL: 5000
Airspeed: 51
GroundSpeed: 51
MachNumber: 0.0465
BodyVelocity: [50 1 10]
GroundVelocity: [50 1 10]
Ur: 50
Vr: 1
Wr: 10
FlightPathAngle: 0.1974
CourseAngle: 0.0200
InertialToBodyMatrix: [3×3 double]
BodyToInertialMatrix: [3×3 double]
BodyToWindMatrix: [3×3 double]
WindToBodyMatrix: [3×3 double]
BodyToStabilityMatrix: [3×3 double]
StabilityToBodyMatrix: [3×3 double]
DynamicPressure: 2.6636
Environment: [1×1 Aero.Aircraft.Environment]
ControlStates: [1×4 Aero.Aircraft.ControlState]
OutOfRangeAction: "Limit"
DiagnosticAction: "Warning"
Properties: [1×1 Aero.Aircraft.Properties]
UnitSystem: "English (ft/s)"
TemperatureSystem: "Fahrenheit"
AngleSystem: "Radians"
Version History
Introduced in R2021a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)