Plot trend line based on data imported from excel

8 Ansichten (letzte 30 Tage)
Tsvetan Donov
Tsvetan Donov am 10 Jun. 2017
Kommentiert: Rena Berman am 13 Jun. 2017
Hi, I have used matlab for some time now, for importing data from excel and plotting it in matlab because the graphs look much better. This is the first time I have to do a trend line of the data. What is the way to do it because in insert there is no trend line option. In excel this is much simpler.
Do you have any idea how to do it?
I want to find trend line for the orange line separate from the blue line as well as a combined trend from both data sets.
I have attached a photo you can see the data there.
Best Regards,
Tsvetan

Antworten (2)

Star Strider
Star Strider am 10 Jun. 2017
No image and no data.
If you just want to plot a linear least-squares fit to your data, see if the lsline (link) function will do what you want.
The polyfit and polyval functions can create polynomial fits to your data, and will return parameters for the fit.

Tsvetan Donov
Tsvetan Donov am 10 Jun. 2017
I am sorry, it didnt upload for some reason.

Community Treasure Hunt

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

Start Hunting!

Translated by