如何在终端中更改Matlab设置(对于history.m)?

发布于 2024-12-12 19:50:31 字数 373 浏览 3 评论 0原文

我在 MacBook 的远程服务器上使用 Matlab。部分原因是我发现 Matlab GUI 在 X11 下很笨重,所以我在终端窗口中使用它(通过运行 matlab -nodesktop)。这一直工作得很好,直到我现在需要从命令历史记录中复制一些内容。

似乎history.m只在退出时保存,即使当我检查GUI中的设置时,它说它正在为每个命令保存。当 Matlab 从终端运行时,exit 语句似乎包含在 History.m 中,但不在 GUI 中,因此 GUI 中的设置似乎不适用于此处。我在 Matlab 帮助页面中找不到有关如何更改终端窗口设置的任何内容。

我需要在会话仍处于打开状态时访问它的命令历史记录。有谁知道我该如何做到这一点——除了开始使用 GUI 之外?

I am using Matlab on a remote server from my MacBook. Partly because I find the Matlab GUI clunky under X11, I use it in the terminal window (by running matlab -nodesktop). This has been working fine, until I now needed to copy some stuff from the command history.

It seems like history.m is only being saved on exit, even though when I check the settings in the GUI, it says that it is being saved for each command. It also seems like exit statements are included in history.m when Matlab is run from terminal, but not in the GUI, so it seems like the settings in the GUI don't apply there. I cannot find anything in the Matlab help pages on how to change the settings for the terminal window.

I need to access the command history for my session while it is still open. Does anybody have an idea about how I can do this -- short of starting to use the GUI?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

许你一世情深 2024-12-19 19:50:32

您可以尝试一下日记功能。它将命令及其(基于文本的)结果记录到文件中。在我的系统(带有 MATLAB R2011b 的 Mac OSX)上,输出不会立即显示在日记文件中,但当您关闭日记时它会更新。如果需要,您可以重复执行此操作,而无需退出 matlab。

You might try the diary function. It logs both commands and their (text based) results to a file. On my system (Mac OSX with MATLAB R2011b), the output does not show up in the diary file immediately, but it does update when you turn off the diary. Which you can do repeatedly if you need without exiting matlab.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文