6
Mathematica提供了许多能够将Dynamic
作为参数的函数。 例如,功能FileNameSetter具有以下变体:作为函数参数的动态
FileNameSetter[Dynamic[name]]
uses the dynamically updated current value of name, with the
value of name being reset if a different file is chosen.
不知如何人去有关定义函数图案,需要一个动态表达式作为参数。例如,这里是一个企图包裹功能LocatorPane的动态变形:
SinLocatorPane[Dynamic[sinvalue_]] :=
LocatorPane[Dynamic[x, (x = #; sinvalue = Sin[First[#]]) &],
Plot[Sin[x], {x, 0, 10}]]
什么是用于动态表达论点正确的模式?有没有在函数定义中使用动态参数的警告?
我认为教程/ AdvancedManipulateFunctionality的'自定义控件外观'部分将是相关的。不要忘记阅读本教程顶部提到的三个先决条件。 – 2011-04-18 19:07:09
感谢您提供指南的链接。 – sakra 2011-04-19 11:10:41