1. Matlab
Matlab中數組a的第一個元素用a[1]表示。 數組中第100個點到1000個點的子段用a(100:1000)表示。數據長度L爲:
L= 1000-(100-1)= 901
幀移爲inc,第n幀的第m個點在音頻序列的位置表示爲 index1 = inc* n + m
2 python
數組a的第一個元素用a[0]表示。其中數組中第100個點到1000個點的子段 a[ 99:1000 ]表示。數據長度L爲:
L= 1000 - 99 =901
幀移爲inc,第n幀的第m個點在音頻序列的位置表示爲 index1 = inc*(n+1)+(m+1) ; 用python計數法表示該點在音頻序列中的位置爲
Index1 = inc*(n+1) +m
3 c
c 和python類似,數組a的第一個元素用a[0]表示。其中數組中第100個點到1000個點的子段:
for(i = 99 ; i < 1000; i++){ float tmp = a[i] ; } 數據長度L = 1000- 99 = 901
4 c++
使用vector獲取元素,vector 的索引從 0 開始,其賦值和c一樣。