line equation from (x,y)
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi Friend I have 1000 x and y s . how i can find line equation for these points?
0 commentaires
Réponses (1)
Star Strider
le 4 Août 2016
Modifié(e) : Star Strider
le 4 Août 2016
For a linear fit, use the mldivide,\ operator:
b = [ones(size(x(:))) x(:)]\y(:);
slope = b(2)
intercept = b(1)
0 commentaires
Voir également
Catégories
En savoir plus sur Mathematics and Optimization 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!