To calculate the peak-to-peak amplitude of both the M-wave and H-reflex in a 21 data point by 600 trial matrix EMG signal in MATLAB, follow these steps:
First, preprocess the EMG signal by filtering out any noise or artifacts that might be present. You can use bandpass filters to isolate the frequencies of interest.
Next, segment the EMG signal into individual trials of 21 data points each. You can do this by looping through the 600 trials and extracting the appropriate segment from each trial.
Compute the peak-to-peak amplitude of each trial for both the M-wave and H-reflex. To do this, find the maximum and minimum voltage values within the segment and subtract them from each other. This will give you the peak-to-peak amplitude for that trial.
Store the peak-to-peak amplitude values in separate arrays for the M-wave and H-reflex.
Finally, plot the peak-to-peak amplitude values for each trial using a scatter plot or line plot. You can also calculate summary statistics such as the mean, median, and standard deviation of the peak-to-peak amplitudes for each condition.
Here's some sample MATLAB code to get you started:
main.m1393 chars50 lines
gistlibby LogSnag