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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)