Reputation: 333
I have just started with Octave this month and I'm starting to have some problems a I do not understand. I keep getting this error stem: inconsistent size of x and y
and I don't know why.
octave:17> sig2=([100:2:120])
sig2 =
100 102 104 106 108 110 112 114 116 118 120
octave:18> stem([10033:10053],sig2,'*')
error: stem: inconsistent size of x and y
error: called from:
error: /usr/share/octave/3.6.2/m/plot/private/__stem__.m at line 413, column 11
error: /usr/share/octave/3.6.2/m/plot/private/__stem__.m at line 37, column 50
error: /usr/share/octave/3.6.2/m/plot/stem.m at line 81, column 7
Upvotes: 0
Views: 1696
Reputation: 2431
They are different! 100 to 120 by 2 result in 10 values. 10033 to 10053 by 1 result in 20 values. You might want to change one of them.
sig2=([100:2:120])
stem([10033:2:10053],sig2,'*')
Upvotes: 1