I am writing a program that automates the building of a simulink system. However when I try the following command:
add_block('built-in/Compare To Constant',[sys,'/compare'],'relop','~=','const','realmax(single)','Position',[100 275 200 325])
I get an error stating that a block compare to constant block doesn't exist. After digging a little I discovered that compare to constant is actually a masked subsystem. So my question is is there a way to add compare to constant, or a similar masked subsystem block, to a model from script directly or do I need to re-create the subsystem and then mask it in the code?
Best Answer