Documentation Center

  • Trial Software
  • Product Updates

Contents

Simulink.Bus.save

Save bus objects in MATLAB file

Syntax

Simulink.Bus.save(fileName)
Simulink.Bus.save(fileName, format)
Simulink.Bus.save(fileName, format, busNames)

Description

Simulink.Bus.save(fileName) 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, Description}

Executing a MATLAB file created by Simulink.Bus.save 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.

Simulink.Bus.save(fileName, format) saves the bus objects in a MATLAB file that contains either a cell array of bus information or the bus objects themselves.

Simulink.Bus.save(fileName, format, busNames) saves only those bus objects whose names appear in busNames.

Input Arguments

fileName

Name of the file in which to store the bus objects

format

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'

busNames

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: { }

See Also

| | | | | | | | |

Was this topic helpful?