On Sat, 2011-02-19 at 07:19 -0500, Doug Stewart wrote:
>
>
> On Fri, Feb 18, 2011 at 6:54 PM, Jez Green <
address@hidden> wrote:
> 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
>
>
>
> try this
> 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
>
>