help-octave
[Top][All Lists]
Advanced

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

impz/stem/ploting


From: Tarmo Tapio
Subject: impz/stem/ploting
Date: Mon, 12 Nov 2018 15:15:27 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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.

code1

b = [1]; a = [1, -1, 0.9];
n = [-20:120];
h = impz(b,a,n);
subplot(2,1,1); stem(n,h)
title('Impulse Response'); xlabel('n'); ylabel('h(n)')


error: stem: inconsistent sizes for X and Y
error: called from
    __stem__>check_stem_arg at line 276 column 11
    __stem__ at line 37 column 40
    stem at line 127 column 8
    example2_11 at line 4 column 17

code2
b = [1]; a = [1, -1, 0.9];
n = [120];
h = impz(b,a,n);
subplot(2,1,1); stem(h)
title('Impulse Response'); xlabel('n'); ylabel('h(n)')


reply via email to

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