How to get trendline equation for to graphs
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Emil Eterovic
am 29 Feb. 2016
Beantwortet: Florian
am 1 Mär. 2016
So i have made two plots on the same graph,and now i need trendline equtions for them both. I know how to get the trendlines themselfs and only one equation at a time,but i was wondering if there is a way for them both to be present at the same time? Because if i use tools->basic fitting then only one equation for one plot can be on the graph. Thanks
0 Kommentare
Akzeptierte Antwort
Florian
am 1 Mär. 2016
Calculate the line fit variables in your code using polyfit: http://ch.mathworks.com/help/matlab/ref/polyfit.html
Using the parameters, calculate x and y values for each fit.
After plotting your points, use the command "hold on" to plot the other datapoints and all trendlines.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!