help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with Impulse response of a transfer function


From: Jez Green
Subject: Problem with Impulse response of a transfer function
Date: Fri, 18 Feb 2011 23:54:46 +0000

I'm having a bit of trouble plotting the impulse response of a tranfer
function using the control package.

My code is:

octave-3.2.4:1> num = [1 0 0 0];
octave-3.2.4:2> den =[1 -3/2 3/4 -1/4];
octave-3.2.4:3> sys=tf(num,den,0.1);
octave-3.2.4:4> y = impulse(sys);
warning: meaning may have changed due to change in precedence for && and
|| operators
octave-3.2.4:5> plot(y)

This plots the correct response however only plots it up to x = 7.
However the same plot in MATLAB gives a plot of x to between 50 & 60.

The only difference in my code is:
octave-3.2.4:3> sys=tf(num,den,0.1);
MATLAB>sys=tf(num,den,-1);

but this shouldn't make a difference as its just the sampling time

any help would be appreciated.

Thanks
Jez  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]