我有一个相当高的振荡函数,我需要在区间 (-Pi,Pi) 中找到 ArgMax。
当我绘制函数时,很明显 FindArgMax 选择了错误的最大值。我尝试过调整 AccuracyGoal 和 PrecisionGoal,以及各种可用的方法,但这似乎没有达到所需的效果。
w[SNR_] :=
RandomVariate[NormalDistribution[0, 0.5*Sqrt[2]*10^(-SNR/20)], 16] +
I RandomVariate[NormalDistribution[0, 0.5*Sqrt[2]*10^(-SNR/20)], 16]
G[\[Omega]_] := Re[Sum[(Exp[1.2556 I (m - 1)] + noise[[m]]) Exp[-I \[Omega] (m - 1)], {m, 1, 16}]/16]
noise = w[-20];
estimate = FindArgMax[G[\[Omega]], \[Omega], Method -> "QuasiNewton",
AccuracyGoal -> 30, PrecisionGoal -> 30][[1]];
Plot[G[x], {x, -Pi, Pi}, Epilog -> Line[{{estimate, -100}, {estimate, 100}}], PlotRange -> All, Frame -> True, Axes -> None, FrameTicks -> {{-Pi, -Pi/2, 0, Pi/2, Pi}, Automatic, {}, {}},PlotRangePadding -> {0, 0.05}]
Print[estimate]
有没有办法找到全局最大值?