使用CPSD计算置信区间

问题描述

我需要计算使用cpsD命令计算出的相干性和相位的置信区间,但是我找不到用于此的内置选项。 我正在寻找类似的东西

[pxx,f_C,pxxc] = pwelch(x,hamming(L),noverlap,fs,'ConfidenceLevel',0.95);

以下是来自matlab的一些典型数据:

Fs = 1000;
t = 0:1/Fs:0.296;

x = cos(2*pi*t*100)+0.25*randn(size(t));
tau = 1/400;
y = cos(2*pi*100*(t-tau))+0.25*randn(size(t));

[Cxy,F] = mscohere(x,y,[],Fs);

[Pxy,F] = cpsd(x,Fs);

subplot(2,1,1)
plot(F,Cxy)
title('Magnitude-Squared Coherence')

subplot(2,2)
plot(F,angle(Pxy))

hold on
plot(F,2*pi*100*tau*ones(size(F)),'--')
hold off

xlabel('Hz')
ylabel('\Theta(f)')
title('Cross Spectrum Phase')

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)