Assuming that you have already filtered the EMG signal and identified the M-wave and H-reflex peaks, you can use the following code to calculate their peak-to-peak amplitude:
main.m1036 chars27 lines
Note that this code assumes that the M-wave and H-reflex peaks for each trial and channel have already been identified and stored in the m_peaks
and h_peaks
variables, respectively. Also, the emg_data
variable should be a 3D matrix of size num_data_points x num_trials x num_channels.
gistlibby LogSnag