How does mscohere calculate output frequency cord when no input frequency cord is given??

1 visualización (últimos 30 días)
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?

Respuestas (0)

Categorías

Más información sobre Unit Conversions en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by