For each frequency, divide the measurement time into chunks.  For each chunk, do your estimation of the amplitude at that frequency in both the input and output channels.  Then compute the coherence for this ensemble of measurements at each frequency.  

For example, if you measure at each frequency for Ncyc cycles, then divide these into Navg measurements each of Ncyc/Navg cycles.

A nice reference on this subject is Bendat and Piersol.

Algorithm to estimate coherence when measuring a transfer function with a swept sine
Generally in my answers I like to add sources to, in some sense, back up what I claim in said answer. I often use wikipedia, but recently have seen a few comments saying "don't trust wikipedia entirely for advanced mathematics". I personally haven't seen any fallacies from wikipedia, but then again I'm not exactly in high level math (the math I'm studying right now I can't exactly find on wikipedia ;)). The general question here is as in the title:


  Is wikipedia a valid source to use on MSE?


Recently (meaning today) I have been using wolfram pages as my backup. I do not believe the general public can edit that so I feel it may be safer. Is there some sort of regulation for this?
