Complete the code to add a Scope block to the Simulink model.
add_block('simulink/Sinks/[1]', 'model/Scope1')
The Scope block is added using the path 'simulink/Sinks/Scope'.
Complete the code to set the variable name for the To Workspace block.
set_param('model/To Workspace1', 'VariableName', '[1]')
The variable name for the To Workspace block should be set to 'outputData' to store simulation results.
Fix the error in the code to connect a Display block to the signal line.
add_line('model', 'signal1/1', 'Display1/[1]')
The Display block input port is named 'In1', so use 'Display1/In1' to connect the line.
Fill both blanks to create a To Workspace block and set its SaveFormat parameter.
add_block('simulink/Sinks/[1]', 'model/ToWorkspace1'); set_param('model/ToWorkspace1', 'SaveFormat', '[2]')
The block is 'To Workspace' and the SaveFormat is set to 'Array' to save data as an array.
Fill all three blanks to add a Scope block, set its number of input ports, and open it.
add_block('simulink/Sinks/[1]', 'model/Scope2'); set_param('model/Scope2', 'NumInputPorts', '[2]'); open_system('[3]')
The block is 'Scope', number of input ports is set to '2', and the system 'model/Scope2' is opened.
