Complete the code to create a new Simulink model named 'myModel'.
model = [1]('myModel');
The new_system function creates a new Simulink model with the specified name.
Complete the code to open the Simulink model named 'myModel'.
[1]('myModel');
The open_system function opens an existing Simulink model for editing or simulation.
Fix the error in the code to save the Simulink model named 'myModel'.
save_system([1]);The save_system function requires the model name as a string, so it must be in quotes.
Fill both blanks to add a Gain block to the model and set its gain value to 5.
add_block('simulink/Commonly Used Blocks/Gain', '[1]/Gain'); set_param('[2]/Gain', 'Gain', '5');
Blocks are added to the model by specifying the model name and block path. Both blanks require the model name string.
Fill all three blanks to connect the Gain block output to a Scope block input in the model.
add_block('simulink/Commonly Used Blocks/Scope', '[1]/Scope'); add_line('[2]', 'Gain/1', '[3]/1');
The blocks and lines are added to the model named 'myModel'. The line connects output port 1 of Gain to input port 1 of Scope.
