create best fit line

if i have a bunch of random numbers how do i create a best fit line for my data

Respuestas (2)

Win co
Win co el 11 de Mayo de 2012

0 votos

I suggest you to use "cftool". You have to possess an input and an output vector. The tool has a lot of fit function : gaussian, weibul, sum of sin, fourier, poly, exp, ...
Daniel Shub
Daniel Shub el 12 de Mayo de 2012

0 votos

If you just want to plot the data and line
doc lsline
If you want the equation for the the line
doc polyfit

Categorías

Más información sobre Linear and Nonlinear Regression en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 11 de Mayo de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by