how to put a line by code in regression
이전 댓글 표시
So after two days, I finally got part of my code to work for my linear regression assignment for work. Unfortunately, I don't know how to put a best-fitted linear regression line in MATLAB in the plot for linear regression. What is the code to do so?
Also, I used polyfit(x,y,1) and my output is
ans =
[-0.619 10.4846]
What is the code to write B0 and B1 on its own? I want my output to be like this:
b0 =
-0.619
b1 =
10.4846
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!