PCDVD數位科技討論區

PCDVD數位科技討論區 (https://www.pcdvd.com.tw/index.php)
-   疑難雜症區 (https://www.pcdvd.com.tw/forumdisplay.php?f=34)
-   -   求救matlab (https://www.pcdvd.com.tw/showthread.php?t=720489)

arhat 2007-05-21 11:26 PM

求救matlab
 
請教各位

我現在有1800個值把他存成txt檔

排列為

3.01399
3.02288
2.98860
3.01526
3.01272
.
.
.
我想按照順序以十個為單位來平均

來得到180個值

請問我該如和用matlab讀取txt檔

和該如何寫

180個值的平均數


下面是我寫的程式碼

clear all
a=load('t3.txt')
for i = 1:180
a(i) = sum( (i-1)*10+1 : i*10 );
end

執行一直錯誤

不知我哪裡寫錯了

該如何寫才是我需要的

謝謝各位


所有的時間均為GMT +8。 現在的時間是05:01 AM.

vBulletin Version 3.0.1
powered_by_vbulletin 2025。