Rank: 63258 based on 0 downloads (last 30 days) and 0 file submitted
photo

Andrey Pudeyev

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Andrey View all
Updated File Comments Rating
06 Oct 2009 EditorMacro - assign a macro to a keyboard key-stroke in the Matlab Editor and Command Window EditorMacro assigns a macro or action to requested key-binding in the Matlab Editor & Command Window Author: Yair Altman

Great work, just the very thing I missed in a matlab interface - a customizable macro.

Summarizing the examples of posted here, i propose the following solution for exception management:
-----------
function trycatch(hDocument,eventData)
% Get Selected text in current editor
selectedText = char(hDocument.getSelectedText);

modifiedText = ['try' char(13) selectedText char(13) 'catch' char(13) 'keyboard' char(13) 'end'];

% Update selection in current editor
hDocument.replaceSelection(modifiedText);
--------------

This will allow quickly put the selected text block inside try-catch construction

06 Oct 2009 EditorMacro - assign a macro to a keyboard key-stroke in the Matlab Editor and Command Window EditorMacro assigns a macro or action to requested key-binding in the Matlab Editor & Command Window Author: Yair Altman

Contact us