setCoefficient
Class: Aero.FixedWing
Namespace: Aero
Syntax
aircraft = setCoefficient(aircraft,stateOutput,stateVariable,value)
aircraft = setCoefficient(__,Name,Value)
Description
sets the coefficient value aircraft
= setCoefficient(aircraft
,stateOutput
,stateVariable
,value
)value
to the coefficient specified by
stateOutput
and stateVariable
and returns the
modified object aircraft
.
sets the coefficient value using one or more aircraft
= setCoefficient(__,Name,Value
)Name,Value
pair
arguments.
Input Arguments
aircraft
— Aero.FixedWing
object
scalar
Aero.FixedWing
object, specified as a scalar.
stateOutput
— Valid state output
vector of strings | character array
Valid state output, specified in a vector of strings or character array. For more
information, see Aero.FixedWing.Coefficient
.
Data Types: string
| char
stateVariable
— Valid state output
vector of strings | character array
Valid state variable, specified in a vector of strings or character array. Valid
state variables depend on the coefficients defined on the object. For more information,
see Aero.FixedWing.State
.
Data Types: string
| char
value
— Simulink.LookupTable
object or numeric constant
vector of cells
Simulink.LookupTable
object or numeric constant, specified as a
vector of cells where each cell is a Simulink.LookupTable
object or
numeric constant. For more information on coefficient values, see
Aero.FixedWing.Coefficient
.
Data Types: string
| char
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'AddVariable','on'
Component
— Component name
string
Component name, specified as a string. Valid component names depend on the object properties and all subcomponents on the object. The default component name is the current object.
Data Types: char
| string
AddVariable
— Option to add state variable
off
(default) | on
Option to add state variable if desired state variable is missing, specified as:
'on'
— Add a state variable.'off'
— Do not add a state variable.
Data Types: logical
Output Arguments
aircraft
— Modified Aero.FixedWing
object
scalar
Modified Aero.FixedWing
object with the modified coefficients at
the specified locations, returned as a scalar.
Examples
Set Coefficient for Aero.FixedWing Object
This example shows how to set a coefficient on a Aero.FixedWing object.
C182 = astC182(); C182 = setCoefficient(C182, "CD", "Alpha", {5})
C182 = FixedWing with properties: ReferenceArea: 174 ReferenceSpan: 36 ReferenceLength: 4.9000 Coefficients: [1x1 Aero.FixedWing.Coefficient] DegreesOfFreedom: "6DOF" Surfaces: [1x3 Aero.FixedWing.Surface] Thrusts: [1x1 Aero.FixedWing.Thrust] AspectRatio: 7.4483 Properties: [1x1 Aero.Aircraft.Properties] UnitSystem: "English (ft/s)" TemperatureSystem: "Fahrenheit" AngleSystem: "Radians"
Set Vector of Coefficients for FixedWing.Control Object
This example shows how to set a vector of coefficients on a FixedWing.Control object.
C182 = astC182(); C182 = setCoefficient(C182, ["CY"; "Cm"], ["Zero"; "Alpha"], {5; Simulink.LookupTable})
C182 = FixedWing with properties: ReferenceArea: 174 ReferenceSpan: 36 ReferenceLength: 4.9000 Coefficients: [1x1 Aero.FixedWing.Coefficient] DegreesOfFreedom: "6DOF" Surfaces: [1x3 Aero.FixedWing.Surface] Thrusts: [1x1 Aero.FixedWing.Thrust] AspectRatio: 7.4483 Properties: [1x1 Aero.Aircraft.Properties] UnitSystem: "English (ft/s)" TemperatureSystem: "Fahrenheit" AngleSystem: "Radians"
Set Coefficient on Component in Aero.FixedWing Object
This example shows how to set a coefficient on a component within an Aero.FixedWing object.
C182 = astC182(); C182 = setCoefficient(C182, "CD", "Elevator", {5}, "Component", "Elevator")
C182 = FixedWing with properties: ReferenceArea: 174 ReferenceSpan: 36 ReferenceLength: 4.9000 Coefficients: [1x1 Aero.FixedWing.Coefficient] DegreesOfFreedom: "6DOF" Surfaces: [1x3 Aero.FixedWing.Surface] Thrusts: [1x1 Aero.FixedWing.Thrust] AspectRatio: 7.4483 Properties: [1x1 Aero.Aircraft.Properties] UnitSystem: "English (ft/s)" TemperatureSystem: "Fahrenheit" AngleSystem: "Radians"
Limitations
When used with Simulink.LookupTable
objects, this method requires a
Simulink® license.
Version History
Introduced in R2021a
See Also
Aero.FixedWing
| getCoefficient
| Simulink.LookupTable
(Simulink)
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)