Finding decrease in slope for multiple samples

16 Ansichten (letzte 30 Tage)
Adam Fleetwood
Adam Fleetwood am 24 Jul. 2020
Kommentiert: Adam Fleetwood am 24 Jul. 2020
For the MATLAB code I am trying to write, there is a slope of Force vs. Displacement. The initial region of the plot is linear while the final half is more unpredictable, but has a much lower slope than the initial region. I am interested in finding where the two average slopes of the inital and final regions intersect, as this leads to a value essential for the project. I am currently using specific values for displacement to find the slope between these two points, but I am attempting to find a way such that the code can determine which region is the linear region and which region should be used for the final slope. This is because the index values will not always be exactly the same for each sample. I have previously attemped to use the ischange function, but couldn't find a consistent, accurate result.
  2 Kommentare
Adam Fleetwood
Adam Fleetwood am 24 Jul. 2020
I've included the portion of code in question along with a plot that shows the original graph (yellow) along with the inital slope (blue) and the final slope(red).

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by