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 andI 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.
Best Answer