[Top][All Lists]

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

Re: impz/stem/ploting

From: Mike Miller
Subject: Re: impz/stem/ploting
Date: Mon, 12 Nov 2018 09:24:31 -0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Nov 12, 2018 at 15:15:27 +0200, Tarmo Tapio wrote:
> When I try to plot code1 I get error but using code2 plotting works but
> start from 0 not -20. What is wrong my code1 (proakis). I have xubuntu 18.04
> and Octave 4.2.2.

The problem is that Octave's impz only allows the third argument N as a
scalar (number of samples), not a vector of time offsets as you are

> n = [-20:120];
> h = impz(b,a,n);

Try the following instead

    n = 120;
    [h, t] = impz (b, a, n);
    stem (t, h);

If you were using the latest version of the signal package, you would
have seen a different error message

    error: impz: N must be empty or a scalar


Attachment: signature.asc
Description: PGP signature

reply via email to

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