Finding decrease in slope for multiple samples

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

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).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2020년 7월 24일

댓글:

2020년 7월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by