Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: last typed matlab command

$
0
0
I know this thread is ancient but i was looking for a solution to this. A much safer way of obtaining the last typed command is:

hist = com.mathworks.mlservices.MLCommandHistoryServices.getSessionHistory;
last = string(hist(end));

Viewing all articles
Browse latest Browse all 19628

Trending Articles