Import signal data and properties from Signal Builder block to Signal Editor block
imports signal data and properties from Signal Builder block to the
Signal Editor block. This function adds a Signal
Editor block to the current model using the signal data and properties
from the Signal Builder block.
signal_editor = signalBuilderToSignalEditor(
During the port, the
Unicode® group names are prefixed with
Group names are converted to valid MATLAB® variable names with leading and trailing white spaces removed.
Group names are converted with trailing underscores removed.
Remaining numbers maintained in the scenario name.
Orders signal groups alphabetically.
Creates unique group names from existing names following MATLAB conventions.
signalBuilderToSignalEditor function does not
Models that contain test case parameters. You can successfully port data from the Signal Builder block, but you cannot initialize parameters with the Signal Editor block in test harnesses generated by Simulink® Design Verifier™.
Models that contain Signal Builder signal generators created from the Create and Connect Generator context menu.
This example shows how to replace an existing Signal Builder block with a Signal Editor block. To store signals from Signal Builder, the example uses
model = 'ex_replace_signalbuilder'; open_system(model); sbBlockH = [model '/Road Profiles']; seBlockH = signalBuilderToSignalEditor(sbBlockH,... 'Replace',true,'FileName','RoadProfiles.mat');
signal_builder— Signal Builder block to replace
Signal Builder block to replace, specified as a scalar.
comma-separated pairs of
the argument name and
Value is the corresponding value.
Name must appear inside quotes. You can specify several name and value
pair arguments in any order as
FileName— MAT-file that stores signals
'dataset.mat'(default) | scalar
MAT-file that stores signals and properties, specified as a scalar. Do not use a file name from one locale in a different locale. When using the block on multiple platforms, consider specifying just the MAT-file name and having the MAT-file be on the MATLAB path.
Replace— Replace Signal Builder block with Signal Editor block
Replace Signal Builder block with Signal Editor block, specified as
signal_editor— Signal Editor block handle
Signal Editor block handle, specified as a scalar.
sorted_group_index— List of Signal Builder group indices
List of Signal Builder group indices, specified as a vector and ordered as they will appear in the Signal Editor.
sorted_group_names— List of Signal Builder group names
Signal Editor group names, specified as a cell array of vectors, in alphabetical order.
The names are unique valid MATLAB variable names generated from the Signal Builder group names.
The Signal Editor block can output a bus for each signal, but cannot output all signals in a single bus. If the Signal Builder block from which you are importing signal data has a bus as output, consider:
Creating or using an existing
Simulink.Bus bus object to
contain the Signal Builder bus signals. The
Simulink.Bus object contains the
Simulink.BusElement that define each element in the
In the Signal Editor user interface, creating a bus element and dragging and dropping the signals imported from the Signal Builder block into that bus element.
After running the
select the Output a bus signal check box in the
Signal Editor block and enter the Signal
Builder bus object name in Select bus object