Finding the slope of line
조회 수: 471 (최근 30일)
이전 댓글 표시

I have to find slope of best line (acceleration). How can I find it ? I couldn't find any datas about it on the internet.
댓글 수: 1
Stephen23
2018년 11월 8일
"How can I find it ?"
By the definition of slope: the change in Y divided by the change in X.
채택된 답변
KSSV
2018년 11월 8일
If you have points: use slope formula:
m = (y2-y1)/(x2-x1) ;
Or, fit a straight line using polyfit
p = polyfit(x,y,1) ;
In the above p will be a 2x1 matrix, which gives slope and y intercept.
Or, if you have image and want coordinates from there slope use:
댓글 수: 6
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!