there are many threaads about this theme, but I couldnt find the one which fits my problem.
I have set of datapoints with X and Y coordinates. From experience I can say, that they are best represented with two straight lines with an Intersection point.
So, there are two linear regression formulas f1(x) = m1 * x + b1 , f2(x) = m2 * x + b2. How can I get the best matching parameter pairs (with minimal squared error) [m1 m2] and [b1 b2] using a matlab fit?