Wolfram mathematica 查找两个ListPlot的交点';数学硕士

Wolfram mathematica 查找两个ListPlot的交点';数学硕士,wolfram-mathematica,Wolfram Mathematica,我有两组离散数据,用Mathematica中的ListPlot绘制为两种不同的颜色(红色和蓝色)。我想找到这两条曲线之间的交点(对应连续曲线的交点),即A点和B点,如图所示 我曾尝试过“FindCluster”方法并跳转以获得数据形成行的子集,但效果不太好 现在我总是使用“GetCoordinate”属性直接从图形中获取数字。如果能有一种方法能够自动且更精确地完成,那就太好了。我不确定这对您的情况是否方便,但我有时会让Mathematica插值点列表,然后求解交点: findGuesses[p

我有两组离散数据,用Mathematica中的ListPlot绘制为两种不同的颜色(红色和蓝色)。我想找到这两条曲线之间的交点(对应连续曲线的交点),即A点和B点,如图所示

我曾尝试过“FindCluster”方法并跳转以获得数据形成行的子集,但效果不太好


现在我总是使用“GetCoordinate”属性直接从图形中获取数字。如果能有一种方法能够自动且更精确地完成,那就太好了。

我不确定这对您的情况是否方便,但我有时会让Mathematica插值点列表,然后求解交点:

findGuesses[pointsTable1_, pointsTable2_] := Block[{interpolatingPolyF1, interpolatingPolyF2}, interpolatingPolyF1 = Function[{x}, Evaluate[InterpolatingPolynomial[pointsTable1, x]]]; interpolatingPolyF2 = Function[{x}, Evaluate[InterpolatingPolynomial[pointsTable2, x]]]; (*Print[Plot[{interpolatingPolyF1[x],interpolatingPolyF2[x]},{x,0,2}]];*) {x, y} /. NSolve[{y == interpolatingPolyF1[x], y == interpolatingPolyF2[x]}, {x, y}, Reals] ] FindGuesss[pointsTable1,pointsTable2]:= 块[{插值多边形F1,插值多边形F2}, 插值polyF1= 函数[{x},求值[插值多项式[pointsTable1,x]]; 插值polyF2= 函数[{x},求值[插值多项式[pointsTable2,x]]; (*打印[Plot[{InterpolingPolyF1[x],InterpolingPolyF2[x]},{x,0,2}]];*) {x,y}/。 NSolve[{y==interpolingpolyf1[x], y==插值polyF2[x]},{x,y},Reals] ]
这在我的例子中不起作用,因为不可能对我拥有的数据进行插值(如图所示,它们是多值函数)。我想您提供的解决方案仅适用于单值函数。无论如何,谢谢你。