line equation from (x,y)
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi Friend I have 1000 x and y s . how i can find line equation for these points?
0 Kommentare
Antworten (1)
Star Strider
am 4 Aug. 2016
Bearbeitet: Star Strider
am 4 Aug. 2016
For a linear fit, use the mldivide,\ operator:
b = [ones(size(x(:))) x(:)]\y(:);
slope = b(2)
intercept = b(1)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!