Why do I receive an error when I change tabs in the Signal Builder block after creating the block with multiple groups in Simulink 6.1 (R14SP1)?

1 view (last 30 days)
I used the SIGNALBUILDER function in MATLAB to create a Signal Builder block in a new Simulink model. I specified the time and data values as an NxM cell array, where M is the number of different groups. One or more of the groups have time vectors that do not overlap with the first group's time vector. For example, I use the following code:
time = {[0 1 2 3 4 5 6],[20 21 22 23 24 25 26 27]; [0 1 2 3 4 5 6],[20 21 22 23 24 25 26 27]};
data = {rand(1,7), rand(1,8);rand(1,7),rand(1,8)};
SignalLabel={'data1','data2'};
GroupLabel={'Group1','Group2'};
MySignalBuilder = signalbuilder([],'CREATE',time ,data,SignalLabel,GroupLabel);
When I click on the 'Group2' tab in the Signal Builder block dialog, I receive the following error:
??? In an assignment A(I) = B, the number of elements in B and
I must be the same.
Error in ==> sigbuilder>rescale_axes_to_fit_data at 2204
newYlim(2) = step*ceil(0.95*maxY/step);
Error in ==> sigbuilder>dataSet_activate at 3337
UD = rescale_axes_to_fit_data(UD,i,[],1,DO_FAST);
Error in ==> sigbuilder at 197
UD = dataSet_activate(UD,extra_args{:});
Error in ==> sigbuilder_tabselector>activate_entry at 480
sigbuilder('DSChange',figH,[],pressedIdx);
Error in ==> sigbuilder_tabselector>mouse_handler at 155
UD = activate_entry(UD,axesH,pressedIdx);
Error in ==> sigbuilder_tabselector at 79
UD = mouse_handler(action,axesH,UD,xpos);
??? Error while evaluating text ButtonDownFcn.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
There is a bug in Simulink 6.1 (R14SP1) in the way that the SIGNALBUILDER function handles creating a new block with two groups whose time vectors do not overlap.
To work around this issue, create the Signal Builder block with one group and add the remaining groups to that block using the 'APPEND' flag as follows:
time1 ={[0 1 2 3 4 5 6];[0 1 2 3 4 5 6]};
data1 ={rand(1,7);rand(1,7)};
time2 ={[20 21 22 23 24 25 26 27];[20 21 22 23 24 25 26 27]};
data2 ={rand(1,8);rand(1,8)};
SignalLabel={'data1','data2'};
GroupLabel={'Group1','Group2'};
MySignalBuilder = signalbuilder([],'CREATE',time1,...
data1,SignalLabel,GroupLabel{1});
MySignalBuilder = signalbuilder(MySignalBuilder,'APPEND',time2,...
data2,SignalLabel,GroupLabel{2});

More Answers (0)

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!