資源簡介
利用matlab進行自相關(guān)除噪的經(jīng)典方法。代碼用來說明相關(guān)的基本問題

代碼片段和文件信息
%Samp9_1
N=100000;???%數(shù)據(jù)個數(shù)
randn(‘state‘0);???%設(shè)置產(chǎn)生隨機數(shù)的狀態(tài)
y=randn(1N);??%產(chǎn)生一個隨機序列
disp(‘平均值:‘);
yMean=mean(y)???%計算隨機序列的均值
disp(‘平方值:‘);
y2p=y*y‘/N????%計算其均方值這里利用了矩陣相乘的算法
disp(‘平方根:‘);
ysq=sqrt(y2p)?????%計算其均方根值
disp(‘標準差:‘);
ystd=std(y1)???%相當于ystd=sqrt(sum((y-yMean).^2)/(N-1))
disp(‘方差:‘);
yd=ystd.*ystd
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????398??2006-12-25?19:46??自相關(guān)除噪\samp9_1.m
?????文件????????908??2006-12-25?19:47??自相關(guān)除噪\samp9_2.m
?????目錄??????????0??2012-04-22?21:22??自相關(guān)除噪
-----------?---------??----------?-----??----
?????????????????1524????????????????????4
評論
共有 條評論