Complete the code to set the reference input signal in Simulink.
set_param('model/Reference', 'Value', [1])
The 'constant' block is used to provide a fixed reference input signal in Simulink.
Complete the code to enable reference tracking in the PID controller block.
set_param('model/PID Controller', 'ReferenceInput', [1])
Setting 'ReferenceInput' to 'on' enables the PID controller to track the reference signal.
Fix the error in the code to correctly connect the reference signal to the controller input.
add_line('model', 'Reference/1', [1], 'autorouting', 'on')
The reference input should connect to port 2 of the PID Controller block for proper tracking.
Fill both blanks to create a dictionary mapping signal names to their reference tracking status.
ref_status = [1]: [2] for [1] in signals
This dictionary comprehension maps each signal name to True, indicating it is tracked as a reference.
Fill all three blanks to filter signals that have reference tracking enabled.
tracked_signals = [[1] for [2], [3] in ref_status.items() if [3]]
This list comprehension collects signal names where the tracking status is True.
