使用多行命令调用 Matlab 历史记录
我在Matlab的命令行中有一个命令,它比一行长,但是当通过按向上箭头调用它时,我只能浏览多行代码的每一行......有没有一种方法可以调用完成最后一次执行,无论是单行还是多行?! 谢谢!
I have a command in the command line of Matlab which is longer than just one line but when recalling it by pressing arrow-up, I just can go through every single line of the multiline-code... Is there a way to recall the complete last execution, no matter if just single or multiline?!
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在“命令历史记录”窗口中,突出显示相关行并按 F9(如果您的快捷方式与我的不同,则右键单击并选择“评估选择”)。
In the Command History window, highlight the relevant lines and press F9 (or right-click and select Evaluate Selection if your shortcuts differ from mine).
最简单的解决方案是右键单击命令历史记录窗口中的特定行,然后选择
Copy
或Evaluate Selection
:)如果您想复制历史记录的重要部分,那么您可以输出历史文件的内容(存储在
history.m 中)
在首选项目录中)到命令窗口并从那里复制。上面的命令和屏幕截图是在 Mac 上进行的。与往常一样,请小心 Windows 上的
/
。我永远记不起它朝哪个方向倾斜...The simplest solution is to right click the particular line in the command history window and select
Copy
orEvaluate Selection
:)If you'd like to copy a significant portion of your history, then you can output the contents of your history file (which is stored in
history.m
in the preferences directory) to the command window and copy from there.The above command and the screenshot were on a Mac. As always, be careful with the
/
on Windows. I can never remember which way it leans...