setState
Class: Aero.FixedWing.State
Namespace: Aero
Set state value to Aero.FixedWing.State object
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 Angle of Attack of Cruise State
Set the angle of attack cruise state.
[C182, CruiseState] = astC182();
CruiseState = setState(CruiseState, "Alpha", deg2rad(5))CruiseState =
State with properties:
Mass: 82.2981
Inertia: [3×3 table]
CenterOfGravity: [1.2936 0 0]
CenterOfPressure: [0.8232 0 0]
AltitudeMSL: 5000
GroundHeight: 0
XN: 0
XE: 0
XD: -5000
U: 219.2625
V: 0
W: 19.1830
Airspeed: 220.1000
Phi: 0
Theta: 0
Psi: 0
P: 0
Q: 0
R: 0
Alpha: 0.0873
Beta: 0
AlphaDot: 0
BetaDot: 0
Weight: 2.6488e+03
AltitudeAGL: 5000
GroundSpeed: 220.1000
MachNumber: 0.2006
BodyVelocity: [219.2625 0 19.1830]
GroundVelocity: [219.2625 0 19.1830]
Ug: 219.2625
Vg: 0
Wg: 19.1830
FlightPathAngle: 0.0873
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: 49.6090
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 Velocity Components Using Airspeed, Alpha, and Beta
Set the aircraft velocity components using "Airspeed", "Alpha", and "Beta".
[C182, CruiseState] = astC182(); CruiseState = setState(CruiseState, ["Airspeed", "Alpha", "Beta"], [60, deg2rad(1), deg2rad(-0.1)])
CruiseState =
State with properties:
Mass: 82.2981
Inertia: [3×3 table]
CenterOfGravity: [1.2936 0 0]
CenterOfPressure: [0.8232 0 0]
AltitudeMSL: 5000
GroundHeight: 0
XN: 0
XE: 0
XD: -5000
U: 59.9908
V: -0.1047
W: 1.0471
Airspeed: 60
Phi: 0
Theta: 0
Psi: 0
P: 0
Q: 0
R: 0
Alpha: 0.0175
Beta: -0.0017
AlphaDot: 0
BetaDot: 0
Weight: 2.6488e+03
AltitudeAGL: 5000
GroundSpeed: 60.0000
MachNumber: 0.0547
BodyVelocity: [59.9908 -0.1047 1.0471]
GroundVelocity: [59.9908 -0.1047 1.0471]
Ug: 59.9908
Vg: -0.1047
Wg: 1.0471
FlightPathAngle: 0.0175
CourseAngle: -0.0017
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: 3.6866
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)