|
From: | Doug Stewart |
Subject: | Re: Problem with Impulse response of a transfer function |
Date: | Sat, 19 Feb 2011 07:19:27 -0500 |
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
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
num = [1 0 0 0];
den =[1 -3/2 3/4 -1/4];
sys=tf(num,den,1);
y = impulse(sys,1,60,60);
plot(y)
Doug
[Prev in Thread] | Current Thread | [Next in Thread] |