Plot trend line based on data imported from excel
3 views (last 30 days)
Show older comments
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
2 Comments
Answers (2)
Star Strider
on 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.
0 Comments
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!