isControllable 和 isObservable 枫叶函数:有没有办法让它们显示步骤?
所以我们可以使用 isObservable 来处理某些系统,但我想知道我们是否可以让 tham 显示 staps 或做类似的事情。这可能吗?
So we can use isObservable to work with some systems but I wonder If we can make tham show staps or do something like that. Is that possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您实际上指的是
Observable
和Controllable
命令,它们是DynamicSystems
包的一部分。一些 Maple 例程具有所谓的
userinfo
消息,这些消息可以选择显示并且可以显示部分步骤。这些通常可以通过像infolevel[DynamicSystems]:=6
这样的调用来启用,其中 6 是最高级别的详细信息。值越低,可能显示的细节越少。不幸的是,这些特定的 DynamicSystems 例程中似乎没有任何用户信息消息。所以这对你的情况没有直接帮助。有时一个包会调用另一个包。当调用
Controllable
时,会在某个时刻调用例程LinearAlgebra:-Rank
。我猜您不希望在Rank
中看到用户信息消息,这可以通过对 1 到 1 之间的某些 n 发出infolevel[LinearAlgebra]:=n
来启用6.另一种方法是将
printlevel
设置为高。但这样做会使所有 Maple 内部调用也变得冗长。例如,设置printlevel:=20
的结果输出是巨大的。我怀疑您是否会发现这种方法有用。另一种选择是将某些例程设置为选项
trace
。有时这样做需要知道适当的内部例程的名称。由于并非所有非导出模块本地变量默认情况下都是可见的,这一事实使情况变得更加复杂。您可以尝试先发出调用trace(DynamicSystems::ControllableSS):
,然后再在系统上调用Controllable
。这显示了一些中间结果,但这些结果对您来说可能没有多大意义,除非您知道哪些源代码行正在生成这些结果。您可以通过发出命令showstat(DynamicSystems::ControllableSS);
查看源代码,这是一个示例,
通过查看
ControllableSS
例程的源代码,您可以推断出当指定楼梯方法时,它会调用DynamicSystems:-StaircaseTransformation
。因此,在这里您也可以发出showstat(DynamicSystems::StaircaseTransformation)
来查看该内部(本地)例程的来源。或者您也可以追踪
该例程。作为一般规则,您可以使用
:-
表示法引用模块或包的exports
。您可以使用::
表示法而不是:-
将此类名称传递给trace
和showstat
,除非您首先设置kernelopts(opaquemodules=false)
。如果内部子模块成员的名称中包含多个:-
,则必须使用圆括号分隔符通过::
语法来引用它。抱歉,这不是那么容易表达的。I'm supposing that you are actually referring to the
Observable
andControllable
commands which are part of theDynamicSystems
package.Some Maple routines have so-called
userinfo
messages, which are optionally displayed and which can show partial steps. Those would typically be enabled with a call likeinfolevel[DynamicSystems]:=6
where 6 is the highest level of detail. With a lower value less detail might be displayed. Unfortunately, these particular DynamicSystems routines don't seem to have any userinfo messages in them. So this won't help directly in your case.Sometimes one package calls another. The routine
LinearAlgebra:-Rank
is called, at some point, whenControllable
is called. I'm guessing that you don't wish to see userinfo messages inRank
, which would be enabled by issuinginfolevel[LinearAlgebra]:=n
for some n between 1 and 6.An alternative is to set
printlevel
high. But doing so will make all Maple internal calls also be verbose. The resulting output of setting, say,printlevel:=20
is overwhelming. I doubt that you'd find this approach useful.Another alternative is to set certain routines as option
trace
. Sometimes doing so entails knowing the names of the appropriate internal routines. And this is made more complicated by the fact that not all non-exported module locals are visible by default. You could try first issuing the call,trace(DynamicSystems::ControllableSS):
before invokingControllable
on your system. That shows some intermediary results, but those might not make much sense to you unless you know what source lines are generating those results. You can see the source by issuing the command,showstat(DynamicSystems::ControllableSS);
Here's an example,
By looking at the source of the
ControllableSS
routine, you can deduce that it callsDynamicSystems:-StaircaseTransformation
when the staircase method is specified. So here too you could issueshowstat(DynamicSystems::StaircaseTransformation)
to see the source of that internal (local) routine. Or you couldtrace
that routine as well.As a general rule, you can refer to
exports
of a module or package using the:-
notation. And you can pass such names totrace
andshowstat
using the::
notation instead of:-
, unless you have first setkernelopts(opaquemodules=false)
. If an inner submodule member has more than one:-
in its name then you'd have to use round-bracket delimiters to refer to it with the::
syntax. Sorry, that that's not so easy to express.