Save bus objects in MATLAB file

Syntax, format), format, busNames)

Description saves all bus objects (instances of Simulink.Bus class residing in the MATLAB® base workspace) in a MATLAB file that contains a cell array of cell arrays. Each subordinate array represents a bus object and contains the following data:

{BusName, HeaderFile, Description, DataScope, Alignment, Elements}

The Elements field is an array containing the following data for each element:

{ElementName, Dimensions, 
DataType, SampleTime, 
Complexity, SamplingMode, 
DimensionsMode, Min, 
Max, DocUnits, 

Executing a MATLAB file created by in cell array format calls Simulink.Bus.cellToObject to recreate the bus objects and returns the new bus objects in the cell array. To suppress the creation of bus objects, specify the optional argument 'false' when you execute the MATLAB file., format) saves the bus objects in a MATLAB file that contains either a cell array of bus information or the bus objects themselves., format, busNames) saves only those bus objects whose names appear in busNames.

Input Arguments


Name of the file in which to store the bus objects


Format used to store the bus objects. The value can be 'cell' or 'object'. Use cell array format to save the objects in a compact form.

Default: 'cell'


A cell array containing names of bus objects to be saved. If the cell array is empty or omitted, this function saves all bus objects in the MATLAB workspace.

Default: { }

Introduced before R2006a

Was this topic helpful?