Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intersection or Solve

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 sublist represent an {x,y} coordinate.

I need to find the x value for which the Y is equal to 1. Roughly 575 with the eye.

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

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

enter image description here

Could interpolate till I find 1 but I want to know if there exist a function for this in Mathematica.

Either a computation. Find the X for which y = 1. Or maybe a graphical one in which line intersection x coordinate is reported on the x-axis.

like image 630
500 Avatar asked Nov 30 '22 03:11

500


1 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 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

like image 192
Dr. belisarius Avatar answered Dec 05 '22 06:12

Dr. belisarius