help-octave
[Top][All Lists]
Advanced

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

Re: Problem with Impulse response of a transfer function


From: Doug Stewart
Subject: Re: Problem with Impulse response of a transfer function
Date: Sat, 19 Feb 2011 13:14:50 -0500



On Sat, Feb 19, 2011 at 10:52 AM, Jez Green <address@hidden> wrote:
Thanks Doug massive help using the Tstop value sorted out the problem.

I was thinking down the line of adjusting the plot and not the array.

Jez



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
>
>




You are welcome!

reply via email to

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