Assuming you have stored the EMG signal in a matrix emg
of size 600 x 21
, you can follow these steps in Matlab to calculate the peak to peak amplitude of the M-wave and H-reflex:
Split the EMG data into individual trials:
main.m46 chars2 lines
This will create a cell array where each element is a 600 x 1 column vector representing a single trial.
Calculate the peak to peak amplitude of the M-wave for each trial:
main.m112 chars6 lines
This will create a column vector mwave_pp
of size 21 x 1 containing the peak to peak amplitudes of the M-wave for each trial.
Calculate the peak to peak amplitude of the H-reflex for each trial:
main.m299 chars9 lines
This will create a column vector hreflex_pp
of size 21 x 1 containing the peak to peak amplitudes of the H-reflex for each trial.
Note: Depending on your specific requirements, you may need to further process the data (e.g., remove baseline drift, filter the signal) before extracting the peak-to-peak amplitudes.
gistlibby LogSnag