Can I call a command from matlab history by its number, pretty much in the same fashion as in unix/linux
!10
Anybody knows?
It is possible to access the command history programmatically using java.
javaHistory=com.mathworks.mlservices.MLCommandHistoryServices.getSessionHistory;
If you want to evaluate the 10-th command in the history, you'd run
eval(javaHistory(10).toString)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With