MATLAB中的历史记录命令缓冲区-按命令编号调用 [英] history command buffer in MATLAB - call by command number

查看:82
本文介绍了MATLAB中的历史记录命令缓冲区-按命令编号调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以按其编号从Matlab历史记录中调用命令的方式,几乎与unix/linux中的方式相同

Can I call a command from matlab history by its number, pretty much in the same fashion as in unix/linux

!10

有人知道吗?

推荐答案

可以使用Java以编程方式访问命令历史记录.

It is possible to access the command history programmatically using java.

javaHistory=com.mathworks.mlservices.MLCommandHistoryServices.getSessionHistory;

如果要评估历史记录中的第10条命令,则可以运行

If you want to evaluate the 10-th command in the history, you'd run

eval(javaHistory(10).toString)

这篇关于MATLAB中的历史记录命令缓冲区-按命令编号调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆