This coherence function is very helpful! Thanks for shareing. I am now trying to use it into an audio signal processing applicaiton to replace the MATLAB mscohere function.
Help text is useless. See the help text for mscohere for guidance. Note that the MATLAB function cohere has been replaced by mscohere. Your algorithm may be publishable, but your implementation of it is very weak. For example, diag(diag(ones(L))) is equal to eye(L) for scalar L. The function inv should not be used unless there is NO other choice. It is easily avoided here.
promising function with a debilitating disease:
- the help section urgently needs a %-marker in line#8
i leave it to duane hanselman and john d'errico to comment about the use of INV in this particular context...
us