Intersection or decision

Consider the following:

daList = {{541, 0.0593368}, {550, 0.298352}, {560, 0.72619}, {570,0.734982}, {580, 1.46149}, {590, 2.31119}, {600, 3.31509}} 

Each subscriptor represents the coordinate {x, y}.

I need to find the value of x for which Y is 1. Approximately 575 with an eye.

 ListPlot[daList, Joined -> True, Epilog ->{Thick, Line[{{0, 1}, {600, 1}}]}] 

+ Help from PPT for red parts to illustrate the question:

enter image description here

It can be interpolated until I find 1, but I want to know if there is a function in Mathematica for this.

Or a calculation. Find X for which y = 1. Or maybe a graphic in which the x coordinate of the intersection of lines is reported along the x axis.

+4
source share
4 answers
 f = Interpolation[daList]; r = FindRoot[Evaluate[f][x] - 1, {x, 570, 541, 600}] Show[Plot[{f[x], 1}, {x, 541, 600}], Graphics@Line [{{x, 0}, {x, 1}}] /. r] 

enter image description here

Edit

With a legend:

 f = Interpolation[daList]; r = FindRoot[Evaluate[f][x] - 1, {x, 570, 541, 600}] Show[Plot[{f[x], 1}, {x, 541, 600}, PlotRangePadding -> 1, Frame -> True, Axes -> False, Epilog -> Inset[Framed[Style[x /. r, Medium, Bold, Red], Background -> LightYellow], {x, 0} /. r]], Graphics[Line[{{x, -1}, {x, 1}}] /. r]] 

enter image description here

+8
source

You can use Interpolation and flip the x and y coordinates to return an InterpolatingFunction that takes y arguments. Assuming you need linear interpolation, here's how:

 f = Interpolation[daList ~Reverse~ 2, InterpolationOrder -> 1]; f[1] Out[1]=573.648 
+5
source

Here is a solution based on line intersections with linear interpolation. He will find all intersections.

 crossing[y_][ln : {{x1_, y1_}, {x2_, y2_}}] := Quiet[(x1 y - x2 y - Det@ln )/(y1 - y2)] // If[Sort[{x1, #, x2}][[2]] == #, #, Sequence @@ {}] & crossing[1] /@ Partition[daList, 2, 1] 
  {573.648} 

Several intersections:

 points = Table[{x, Sin[x]}, {x, 0, 10, 0.2}]; ListLinePlot[{points, {{0, 0.2}, {10, 0.2}}}] 

enter image description here

 crossing[0.2] /@ Partition[points, 2, 1] 
  {0.201395, 2.93926, 6.48559, 9.22311} 
+5
source

If you want a quick and rough answer without programming, you can also select a graph and press the period key (.). You will receive a cursor with a crosshair and a tooltip providing the coordinates of your crosshairs, for example:

enter image description here
(the crosshair does not stick to screendump). Please note that this is equal to the result of Mr. Wizard, which is slightly different from one of them. This is because belisarius uses Interpolation with the default setting of InterpolationOrder (3). If you use InterpolationOrder -> 1 , all answers agree.

+4
source

All Articles