Min and local max of a curve

F
Fakhr-al-din · Feb 25, 2021 · 1.9K views
Question
Hi I have a histogram which I want to find its min and max. So lets say the first max happens around 0.1 the local mean is at around 0.3 and second local max is at around 0.8.   I use findpeaks command but my first question is how to find a location on horizontal axis after having the index of maxima or minima? (specially for the minima and second max)?   2-How to find location of minimum because findpeaks only gives maximum location?  
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 18, 2026

The usual method is to use findpeaks on the inverted signal, so that what were once valleys (minima) now become peaks.

 

flippedSignal = max(signal) - signal;
By the way, what does this have to do with image processing?
 
 
TF = islocalmax(A) returns a logical array whose elements are 1 (true) when a local maximum is detected in the corresponding element of A.

 

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!