# Plotting step and impulse responses on Matlab

I'm trying to graph a simple response function: 1/(1-0.5s^-1)

Now, I know that the function can also be written as: s/(s-0.5)

So I tried plotting the step and impulse responses in Matlab:

sys = tf([1 0],[1 -0.5])
figure(1);
step(sys);
figure(2);
impulse(sys);


And these are the graphs that I'm getting:

I think the shape of the step response is right; however, shouldn't the impulse response decay?

It just doesn't seem right that both graphs have the same shape.

• I think Mathematics would be a better community to ask this on. – Casper Vranken Jan 14 '17 at 20:23

Look at the vertical scales: $10^{25}$
If you want to get the step and impulse responses of an arbitrary, but stable, system try: $sys=\small tf([1], [1\hspace{2mm} 1])$