How does mscohere calculate output frequency cord when no input frequency cord is given??
조회 수: 1 (최근 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에서 Unit Conversions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!