How to add trendline

I have a graph like below.
How can I add a trendline line to it, like a trendline black stripe in the below figure?

Answers (2)

Star Strider
Star Strider on 7 Dec 2021

0 votes

There are any number of approaches, including lowpass filters of various descriptions.
Another one would be polyfit and polyval, perhaps with a degree 4 polynomial.
.

Categories

Asked:

on 7 Dec 2021

Answered:

on 7 Dec 2021

Community Treasure Hunt

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

Start Hunting!