That's what is known as "piecewise" or "broken-stick" regression model. To incorporate the breakpoint into the model is often called a "change point" regression. It's relatively simple to do, but is a nonlinear problem.
The change point model starts with the broken-stick model, i.e.
Y=b0 + b1(X) + b2(X-C) + e
where
Y is the response variable,
X is the covariate, and
CP is the change point, i.e. where the break occurs.
e is the error term
To formulate a changepoint model into a functional form that can use to estimate the coefficients b and C, write something like
CP=b(4);
if (X < CP) then
Y = b(1) + b(2)*X;
else
Y = b(1) + b(2)*X + b(3)*(X-CP);
end
as the functional and use Matlab lsqnonlin
I left CP in as the changepoint to make the code read a little more easily while Matlab uses the array for all the coefficients.
ADDENDUM
That is, the "real" function would look more like--
if (X < b(4)) then % b4 is the estimated breakpoint value
Y = b(1) + b(2)*X;
else
Y = b(1) + b(2)*X + b(3)*(X-b(4));
end