Simulink Reference Previous page   Next Page
signalbuilder

Create and access Signal Builder blocks.

Syntax

Description

[time, data] = signalbuilder(block) returns the time (x coordinate) and amplitude (y coordinate) data of the Signal Builder block.

The output arguments, time and data, take different formats depending on the block configuration:

Configuration
Time/Data Format
1 signal, 1 group
Row vector of break points
>1 signal, 1 group

Column cell vector where each element corresponds to a separate signal and contains a row vector of breakpoints.

1 signal, >1 group

Row cell vector where each element corresponds to a separate group and contains a row vector of breakpoints

>1 signal, >1 group

Cell matrix where each element (i,j) corresponds to signal i and group j

[time, data, siglabels] = signalbuilder(block) returns the signal labels, siglabels, in a string or a cell array of strings.

[time, data, siglabels, grouplabels] = signalbuilder(block) returns the group labels, grouplabels, in a string or a cell array of strings.

block = signalbuilder([],'create', time, data, siglabels, grouplabels) creates a Signal Builder block in a new Simulink model using the specified values. If data is a cell array and time is a vector, the time values are duplicated for each element of data. Each vector in time and data must be the same length and have at least two elements. If time is a cell array, all elements in a column must have the same initial and final value. Signal labels, siglabels, and group labels, grouplabels, can be omitted to use default values. The function returns the path to the new block, BLOCK.

block = signalbuilder(block,'append', time, data, siglabels, grouplabels) appends new groups to the Signal Builder block, block. The time and data arguments must have the same number of signals as the existing block.

Get/Set Methods for Specific Signals and Groups

[time, data] = signalbuilder(block,'get', signal, group) gets the time and data values for the specified signal(s) and group(s). The signal argument can be the name of a signal, a scalar index of a signal, or an array of signal indices. The group argument can be a group label, a scalar index, or an array of indices.

signalbuilder(block,'set', signal, group, time, data) sets the time and data values for the specified signal(s) and group(s). Use empty values of time and data to remove groups and signals.


Previous page  set_param simulink Next page

© 1994-2005 The MathWorks, Inc.