Help with fitting linear equation
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (4)
Thorsten
le 13 Nov 2015
help robustfit
the final exampel contains also a standard linear regression using "regress".
0 commentaires
Star Strider
le 13 Nov 2015
And a third option:
B = [ones(size(x(:))) x(:)]\y(:);
slope = B(2)
intercept = B(1)
0 commentaires
Image Analyst
le 13 Nov 2015
See my attached polyfit demo that I have posted countless times.
0 commentaires
Voir également
Catégories
En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!