Main Content

getSectionNames

Class: Simulink.data.adapters.BaseMatlabFileAdapter
Namespace: Simulink.data.adapters

Return logical sections for external file

Since R2022b

Syntax

sections = getSectionNames(adapterObj,sourceFile)

Description

sections = getSectionNames(adapterObj,sourceFile) returns the sections for the external source file. The default implementation returns the adapter name. You can override this method to define logical sections for the data in the external file.

Custom file adapters must define behavior for the getAdapterName, getSupportedExtensions, and getData methods. In addition, you can choose to override the isSourceValid, supportsReading, getSectionNames, getCurrentChecksum, open, and close methods.

Input Arguments

expand all

Custom file adapter, specified as an object of a class that derives from the Simulink.data.adapters.BaseMatlabFileAdapter base class.

Example: myCustomFileAdapter

External source file, specified as a character array or string.

Output Arguments

expand all

Section names for the external file, returned as an array of strings or a cell array of character vectors.

Version History

Introduced in R2022b