I am trying to plot step reponse and impulse reponse of a sys in a single plot,using suplot and lengend, but i too have different values of z to be ploted (means i am using hold on fun). when i try to use subplot with the created code it's plotting for only one value of z, but i want such that all the three values of z has to plotted for both the step and impulse function in subplot, I apperciate your help.
s=tf('s');z=[3 6 12];hold onfor i=1:3 zc=z(i); g=(15/zc)*((s+zc)/(s^2+3*s+15)); subplot(2,1,1) step(g) subplot(2,1,2) impulse(g)endlegend('z = 3','z = 6','z = 12')
Best Answer