Main Content

update

Class: Aero.FixedWing
Package: Aero

Update Aero.FixedWing object

Syntax

aircraft = update(aircraft)
aircraft = update(aircraft,Rename,Value)

Description

aircraft = update(aircraft) returns the modified coefficient Aero.FixedWing object.

aircraft = update(aircraft,Rename,Value) updates the Name property in the Simulink.lookuptable.StructTypeInfo object of each Simulink.LookupTable coefficient in the Aero.FixedWing object hierarchy. The updated name is a compilation of all component Name values in the Aero.FixedWing hierarchy, with this format:

  • Listed in descending order

  • Separated by underscores (_)

  • Appended by the stateOutput and stateVariable values of each Simulink.LookupTable location

Input Arguments

expand all

Aero.FixedWing coefficient object, specified as a scalar, of type Aero.FixedWing, Aero.FixedWing.Surface, Aero.FixedWing.Control, Aero.FixedWing.Thrust, or Aero.FixedWing.Coefficient.

Option to update the Name property in the Simulink.lookuptable.StructTypeInfo object, specified as:

  • 'on' — To modify the Name property in the Simulink.lookuptable.StructTypeInfo object.

  • 'off' — Do not modify the Name field in the Simulink.lookuptable.StructTypeInfo object.

Example: 'Rename','on'

Data Types: string | char

Output Arguments

expand all

Modified Aero.FixedWing object with the modified coefficients at the specified locations, returned as a scalar.

Examples

expand all

Update the aircraft name and view the updated coefficients.

aircraft = astSkyHogg;
aircraft.Properties.Name = 'NewName';
aircraft = update(aircraft);
aircraft.Coefficients.Values{1}.StructTypeInfo.Name
ans =

    'NewName_CD_Zero'

Update the aircraft name, but do not propagate the new name to the coefficients.

aircraft = astSkyHogg;
aircraft.Properties.Name = 'NewName';
aircraft = update(aircraft, 'Rename', 'off');
aircraft.Coefficients.Values{1}.StructTypeInfo.Name
ans =

    'SkyHogg_CD_Zero'

Version History

Introduced in R2021a