| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
busInfo = Simulink.Bus.createObject(modelName, blks)
busInfo = Simulink.Bus.createObject(modelName, blks, fileName)
busInfo = Simulink.Bus.createObject(modelName, blks, fileName,
'format')
busInfo = Simulink.Bus.createObject(modelName, blks) creates bus objects (instances of Simulink.Bus class in the MATLAB base workspace) for specified blocks, and returns information about the objects that it created.
busInfo = Simulink.Bus.createObject(modelName, blks, fileName) saves the bus objects in an M-file that contains a cell array of cell arrays. Each subordinate array represents a bus object and contains the following data:
{BusName, HeaderFile, Description, BusElements}The BusElements field is an array containing the following data for each element:
{ElementName, Dimensions, DataType,
SampleTime, Complexity, SamplingMode}busInfo = Simulink.Bus.createObject(modelName, blks, fileName, 'format') saves the bus objects in an M-file that contains either a cell array of bus information, or the bus objects themselves.
modelName |
Name or handle of a model |
blks |
List of subsystem-level Inport blocks, root-level or subsystem-level Outport blocks or Bus Creator blocks in the specified model. If only one block needs to be specified, this argument can be the full pathname of the block. Otherwise, this argument can be either a cell array containing block pathnames or a vector of block handles. |
fileName |
Name of the file in which to save the bus objects created by this function. If this argument is omitted, this function does not save the created bus objects in a file. By default, the function saves the objects in a cell array. |
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' |
busInfo |
A structure array containing bus information for the specified blocks. Each element of the structure array corresponds to one block and contains the following fields:
|
Bus Assignment | Bus Creator | Bus Selector | Bus to Vector | Simulink.Bus | Simulink.Bus.cellToObject | Simulink.Bus.objectToCell | Simulink.Bus.save | Simulink.BusElement
![]() | Simulink.Bus.cellToObject | Simulink.Bus.objectToCell | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |