Qurak

EvaluationMonitor

可用

Option whose expression is evaluated at every point sampled by Plot or NIntegrate

EvaluationMonitor
Block[{c = 0}, {FindRoot[x ^ 2 - 2, {x, 1}, EvaluationMonitor :> c++], c}] → {{x -> 1.4142135623730951}, 0}{res, data} = Reap[FindRoot[x ^ 2 - 2, {x, 1}, EvaluationMonitor :> Sow[x - Sqrt[2]]]] → {{x -> 1.4142135623730951}, {}}FindRoot[x ^ 2 - 2, {x, 1}, EvaluationMonitor :> Print["x = ", x, " x^2 - 2 =", x ^ 2 - 2]] → {x -> 1.4142135623730951}

主題

相關

全部 6300 個函式 · 從 MCP 用戶端使用這個