This is the script I wrote for the transfer function for in the picture.
clear all;figure;for K = [5,10,50] Tnum=[K K 0]; Tden=[1 16 21.5+K K+97.5]; T=tf(Tnum,Tden); t=[0:0.1:10]; [y,t]=step(T,t); plot(t,y); hold on;endtitle('Unit Step Response for K= 5,10,50');xlabel('Time(sec)'),ylabel('Step Response');grid on;grid minor;
I Know it is not correct because the output is not the same as the solution in the book. What am I doing wrong?
Best Answer