MATLAB Answers

How can I obtain slope of a trend line calculated for a time serie

3 views (last 30 days)
Hamed Hedayatnia
Hamed Hedayatnia on 30 Oct 2020
Commented: Hamed Hedayatnia on 30 Oct 2020
Hi folks,
I wanna obtain the slope of the trend lines which have been calculated for time series. As you can see in the attached plot, there are 3 time serie and trend line has been shown for each one. How can I obtain the slope of each trend line?

  0 Comments

Sign in to comment.

Answers (1)

Rafael Hernandez-Walls
Rafael Hernandez-Walls on 30 Oct 2020

  3 Comments

Hamed Hedayatnia
Hamed Hedayatnia on 30 Oct 2020
Unfortunately this topic is about calculating and plot the trend, not about determining the slope of the trend.
Hamed Hedayatnia
Hamed Hedayatnia on 30 Oct 2020
polyfit is not applicable on time series because the x values are dates.
Error using polyval (line 67)
Inputs must be floats, namely single or double.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!

Translated by