精華區beta MATLAB 關於我們 聯絡資訊
※ 引述《tomacca (到處都有缺陷...)》之銘言: : matlab非常初學者來請教各位大大問題 : 問題如下 : 一千筆數據..要如何寫出其autocorrelation funciton 程式 : 希望各位板友提供意見及做法 感謝 function r=myautocorr(in,P) r=zeros(1,P+1); Ln=length(in); for i=1:(P+1) r(i)=in(i:end)*(in(1:end-i+1))'/(Ln-i+1); end r=[r(end:-1:2) r]; 或是 r=xcorr(in,P,'unbiased') 會有相同的結果 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.17.147
tomacca:感謝感謝 01/07 15:26