Code covered by the BSD License  

Highlights from
func_coherence.m

3.28571

3.3 | 7 ratings Rate this file 32 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)

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

| 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)
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
signal processing Nathalie 25 Jun 2010 12:29:27
coherence Miguel Escudero 11 Jul 2011 12:19:58
coherence ricardo 09 Dec 2011 00:34:37
cross spectrum ricardo 09 Dec 2011 00:34:40
phase ricardo 09 Dec 2011 00:34:42
signal processing ricardo 09 Dec 2011 00:34:45
spectral analysis ricardo 09 Dec 2011 00:34:47

Contact us at files@mathworks.com