3.28571

3.3 | 7 ratings Rate this file 77 downloads (last 30 days) File Size: 1.54 KB File ID: #3194

func_coherence.m

by Nobuhito Mori

 

26 Mar 2003 (Updated 01 Jul 2009)

Code covered by BSD License  

This m-function computes coherence and phase at the same time.

Download Now | Watch this File

File Information
Description

This very simple m-function computes cross spectrum, coherence and phase at the same time. The input parameters are equivalent to pwelch.n or csd.m in MATLAB and use csd.m in the singal toolbox.

It's very simple but useful for engineers.

Required Products Signal Processing Toolbox
MATLAB release MATLAB 6.5 (R13)
Zip File Content  
Other Files func_coherence.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
02 Apr 2004 A Zaki

Good program..

16 Apr 2005 Philip Orton

I agree. Simple, but just what I was looking for, since I wasn't aware of how to compute phase. A minor improvement would be to allow the user to ignore the filt and n_overlap inputs, just as one can do with the csd.m function.

02 Aug 2005 Vitaliy Marchenko

check it with two aboslutely identical sinusoidal waves of any frequenciy (let say) - 50 hz ... - and you will be surprized... - it doesn't work as Matlab standart function - 'cohere' or 'mscohere'(for version 7.0)

22 Jun 2006 Jon Fram

I got it to produce the same output as mscohere by replacing csd with cpsd. I also wasn't clear how to calculate phase. func_coherence.m makes that clear to me. Thanks.

05 Oct 2006 j p  
10 Oct 2006 jan pospisil  
03 Jun 2007 k walker

This is indeed nice, but it would have been better if it showed exactly how cpd's were calculated. Curse matlab for hiding such details.

Please login to add a comment or rating.
Updates
01 Jul 2009

BSD license has been applied.

Tag Activity for this File
Tag Applied By Date/Time
spectral analysis Nobuhito Mori 22 Oct 2008 06:58:55
cross spectrum Nobuhito Mori 22 Oct 2008 06:58:55
coherence Nobuhito Mori 22 Oct 2008 06:58:55
phase Nobuhito Mori 22 Oct 2008 06:58:55
signal processing Nobuhito Mori 22 Oct 2008 06:58:56
cross spectrum bagi 20 Apr 2009 08:28:26
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com