Assuming you have the h-reflex and m-wave signals stored in two vectors H
and M
, respectively, you can calculate the peak-to-peak amplitude of the h-reflex by first subtracting the estimated baseline value from the H signal, and then calculating the max - min
value of the resulting signal. Here's some example code that demonstrates this calculation:
main.m321 chars5 lines
This code estimates the baseline value of the H signal as the mean of the first 100 samples, and subtracts this value from the entire H signal to correct for any baseline drift. It then calculates the peak-to-peak amplitude of the corrected H signal using the max
and min
functions in MATLAB. You can adjust the size of the baseline estimation window as needed for your specific data.
gistlibby LogSnag