Complete the code to define the transfer function of a first-order system with gain K and time constant T.
sys = tf([[1]], [T 1])
The numerator of the transfer function for a first-order system is the gain K.
Complete the code to simulate the step response of the system 'sys' for 10 seconds.
step(sys, [1])The step response is simulated for 10 seconds as specified.
Fix the error in the code to correctly define the time vector for simulation from 0 to 10 seconds with 0.1s step.
t = [1];The colon operator 0:0.1:10 creates linearly spaced vectors and is correct here.
Fill both blanks to create a transfer function with gain 5 and time constant 2.
sys = tf([[1]], [[2] 1])
The numerator is the gain 5, and the denominator uses the time constant 2 followed by 1.
Fill all three blanks to simulate the step response of 'sys' over time vector 't' and plot the result.
y = step(sys, [1]); plot([2], [3]); xlabel('Time (s)'); ylabel('Output'); title('Step Response');
Step response is computed over time vector t, then plotted with time t on x-axis and output y on y-axis.
