Finding decrease in slope for multiple samples

5 visualizzazioni (ultimi 30 giorni)
Adam Fleetwood
Adam Fleetwood il 24 Lug 2020
Commentato: Adam Fleetwood il 24 Lug 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 Commenti
Adam Fleetwood
Adam Fleetwood il 24 Lug 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).

Accedi per commentare.

Risposte (0)

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by