You are on page 1of 1

Curve Fitting for log x vs log D graph:

Data Input (Co-ordinates of points):


In[1]:= data = {{0.556, 4.568}, {0.568, 4.556}, {0.579, 4.544}, {0.591, 4.531},
{0.612, 4.518}, {0.623, 4.505}, {0.623, 4.491}, {0.643, 4.477}, {0.662, 4.462}, {0.672, 4.447}};

Find the line that best fits the data:


In[2]:= line = Fit[data, {1, x}, x]
Out[2]= 5.14063 - 1.02909 x

Show the data with the curve:


In[6]:= Show[ListPlot[data, PlotStyle → Red], Plot[{line}, {x, 0, 0.8}]];

In[5]:= Show[%4, AxesLabel → {HoldForm[Log x], HoldForm[Log D]}, PlotLabel → HoldForm[Log x vs Log D graph], LabelStyle → {GrayLevel[0], Bold}]
Log x vs Log D graph
Log D

4.56

4.54

4.52
Out[5]=

4.50

4.48

4.46

Log x
0.56 0.58 0.60 0.62 0.64 0.66

You might also like