Maple:具有 params[1];返回“a[0] = 2”如何使a[0] = 2?
所以我有一些名为 params[];
的数组,其中有诸如 a[0] = 2
之类的内容。我想让所有这些项目真正有意义,我称之为 a[0];并得到 2. 如何在枫树中做这样的事情?
So I have some array called params[];
there are things like a[0] = 2
in it. I want to make all such items real meaning I would call a[0]; and get 2. How to do such thing in maple?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些并不是实现您的目标的唯一方法。但希望他们能指导你。
一种方法是单独处理每个这样的方程(来自
params
)。您可能将
params
的所有条目都设为方程,并希望一次为所有条目完成相同的任务。或者,您可能希望使用大写数组而不是小写数组(在现代 Maple 中已弃用)。
或者,您可能有一些
params
条目是方程,而其他条目是其他类型(例如,仅仅是标量表达式)。在这种情况下,您可以首先选择那些作为方程的方程,并且仅使用该子集进行分配。These are not the only ways to accomplish your goal. But hopefully they'll guide you.
One ways is to handle each such equation (from
params
) individually.You might have all entries of
params
being equations, and wish to accomplish the same task for all entries, at once.Or, you might wish to use uppercase Array instead of the lowercase array (which is deprecated in modern Maple).
Or you might have some entries of
params
being equations, and others being some other type (mere scalar expressions, say). In that case you might first select those which as equations, and only assign using that subset.