Assuming that each row of the matrix corresponds to a different trial and each column corresponds to a different data point in time, first you need to identify the time window for the m-wave and h-reflex.
Once you have identified the time windows, you can extract the relevant data points for each trial using MATLAB's indexing capabilities. Then, for each trial, you can calculate the peak-to-peak amplitude of the m-wave and h-reflex by finding the maximum and minimum values within the respective time window and taking their difference.
Here's an example MATLAB code that assumes the time window for the m-wave is from data points 50 to 75, and the time window for the h-reflex is from data points 100 to 125:
main.m802 chars32 lines
This code should result in two arrays, mw_amplitude
and hr_amplitude
, which contain the peak-to-peak amplitudes of the m-wave and h-reflex for each of the 21 trials.
gistlibby LogSnag