How is it possible in MATLAB to calculate Coherence as a function of time for two nonstationary signals (EEG) as shown on the below image. I want to genereate a similar one in matlab. Can someone please help me. I am very new to matlab so a code will help.
Below are the equations for coherence. I have read that a multitaper moving window can be used. For this application, a 300 ms multitaper moving window can be used in time steps of 10 ms. I dont know how to implent it in matlab.