If I have two set of data such as:
data5 = {{-2.`, -0.007008009734230887`}, {-1.5228787452803376`,
0.03830991145135324`}, {-1.`,
0.014605055663889335`}, {-0.5228787452803376`, \
-0.01894062130202948`}, {-4.821637332766436`*^-17, \
-0.008347638159826627`}, {0.4771212547196624`, \
-0.014816432977226584`}, {1.`,
0.026906017564620632`}, {1.4771212547196624`,
0.3867839577138885`}, {2.`,
0.563485775448038`}, {2.4771212547196626`,
0.8415445741788008`}, {3.`,
1.0876231237435008`}, {3.477121254719662`,
1.377784291681077`}, {4.`, 2.021630688190699`}};
data45 = {{-2.`, 0.028505019782043887`}, {-1.5228787452803376`,
0.145355594235398`}, {-1.`,
0.2367119881931513`}, {-0.5228787452803376`,
0.5038649822289214`}, {-4.821637332766436`*^-17,
0.8806044159680895`}, {0.4771212547196624`,
1.374633368524427`}, {1.`,
2.1552475532987945`}, {1.4771212547196624`,
2.790482121197644`}, {2.`,
3.3951653306812712`}, {2.4771212547196626`,
4.088759791862447`}, {3.`,
4.641978562314361`}, {3.477121254719662`,
5.262194040385147`}, {4.`, 5.247505774294609`}};
which plotted like:
ListPlot[data5, PlotRange -> All,
PlotMarkers -> {Automatic, Offset[13]}, AspectRatio -> 1 ,
Frame -> True, Axes -> False, AspectRatio -> 1,
FrameStyle -> Directive[Black, 13]]
ListPlot[data45, PlotRange -> All,
PlotMarkers -> {Automatic, Offset[13]}, AspectRatio -> 1 ,
Frame -> True, Axes -> False, AspectRatio -> 1,
FrameStyle -> Directive[Black, 13]]
Gives (without the red line):
Questions:
- How can I find the "best intercept" of several points with the x-axis (as shown by the red line) for both data sets?. (I know there can be several intercepts but at least one that allow me to get the best fit from certain data that I can later extend or remove)
- How can I find the x-axis value where the intercept happens?