trend line calculation and display

 Respuesta aceptada

Harry MacDowel
Harry MacDowel el 17 de Oct. de 2011

10 votos

First, plot the data like usual.
Then go to Tools -> Basic Fitting
Choose one of the fittings you like, then check Show Equation
Remember to click the Right Arrow key at the bottom right to view the values of the coefficients for the fit.

Más respuestas (2)

Sarah Weihmann
Sarah Weihmann el 14 de Mzo. de 2017

3 votos

Hi Aravind S,
try the fit command for trendline calculation: http://de.mathworks.com/help/curvefit/fit.html Display the equation y=m*x+n as >> m=3; >> n=4; >> legend(sprintf('y=%f*x+%f',m,n));
Cheers, S
aravind S
aravind S el 9 de Feb. de 2017

0 votos

Is there command available?

1 comentario

Pablo López
Pablo López el 27 de Jun. de 2018
Editada: Pablo López el 27 de Jun. de 2018
Sure! Take a look of polyfit for polynomial curve fitting.
Hope that helps!

Iniciar sesión para comentar.

Categorías

Preguntada:

el 17 de Oct. de 2011

Comentada:

el 1 de Jun. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by