Complete the code to create a subsystem block in Simulink.
subsystem = add_block('simulink/Ports & Subsystems/Subsystem', '[1]');
Complete the code to set the position of the subsystem block.
set_param('[1]', 'Position', [100 100 200 200]);
Fix the error in the code to add an input port to the subsystem.
add_block('simulink/Ports & Subsystems/In1', '[1]');
Fill both blanks to connect the input port to a Gain block inside the subsystem.
add_block('simulink/Math Operations/Gain', '[1]'); add_line('model_name', '[2]', 'Subsystem1/Gain1/1');
Fill all three blanks to create an output port, connect it to the Gain block, and set the Gain value.
add_block('simulink/Ports & Subsystems/Out1', '[1]'); add_line('model_name', 'Subsystem1/Gain1/1', '[2]'); set_param('model_name/Subsystem1/Gain1', 'Gain', '[3]');
