Setting up peakfinder
1. download the peakfinder package from the link above. extract/unzip the folder and put it in a folder under your MATLAB path
2. in matlab, add the peakfinder folder to path (file -> set path, click on set path, select the peakfinder folder by browsing, click on save...
Given the above example: x = [1 1 1 1 3 4 1 1 1 1]
peakfinder (http://www.mathworks.com/matlabcentral/fileexchange/25500) gives you the following:
[peak loc] = findpeaks(x)
peak = 4 <-- the amplitude of the peak is 4
loc = 6 <-- the location of the peak is 6
there are also lots of...