line equation from (x,y)
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi Friend I have 1000 x and y s . how i can find line equation for these points?
0 Commenti
Risposte (1)
Star Strider
il 4 Ago 2016
Modificato: Star Strider
il 4 Ago 2016
For a linear fit, use the mldivide,\ operator:
b = [ones(size(x(:))) x(:)]\y(:);
slope = b(2)
intercept = b(1)
0 Commenti
Vedere anche
Categorie
Scopri di più su Mathematics and Optimization in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!