Assuming that you have a 21-by-n matrix where each row represents a single trial of your EMG signal and n is the number of samples per trial, the peak-to-peak amplitude of the M-wave and H-reflex can be calculated as follows:
main.m613 chars10 lines
This code will create two vectors, m_wave_ppa
and h_reflex_ppa
, each with 21 elements, where each element represents the peak-to-peak amplitude of the M-wave and H-reflex for each trial, respectively. You can then calculate the mean and standard deviation of these vectors to obtain summary statistics.
gistlibby LogSnag