Rank: 8095 based on 4 downloads (last 30 days) and 1 file submitted
Personal Profile:

 

Watch this Author's files

 

Files Posted by Hugh Nolan
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 May 2011 Screenshot Command window text Copies all text in the command window into a cell array of strings. Author: Hugh Nolan data export, logging, java 4 3
  • 5.0
5.0 | 1 rating
Comments and Ratings by Hugh Nolan
Updated File Comments Rating
19 May 2011 Command window text Copies all text in the command window into a cell array of strings. Author: Hugh Nolan

Thanks Jan - that didn't work exactly as written (version differences? I'm running R2007b) but gave me enough to work it out - updated and faster. Good work!

Comments and Ratings on Hugh Nolan's Files View all
Updated File Comment by Comments Rating
06 Sep 2012 Command window text Copies all text in the command window into a cell array of strings. Author: Hugh Nolan Soren Preus

20 May 2011 Command window text Copies all text in the command window into a cell array of strings. Author: Hugh Nolan Jan Simon

Yes, the com commands depend on the Matlab version. The posted code runs on 2009a.

19 May 2011 Command window text Copies all text in the command window into a cell array of strings. Author: Hugh Nolan Hugh Nolan

Thanks Jan - that didn't work exactly as written (version differences? I'm running R2007b) but gave me enough to work it out - updated and faster. Good work!

14 May 2011 Command window text Copies all text in the command window into a cell array of strings. Author: Hugh Nolan Jan Simon

A short method without FINDJOBJ:
cmdDoc = com.mathworks.mde.cmdwin.cmdWinDocument.getInstance;
Str = cmdDoc.getText(1, cmdDoc.getLength);
CStr = regexp(Str, '\n', 'split');
The methods cmdWin.findStringInContent and cmdWin.findStringInContentBackwards can be helpful also to restrict the exported string.
Strange effects are possibe with the insertString method: You can modify former output!

Contact us