MATLAB: Trend line calculation and display equationinterpolationmathematics Hi, how can I obtain and display a trend line from some points? I need the equation of the trend line. Thanks Best Answer First, plot the data like usual.Then go to Tools -> Basic FittingChoose one of the fittings you like, then check Show EquationRemember to click the Right Arrow key at the bottom right to view the values of the coefficients for the fit. Related SolutionsMATLAB: What is the difference between the LAR and Bisquare robust option in the Curve Fitting tool 'LAR' specifies the least absolute residual method.'Bisquare' specifies the bisquare weights method.For more detailed information on these two methods please see the following links:Robust Lease SquaresMATLAB Answers post on the differences between the twoMATLAB Answers post on LAR methodRobustfit function from Stat Toolbox which gives more general info and references on rubust fittingWordpress article that discusses these methods MATLAB: How to get trendline equation for to graphs Calculate the line fit variables in your code using polyfit: http://ch.mathworks.com/help/matlab/ref/polyfit.htmlUsing 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. Related QuestionHow to make trendline in matlab using polyfit commandFit and Polyfit (LAR vs. Least squares)
Best Answer