How can i get the eigenvalues of a noise signal ?
2 ビュー (過去 30 日間)
古いコメントを表示
Greetings everyone
In order to get the eigenvalues of a noise signal, i use this MATLAB Book function to calculate the cross correlation vector:
function[r]=aasamplebiasedautoc(x,lg)
%this function finds the biased autocorrelation function
%with lag from 0 to lg;it is recommended that lg is 20-30% of
%N;
N=length(x);%x=data;lg=lag;
for m=1:lg
for n=1:N+1-m
xs(m,n)=x(n-1+m);
end;
end;
r1=xs*x'
r=r1'./N;
and then i calculate the autocorrelation matrix and the eigenvalues using:
rx = aasamplebiasedautoc(x,M)
Rx=toeplitz(rx);
[Dx]= eig(Rx)
where M is the filter order (i used M = 40). the source is '' Adaptive Filtering : fundamentals of Least Mean Squares with MATLAB '' 2014 Alexander D. Poularikas.
applying this to a sine wave 1 x 181 give me those results:
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0001
0.0002
0.0002
0.0002
0.0002
0.0003
0.0003
0.0004
0.0004
0.0006
0.0007
0.0009
0.0012
0.0016
0.0023
0.0034
0.0053
0.0089
0.0165
0.0350
0.0850
0.1307
0.1664
0.4456
0.5020
9.1991
9.2807
and when i apply it to a noise signal with dimensions 859758 x 1 i get those results:
0.0000
0.0001
0.0012
0.0012
0.0015
0.0025
0.0026
0.0042
0.0042
0.0050
0.0050
0.0054
0.0056
0.0059
0.0064
0.0067
0.0070
0.0073
0.0078
0.0081
0.0083
0.0084
0.0093
0.0117
0.0134
0.0140
0.0157
0.0160
0.0175
0.0193
0.0205
0.0259
0.0272
0.0280
0.0579
0.1175
0.2477
0.2896
0.4634
0.5280
which seems very small. is there a problem with my code ? or is there another way to extract the eiganvalues from a noise signal ?
Thanks for your attention
Best regards
2 件のコメント
回答 (1 件)
Gayathri
2024 年 12 月 25 日
I understand that you want to calculate the eigen value of an input signal for which first you are finding the autocorrelation with a lag parameter. A convenient way to do this in MATLAB is by using the "xcorr" function, which allows you to specify the maximum lag. The usage of the function is as follows.
r = xcorr(x, maxlag);
Additionally, the "xcorr" function provides a "scaleopt" parameter to specify the normalization option, such as "biased" or "unbiased".
For more information about the "xcorr" function, please use the below command to access the documentation.
doc xcorr
Hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Linear Algebra についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!