Tarmo Tapio
2018-11-12 13:15:27 UTC
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)')
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)')