Rank: 42857 based on downloads (last 30 days) and 0 files 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

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com