How does mscohere calculate output frequency cord when no input frequency cord is given??
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to work with mscohere for the first time and I don't understand how does it calculates the output frequqncy when no input frequency cord is given. Here is a simple example through which I am trying to understand this.
%% Creat a Step Fuction
t=1:0.01:3;
h=ones(1,201);
h(1:101)=0;
figure; plot(t,h,'.-k','linewidth',1.5,'markersize',12);
For simplicity I calculate correlation of the function with itself.
%% Calculate Coherence function
freq=1./t;
fs=1/0.01;
[Cxy, freqs] = mscohere(h,h, [], [],freq, fs);
figure;
plot(freqs, Cxy,'.-r', 'linewidth',2, 'markersize',18);
then I get same frequency cord as input freqency, which makes sens that it is calculating correlation at each point of the given frequency. But if I use the following:
[Cxy, freqs] = mscohere(h,h, [], [], fs);
I get 51 values in output frequency and values are completely different then previos case. I do not understand, how it calculates when no input frequency is given. I think it is related to default value of the hamming window but I don't understand it clearly. How does it choose those particular frequencies?
Could someone please help me to understand this?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bartlett 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!