MATLAB: I am unable to use the ADD_BLOCK function with particular blocks in the Model Verification library in Simulink 6.4 (R2006a)

simulink

I am able to use the ADD_BLOCK function to add an Assertion block to my Simulink model as shown here:
add_block('built-in/Assertion', 'mymodel/Assert1')
However, I am unable to add other blocks from the Model Verification library in Simulink using the ADD_BLOCK function in this fashion. For instance, I cannot determine how to add to my model the Check Dynamic Upper Bound block, a masked subsystem whose 'BlockType' parameter specifies "SubSystem".

Best Answer

Note that you can use 'built-in/BlockType' as an input argument to the ADD_BLOCK function to represent a source block, where 'BlockType' is the built-in block's type. However, the ADD_BLOCK function allows this syntax only for blocks that are
  • available in Simulink block libraries
  • not masked subsystems
Otherwise, you must specify the source block using its full pathname, e.g., as returned by the GCB function. Note that the full pathname often includes spaces and new line characters that you must represent in the ADD_BLOCK input argument string.
For example, to add the Check Dynamic Upper Bound block to your model, enter the following at the MATLAB prompt:
blkName = sprintf('simulink/Model\nVerification/Check Dynamic \nUpper Bound');
addblock(blkName,'mymodel/CDUB2')