Running a command in the console so it appears in the history

5 views (last 30 days)
Hi,
com.mathworks.mlservices.MLCommandHistoryServices can be used to get and remove the history but is there a way to append something? For example, I'd like to run '%foo bar' in the command console and and have it appear as the last line in history (up key recovers it).
com.mathworks.mlservices.MLExecuteServices.consoleEval allows me to evaluate something in in the context of the console but it doesn't get appended to the history.
Any ideas?
Thanks

Accepted Answer

Nathan
Nathan on 2 Jul 2013
Self-update: you can do it with com.mathworks.mlservices.MLExecuteServices.executeCommand().

More Answers (0)

Categories

Find more on Entering Commands in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!