将 whos 命令的输出保存到文件中

Saving output of whos command into a file

如何在 Octave 中将 whos 命令的输出保存到一个文件中。有人可以推荐我吗?

要保存屏幕输出,diary 很有用。

以下命令会将 whos 输出保存在名为 "whos_output.txt".

的文件中
diary("whos_output.txt")
whos
diary off