wolfram-mathematica - 使用 Mathematica 中的 Manipulation 函数 :

标签 wolfram-mathematica

如何将 slider 变量的范围扩展到“Manipulate”函数之外?在此编码中,“Manipulate”函数前后的“n”= 10,但在绘图例程中可以在 -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]]

关于wolfram-mathematica - 使用 Mathematica 中的 Manipulation 函数 :,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41403547/

相关文章:

function - 如何在 mathematica 中定义抽象的奇函数?

python - 编写数论程序

wolfram-mathematica - 数学 : reconstruct an arbitrary nested list after Flatten

wolfram-mathematica - 如何在Mathematica中按间隔定义函数?

oop - Mathematica OO 系统(或替代品)?

wolfram-mathematica - 使用 mathematica 计算特征值的问题

documentation - Mathematica : Function Documentation

reflection - Mathematica 中的命令完成 : suggest rules/options

string - 将字符串 hour :minutes:sec. 毫秒转换为秒

image-processing - 在 Mathematica 中重建图像