Hello to everyone! Could anyone tell me how to get the numbers corresponded to a certain position in a graphic, like the peaks or when it crosses the abscissa?
By “graphic” do you mean an image? If so, please attach an example to your post.
If you know the function corresponding to the graph then you can try solving f == 0 to get the roots (crossing abscissa) and solving for f' == 0 to get the local minima/maxima or point of inflection.
For instance:
sq=Table[j,{j,1000}]
n=Select[sq,PrimeQ,(100)]
sq2=Table[k,{k,100}]
n3=sq2*-1
r=Table[k1,{k1,100}]
f=(((Pi+1)*r)*Sqrt[(-2*Pi*r)/((Pi+1)*r)])/((Sqrt[(2*Pi*r)^2+2*Pi*r/n]))
bb=Im[f]
s1cc=(((1)+bb*r*Sqrt[-1])+((0)+bb*r*Sqrt[-1]))/2
zz=-n3
zx=n
x1c1c=\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(zx = 1\), \(100\)]\((1/zx*zx^s1cc)\)\)
jj=Sum[1/zx*zx^s1cc,{2,541}]
u=N[jj]
k=N[x1c1c]
x1c1c2=\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(zz = 1\), \(100\)]\((1/zz*zz^s1cc)\)\)
kk=N[x1c1c2]
x1cc1=Re[x1c1c]
x1cc2=Im[x1c1c]
x1c=Re[x1c1c2]
x1c2=Im[x1c1c2]
proof2=(x1c-x1c2)/(x1c+x1c2)
proof=(x1cc1-x1cc2)/(x1cc1+x1cc2)
g=proof-proof2
ListLinePlot[proof]
ListLinePlot[proof2]
ListLinePlot[g]
The code above does not evaluate correctly
Sum::itraw: Raw object 2 cannot be used as an iterator.
Sum::vloc: The variable 2 cannot be localized so that it can be
assigned to numerical values.
For a list of values, try FindPeaks and CrossingDetect. The latter may not satisfy your requirements.
proofN = proof // N;
peaks = FindPeaks[proofN];
zeros = CrossingDetect[proofN]*Range@Length@proofN // Thread[{#, 0}] & // DeleteCases[{0, 0}];
ListLinePlot[proofN,
PlotRange -> All,
Epilog -> {Red, Point@peaks, Blue, Point@zeros},
ImageSize -> Large]
THANK YOU SO MUCH ROHIT!!! I never heard of those commands.
If anyone know how to get the values for x the abscissa where those points and peaks are, I would thank so much.
Take a look at the value of peaks and zeros, they are lists of pairs where each pair is an x, y coordinate.
Thank you once again I have taken a look at it I just typed N[peaks] and N[zeros], thank you so much God bless you!!!
Right-Click on the (2D) graphic and click on GetCoordinates. Left-Click on a point and save the coordinates with Ctrl-C

