Hi Frank,
You can define a piece-wise fitting function in the Fitting Function Organizer.
The Parameter Names are x1, y1, x2, y2, k1, k2.
The point (x1,y1) is the intersection of your first range and second range.
The point (x2,y2) is the intersection of your second range and third range.
k1, k2 represent the derivative at the point (x1,y1) and (x2,y2) respectively.
Use x1, y1, k1 to define the fitting function for the first range.
Use x2, y2, k2 to define the fitting function for the third range.
Use all the parameters to define a cubic polynomial for the second part.
Note that, the intersections and their first-order derivatives are continuous.
The body of the Function is:
-------------------------------------------------------------------
if(x<x1)
y = k1*(x-x1)+y1;
else if (x<x2)
y = y1*(x-x2)/(x1-x2)+y2*(x-x1)/(x2-x1)+(k1-(y2-y1)/(x2-x1))*(x-x1)*(x-x2)^2/(x1-x2)^2+(k2-(y2-y1)/(x2-x1))*(x-x1)^2*(x-x2)/(x2-x1)^2;
else
y=k2*(x-x2)+y2;
----------------------------------------------------------------------
You need to fix x1 and x2 in Parameter Settings with your data range intersections.
Save this user-defined fitting function. Then you can use this fitting function to do the fitting after initializing the parameters in the NLFit-dialog.
Cecilia
Originlab Corp.