Modulation index for two vectors
6 次查看（过去 30 天）
Nithin Kumar 2023-9-1
I understand that you want to find the modulation index of two real and EEG signals.
To calculate the modulation index for each vector representing EEG signals in MATLAB, kindly refer to the following sample code:
1. Calculate the analytic signal for each EEG vector using the Hilbert transform.
analytic_signal1 = hilbert(signal1);
analytic_signal2 = hilbert(signal2);
2. Compute the instantaneous phase and amplitude of the analytic signals.
phase1 = angle(analytic_signal1);
phase2 = angle(analytic_signal2);
amplitude1 = abs(analytic_signal1);
amplitude2 = abs(analytic_signal2);
3. Calculate the modulation index.
modulation_index = (abs(amplitude1 - amplitude2)) ./ (amplitude1 + amplitude2);
I hope this answer helps you.