| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Simulink.Bus.save(fileName)
Simulink.Bus.save(fileName, format)
Simulink.Bus.save(fileName, format, busNames)
Simulink.Bus.save(fileName) saves all bus objects (instances of Simulink.Bus class residing in the MATLAB base workspace) 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}Executing an M-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 M-file.
Simulink.Bus.save(fileName, format) saves the bus objects in an M-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.
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: { } |
Bus Assignment | Bus Creator | Bus Selector | Bus to Vector | Simulink.Bus | Simulink.Bus.cellToObject | Simulink.Bus.createObject | Simulink.Bus.objectToCell | Simulink.BusElement
![]() | Simulink.Bus.objectToCell | Simulink.ModelReference.protect | ![]() |

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 |