如何在 wxmaxima GUI 中绘制 bode_gain?

How to plot a bode_gain inside the wxmaxima GUI?

我无法在 wxmaxima 的 GUI 中绘制 bode_gain,我知道,例如,“wxplot”在 GUI 中绘制,但将前缀放在 bode_gain 函数上不会为我工作,所以

有人可以告诉我如何在 wxmaxima GUI 中绘制 bode_gain 函数而不是使用新图形 window 来帮助我吗?

查看代码 (share/contrib/bode.mac),我发现没有规定调用不同的绘图函数,它始终是内置的 plot2d。对于 wxMaxima 来说,能够使用 wxplot2d 是件好事,因为这会生成嵌入图。

这里有一种方法可以在 bode_gainbode_phase 的定义中替换对 plot2d 的调用。

load ("bode.mac");
''(subst (plot2d = wxplot2d, fundef (bode_gain)));
''(subst (plot2d = wxplot2d, fundef (bode_phase)));

注意前两个字符是两个单引号,不是双引号。 quote-quote '' 的作用是从 fundef.

返回的现有函数定义中评估由 subst 构造的修改后的函数定义

另一种方法是在您的安装中找到 bode.mac,然后编辑文件以 wxplot2d 而不是出现 plot2d 的地方。

我会更新bode.mac,这样绘图功能更容易更改,新版本将出现在Maxima 的未来版本中(5.46 是下一个)。