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 given name.
Complete the code to open the Simulink model named 'myModel'.
open_system([1]);The model name must be a string in quotes to open it with open_system.
Fix the error in the code to add a Gain block to the model 'myModel'.
add_block('simulink/Math Operations/Gain', '[1]/Gain');
The model name must be a string without quotes inside the path string when specifying the block path.
Fill both blanks to set the Gain block's gain value to 5 in the model 'myModel'.
set_param('[1]/Gain', '[2]', '5');
The first blank is the model and block path. The second blank is the parameter name 'Gain' to set its value.
Fill all three blanks to run the simulation of 'myModel' and get the simulation output.
simOut = sim('[1]', 'StopTime', '[2]'); output = simOut.[3];
The first blank is the model name to simulate. The second blank is the stop time as a string. The third blank is the output variable name from the simulation output object.
