3.159 FAQ-1024 How to perform linear fit on a part of the log-log plot?

Last Update: 11/4/2019

If you have a log-log plot and want to perform a linear fit on a segment of the curve, you can

perform an apparent fit directly if you already know the precise range of the input segment:
  1. Select the segment using Data Selector, or open the Linear Fit dialog, edit the Input Range in the Input tab and check the Apparent Fit check box in the Fit Control of Linear Fit dialog.
  2. Click OK button to perform the linear fit.
convert the scale to Linear and perform a piece-wise fit if you don't know the the precise range of the input segment:
  1. Use Set Column Value to convert the log scale to Linear for both Col(A) and Col(B), such as enter log(A) in the formula cell of column A.
  2. Open NLFit dialog and select the function PWL3 or PWL2 under the Piecewise category to perform a piece-wise fit on the whole curve.
    FAQ1024-PieceWiseFit-01.png
  3. In the fitting result table, you will get the X coordinates for the turning points(such as the points xi1 and xi2 below) and the slope of the target segment(such as the parameter k2 below).
    FAQ1024-PieceWiseFit-02.png
  4. Convert the x coordinate values back to the log scale, by executing the calculations x1=10^(xi1) and x2=10^(xi2).
  5. You can use the X coordinate values to perform the apparent fit just as the fist case above.

Keywords:log-log, fit a part, linear fit, apparent fit, fit a segment, log scale, partly fit, piece-wise fit