MATLAB Answers

how to find the smallest point before rising limb and then calculate the gradient between that point and peak ??

2 views (last 30 days)
Hazhan Majeed
Hazhan Majeed on 29 Apr 2021
Answered: Mathieu NOE on 29 Apr 2021
Hi everyone,
I want to find the gradient between two point, one of the points is the peak value in the data set and the other one is the lowest point before the peak. the data set is saved
in a vector (presented by the red line on the graph). i know how to locate the peak values but do not know how to tell matlab to find the the minimum point before peak. can anyone help please??

Answers (1)

Mathieu NOE
Mathieu NOE on 29 Apr 2021
once you have found the x location of the B point , let's say is xB , then you can find xA knowing the this point should appear in the vector that has length of 100 samples before xB
[valA,xA] = min(data(xB-100:xB));

Community Treasure Hunt

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

Start Hunting!