| Simulink® | ![]() |
busInfo = Simulink.Bus.createObject(model, blks) busInfo = Simulink.Bus.createObject(model, blks, 'fileName') busInfo = Simulink.Bus.createObject(model, blks, 'fileName',
'format')
Simulink.Bus.createObject(model, blks, 'fileName', 'format') creates bus objects, i.e., instances of Simulink.Bus class, in the MATLAB® workspace for specified blocks and optionally saves the bus objects in an M-file. The function accepts the following arguments:
model — 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.
'format' — Format used to store the bus objects. May be 'cell' or 'object' or omitted in which case 'cell' is assumed. Use cell array format to save the objects in a compact form.
This function returns a structure array containing bus information for the specified blocks. Each element of the structure array corresponds to one of the specified blocks and contains the following fields:
block — Handle of the block
busName — Name of the bus object associated with the block
Simulink.Bus.cellToObject, Simulink.Bus.save
![]() | Simulink.Bus.cellToObject | Simulink.Bus.objectToCell | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |