Assuming you have the m-wave and h-reflex waveforms stored in matrices, where each row corresponds to a stimulation step, you can use the peak2peak
function in MATLAB to calculate the peak-to-peak amplitude of each waveform at each step. Here's an example code snippet:
main.m514 chars14 lines
This should output the peak-to-peak amplitudes for each waveform at each step, as shown below:
main.m186 chars10 lines
Note that the peak2peak
function operates along a specified dimension, so if your waveforms are transposed (i.e. rows represent the samples and columns represent the stimulation steps), you'll need to specify dim=1
instead.
gistlibby LogSnag