I'm very new to the Matlab and Octave "World". I've been suffering for some hours to make a simple script run. Problem is, my teacher wrote it on Matlab, and I can't find a way to make it work on Octave. The script finds the impulse answer for the system and plots the curve. Here it is:
b = [1]; a = [1, -1, 0.9]; n = [0:100];
h = impz(b,a,n);
stem(n,h);
subplot(1,1,1);
title('Impulse Response'); xlabel('n'); ylabel('h(n)');
The error is:
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 questao6_lab2 at line 4 column 1
I understand it is because of the axis difference. Though, I don't understand why octave gives only a single value for h. The function Impz should describe a curve all along thee values of n, but i doesn't.
Thanks