Skip to Main Content Skip to Search
Product Documentation

Using the Bus Object API

The Simulink software provides all Bus Editor capabilities programmatically. Many of these capabilities, like importing and exporting MATLAB code files and MAT-files, are not specific to bus objects, and are described elsewhere in the MATLAB and Simulink documentation.

The classes that implement bus objects are:

Simulink.Bus

Specify the properties of a signal bus

Simulink.BusElement

Describe an element of a signal bus

The functions that create and save bus objects are:

Simulink.Bus.createObject

Create bus objects for blocks, optionally saving them in a MATLAB file in a specified format

Simulink.Bus.cellToObject

Convert a cell array containing bus information to bus objects in the base workspace

Simulink.Bus.objectToCell

Convert bus objects in the base workspace to a cell array containing bus information

Simulink.Bus.save

Export specified bus objects or all bus objects from the base workspace to a MATLAB file in a specified format

Simulink.Bus.createMATLABStruct

Create MATLAB structure with same hierarchy, names, and attributes as the bus signal

In addition, when you use Simulink.SubSystem.convertToModelReference to convert an atomic subsystem to a referenced model, you can save any bus objects created during the conversion to a MATLAB file.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS