Question

I plotted the impulse response of a digital system with the impz(b,a) command and I want to color on the plot the area between (-std,std). I have already added the lines that show -std and std values but I dont know how to do it. Can you help me? Can it be done graphically?

Was it helpful?

Solution

As EitanT suggested above:

[h, t] = impz(b, a);
figure()
plot(t,h)
hold on
ind=[find(t==-std):find(t==std)]
fill(t(ind),h(ind))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top