2014-10-31 95 views
0

本月我剛開始使用Octave,並開始出現一些我不明白的問題。我一直得到這個錯誤詞幹:inconsistent size of x and y ,我不知道爲什麼。幹:x和y尺寸不一致

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 

回答

1

他們是不同的! 100到120乘以2得到10個值。 10033至10053由1導致20個值。你可能想要改變其中之一。

sig2=([100:2:120]) 
stem([10033:2:10053],sig2,'*') 
+0

我懷疑值的數量差異是問題,現在我知道了。非常感謝朋友 – eneko 2014-10-31 11:48:36

+0

按使用尺寸檢查(...) – Steffen 2014-10-31 11:49:53