Ältere Kommentare anzeigen
今、研究でデータの相関を調べています。
自分が使っている関数は”corrcoef”です。しかしながら、先行研究では、wavelet解析を行ってるため、waveletを使用して、相関を調べたいです。
調べたところ、”corrcoef”は短い時間においての相関を調べるにはあまり向いていないと記載されていました。時間は、短い時間において、相関を見るにはどのようにするのが最も良い選択でしょうか。
waveletで、相関を見ることは可能なのか、他の関数だと何がおすすめなのか、教えてほしいです。
Akzeptierte Antwort
Weitere Antworten (1)
時間ごとのコヒーレンスをプロットするということなので先のコメントで述べた通りかと思います。下記が例となります。
t = 0:0.001:2;
x = cos(2*pi*10*t).*(t>=0.5 & t<1.1)+...
cos(2*pi*50*t).*(t>= 0.2 & t< 1.4)+0.25*randn(size(t));
y = sin(2*pi*10*t).*(t>=0.6 & t<1.2)+...
sin(2*pi*50*t).*(t>= 0.4 & t<1.6)+ 0.35*randn(size(t));
wcoh = wcoherence(x,y,1000);
c = max(wcoh,[],1); % 時間ごとの最大の相関値
plot(t,c);
信頼区間みたいなものがどのように出ているかわかりかねますが、表示であればarea関数が使えそうです。
https://www.mathworks.com/help/matlab/ref/area.html
1 Kommentar
Sato Ren
am 26 Nov. 2021
Kategorien
Mehr zu Wavelet Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!