当我使用 Manipulate 时,我可以做到:
Manipulate[x, {u, 1, 10}]
实际上,我的控件很多且复杂,因此我更喜欢将它们的定义从Manipulate表达式中分离出来,像这样:
control = {u, 1, 10}
Manipulate[x, control]
但这会导致一个错误:
Manipulate argument control does not have the correct form for a \
variable specification.
为什么它不能那样工作呢?
Manipulate
代码在我的 MacBook 的 13 英寸屏幕上无法正常显示。我要么使用这种技巧,要么每次需要修改时都要尝试将整个代码放在脑海中。由于我已经必须认真思考我实际解决的问题,因此我宁愿通过添加一些字符来减少代码复杂性。 - acl