Re: local maxima of a histogram



James wrote:
Is there a MATLAB function to calculate all the local
maxima of a histogram?

Otherwise, I think I`ll have to calculate the mode,
remove (or zero) that value, then calculate it again, down
to some specified level.

I have to find all the maxima, then test to see if any
of the maxima are within a given value of the others, then
do some more combining.

Thanks, Alan

Not sure I completely understand what you need, but assuming that you
are dealing with an m x n matrix of values that represent your
histogram data, you can use the 'max' command to tell MATLAB to find
the max along a particular dimension (see 'help max' for more). One of
many solutions would be to use 'repmat' and 'diff' to do the second
part of your analysis.
.



Relevant Pages

  • Re: local maxima of a histogram
    ... I have to find all the maxima, then test to see if any of the maxima are within a given value of the others, then do some more combining. ... It's worth noting that in many situations the local maxima in a histogram will be very dependent on the bin that you use. ... So unless you have some a priori reason for choosing a specific set of bins, you might think about using something like KSDENSITY from the Statistics Toolbox instead of a histogram. ...
    (comp.soft-sys.matlab)
  • local maxima of a histogram
    ... Is there a MATLAB function to calculate all the local ... maxima of a histogram? ... remove (or zero) that value, then calculate it again, down ... I have to find all the maxima, then test to see if any ...
    (comp.soft-sys.matlab)
  • Re: local maxima of a histogram
    ... and then sorting the output. ... maxima of a histogram? ... remove (or zero) that value, then calculate it again, ... I have to find all the maxima, then test to see if any ...
    (comp.soft-sys.matlab)
  • Re: finding minimum
    ... >I differentialted 1/2a with respect to a and set it equal to zero. ... Rewriting this, we have ... on, it should be s imple matter to check the maximum value ... maxima will be the global maximum. ...
    (sci.math)
  • Re: Linear Algebra Challenge
    ... so I resorted to Maxima. ... constraint that the determinant of the matrix has to be zero. ... I tried using MSLV on my 49g+ to solve for the 15 ... Since that didn't work I tried to minimize this dist function by ...
    (comp.sys.hp48)

Loading