Assuming you have a signal stored as an array in Matlab, you can calculate a secondary peak-to-peak amplitude as follows:
main.m412 chars13 lines
This code generates an example signal, calculates the first peak-to-peak amplitude, finds the index of the first peak in the signal, and then calculates the secondary peak-to-peak amplitude by finding the minimum and maximum values in the portion of the signal following the first peak.
gistlibby LogSnag