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??