coherence plot and correlation plot,time domain to frequency domain
    6 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Sana Ejaz
 el 1 de Jul. de 2019
  
    
    
    
    
    Respondida: Navya Seelam
    
 el 17 de Jul. de 2019
            Hi ,
I have attached a sample data.I want to create a correlation as well as coherence plot for the attached time series data.
In order to understand the difference between time and frequency domain of time series I need to plot both correlation and coherence of same time series so that I can spot and understand the difference.Since I am new to the frequency domain concept I don't know how to measure coherence and how to make coherence plot.My understanding is that in order to measure coherence  I would need to convert the time series that is in time domain to frequency domain.But I dont know how to do that.
Would highly appreciate if someone can help.
0 comentarios
Respuesta aceptada
  Navya Seelam
    
 el 17 de Jul. de 2019
        Hi, 
If you have the Signal Processing Toolbox, use the function "mscohere" to plot coherence. 
n = 0:599; 
x = cos(pi/4*n)+randn(size(n)); 
y = 1/2*sin(pi/4*n)+randn(size(n)); 
[Cxy,W] = mscohere(x,y); 
Plot(W,Cxy) 
You can obtain the correlation using the function "xcorr"
C=xcorr(x,y); 
For more details check the MATLAB documentation of the above functions 
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

