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

1 view (last 30 days)
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??
thanks

Answers (1)

Mathieu NOE
Mathieu NOE on 29 Apr 2021
hello
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
so
[valA,xA] = min(data(xB-100:xB));

Categories

Find more on Data Preprocessing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!