MATLAB: Am I unable to append signals to a Signal Builder block as given in the documentation in Simulink 7.2 (R2008b)

simulink

I try to append signals to a Signal Builder block as given in the following documentation page in Simulink 7.2 (R2008b):
web([docroot '/toolbox/simulink/slref/signalbuilder_cmd.html'])
I executed the following code:
block = signalbuilder([], 'create', [0 5], {[2 2];[0 2]});
signalbuilder(block, 'set', 2, 1, [0 5], [2 0])
signalbuilder(block, 'set', 1, 1, [], [])
signalbuilder(block, 'append', [0 2.5 5], [0 2 0]);
I get the following error message:
??? Cell contents reference from a non-cell array object.
Error in ==> signalbuilder at 410
sigbuilder('cmdApi', 'append', blockH, time, data, sigLabels, groupLabels);

Best Answer

This change has been incorporated into the documentation in Release 2009b (R2009b). For previous releases, read below for any additional information:
There is a bug in the documentation in the way appending new groups to the Signal Builder block is explained.
When appending signals in the block, the signal name and the group name are both required fields. The following commands will append signals to a new group in the block:
block = signalbuilder([], 'create', [0 5], {[2 2];[0 2]});
signalbuilder(block, 'set', 2, 1, [0 5], [2 0])
signalbuilder(block, 'set', 1, 1, [], [])
signalbuilder(block, 'append', [0 2.5 5], [0 2 0],'Signal 2','Group 2')