在 Mathematica 中使用 Manipulation 函数:
Using the Manipulate funvtion in Mathematica:
如何将滑块变量的范围扩展到 'Manipulate' 函数之外?在此编码中 'n' = 10 在 'Manipulate' 函数之前和之后,但在绘图例程中可以在 -10 和 +10 之间变化。
n = 10;
Manipulate[
Plot[Sin[n*x], {x, -5, 5}], {n, -10, 10, 1, Appearance -> "Labeled"}]
Print["n = ", n]
提前感谢所有贡献者。
诺曼
为 Manipulate 中的控制变量使用另一个变量名。
n = 10;
Manipulate[
Plot[Sin[(n = m)*x], {x, -5, 5}], {{m, n}, -10, 10, 1, Appearance -> "Labeled"}]
Print["n = ", Dynamic[n]]
如何将滑块变量的范围扩展到 'Manipulate' 函数之外?在此编码中 'n' = 10 在 'Manipulate' 函数之前和之后,但在绘图例程中可以在 -10 和 +10 之间变化。
n = 10;
Manipulate[
Plot[Sin[n*x], {x, -5, 5}], {n, -10, 10, 1, Appearance -> "Labeled"}]
Print["n = ", n]
提前感谢所有贡献者。 诺曼
为 Manipulate 中的控制变量使用另一个变量名。
n = 10;
Manipulate[
Plot[Sin[(n = m)*x], {x, -5, 5}], {{m, n}, -10, 10, 1, Appearance -> "Labeled"}]
Print["n = ", Dynamic[n]]