Code covered by the BSD License  

Be the first to rate this file! 18 Downloads (last 30 days) File Size: 200 KB File ID: #24128

Evaluate Selected Code from any Application in MATLAB

by

 

When running this tool will enable you to evaluate selected code from any application in MATLAB.

| Watch this File

File Information
Description

In recent releases of MATLAB you can select MATLAB code in the Editor or documentation and press F9 to evaluate it in MATLAB. To expand this functionality to outside MATLAB, I created a tool called RunSelectedCodeInMatlab. It works in two modes:

Print mode (F9): similar to what is available in MATLAB. It prints the selected code, line by line at MATLAB command.

Hidden mode (F10): The code won’t be printed at MATLAB command and won’t show up in the command history but variables are created in the workspace and outputs are shown (figures, untruncated outputs, etc.,).
This mode requires MATLAB Automation Server to be enabled and when you run the tool it will prompt to enable the Automation Server for you.

To use the tool:
1- Download and run it.

2- You must have MATLAB open when you run it. It will ask to enable MATLAB Automation Server for you. This is needed for the “hidden” mode to work.

3- Now select MATLAB code in any application (web browser, PDFs, word docs, etc.). You can select multiple lines of code.

4- Press F9 (for the print mode) or F10 (for the hidden mode).

MATLAB release MATLAB 7.8 (R2009a)
Other requirements Should work with all versions of MATLAB.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
07 Jun 2013 Anand Rangaramu

Could you please provide the source for this application

Contact us