Documentation

Simulink.Bus.cellToObject

Convert cell array containing bus information to bus objects

Syntax

Simulink.Bus.cellToObject(busCells)

Description

example

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

Examples

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.

Simulink.Bus.cellToObject(busCell)

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

Tips

The inverse function is Simulink.Bus.objectToCell.

Introduced before R2006a

Was this topic helpful?