This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Convert cell array containing bus information to bus objects





Simulink.Bus.cellToObject(busCells) creates a set of bus objects in the MATLAB® base workspace from a cell array of bus information.


collapse all

Create a cell array of cell arrays of bus information, and use that cell array to generate a bus object in the base workspace.

Create a cell array of bus information.

busCell = { ...
        { ...
            'myBusObj', ...
            'MyHeader.h', ...
            'My description', ...
            'Exported', ...
            '-1', ...
            {{'a',1,'double', [0.2 0],'real','Frame'}; ...
            {'b',1,'double', [0.2 0],'real','Sample'}},...
            }, ...

Generate a bus object in the base workspace from the cell array.


Input Arguments

collapse all

Bus object information, specified as a cell array of cell arrays. Each subordinate cell array contains bus object information, using these data fields:

  • Bus name

  • Header file

  • Description

  • Data scope

  • Alignment

  • Elements

The elements field is an array containing this data for each element:

  • Element name

  • Dimensions

  • Data type

  • Sample time

  • Complexity

  • Dimensions mode

  • Minimum

  • Maximum

  • Units

  • Description


The inverse function is Simulink.Bus.objectToCell.

Introduced before R2006a

Was this topic helpful?