Help with fitting linear equation
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I need help with my HW pls, I have a data set and I have to fit a linear equation on a given data to identify the intercept and the slope
0 comentarios
Respuestas (4)
Thorsten
el 13 de Nov. de 2015
help robustfit
the final exampel contains also a standard linear regression using "regress".
0 comentarios
Star Strider
el 13 de Nov. de 2015
And a third option:
B = [ones(size(x(:))) x(:)]\y(:);
slope = B(2)
intercept = B(1)
0 comentarios
Image Analyst
el 13 de Nov. de 2015
See my attached polyfit demo that I have posted countless times.
0 comentarios
Ver también
Categorías
Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!