Generate Relative Peak Position Reports

1 view (last 30 days)
James
James on 14 Mar 2011
Hello, I'm rather new to matlab, and am still learning the ropes. I'm playing with methods to threshold a 1D line, identify the peaks, and output the relative positions of those peaks.
I've got a function to generate a line scan of my images, which give me the peaks. I need to know how far apart all the peaks are from eachother to determine the regularity of these features. Here is some example data that I'm looking at:
http://i53.tinypic.com/sq4785.png
I'm using my own linescan function, and was tinkering with a function I found here called peakdet.m, which gives the peak maxima and minima. I'm reasonably happy with the maxima and minima, but how should I go about generating the report of absolute relative peak positions of all the peaks?
Vertical heights aren't particularly important; whats important is the unit distance between all the peaks for coming up with a physical model of what I'm looking at.

Answers (1)

Paulo Silva
Paulo Silva on 14 Mar 2011
put the x position of all of them in a vector (x) and do
diff(x)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!