Azzera filtri
Azzera filtri

second derivate of an histogram

7 visualizzazioni (ultimi 30 giorni)
Ignacio Verdugo
Ignacio Verdugo il 26 Mar 2018
Risposto: Star Strider il 26 Mar 2018
Hi!
I'm plotting an area of an image that each day (represented by #fx) gets darker. The values are normalised by a white region, that is why the values varies from 0 to 1 (first image).
As you can see in the first image (3fx), there are two peaks between 0.7 and 0.8. And then along time, the smallest peak becomes bigger.
I want to measure how much does the peaks moves from on day to another. I found an option to plot the histogram as a curve using 'ksdensity',as you can see in the second image for 3 different days.
How can I transform that curve to a function so I can calculate the second derivate, to see the peaks of each day and quantify how much do they translate along time?

Risposte (1)

Star Strider
Star Strider il 26 Mar 2018
I am not sure what you want.
You can use the gradient (link) function to take the numerical derivative, and use it a second time (or the related del2 (link) function) to take the second derivative.
If you only want to locate the peak amplitudes and their positions, I would use the Signal Processing Toolbox findpeaks (link) function.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by