How to find the intersection of linear regression model and yline – MATLAB Answers


Pretty boring data.

P = polyfit(T(:,1),T(:,2),1)

P =

1.0000 0.0000

<mw-icon class=””></mw-icon>

<mw-icon class=””></mw-icon>

They are the coefficients of the linear polynomial model. The model is of the form:

Y = a*X + b

So if you want to solve for x, given y, just use algebra.

Since your data was so simple, the line is just the 45 degree line, with X == Y here.



Source link

Leave a Comment