Coherence function


    Jul 19 2016 | 2:20 pm
    Hello Max fellows,
    This is my first post. I am a quite new max user so hopefully this is the right place to ask for help ;-)
    I am trying to calculate a the coherence function for two signals. https://en.wikipedia.org/wiki/Coherence_(signal_processing)
    Could not find a statistics object or external to do such a calculation. Perhaps someone has a hint for me where i can find some statistics examples.
    I am asking because I dont want to reinvent the wheel ;-)
    All the best, Mike

    • Jul 20 2016 | 11:49 pm
      I think the zsa descriptors package might have a spectral coherence external: http://www.e--j.com/index.php/download-zsa/ if not, it might help in building one yourself
    • Jul 22 2016 | 9:39 am
      Hello Floating Point,
      Thank you very very much for looking into this problem.
      I also checkt the zsa descriptors package. Sadly there is no abstraction for a coherence ... There is only a basic statistic external. zsa.ampstats~: Report min/mean/max/sum of a signal vector or a FFT frame.
      But i found a gen example for detecting a delay with the correlation function. Perhaps you could give me a hint, how to transform it into a coherence function ;-) My math is a bit rusty .....
      All the best, Mike
    • Jul 24 2016 | 11:43 am
      I think they're different beasts, one works in the freq domain, the other in the time domain, so no simple translation as such.
      I had a look at the link, but there's something I don't get: if the convolution squared of two signals is divided by the magnitudes of the two signals multiplied by each other (in the freq domain) then the answer will always be 1, so there's something I don't understand in the formula, otherwise I could probably whip up a pfft patch to do it...