Code covered by the BSD License  

Highlights from
Matlab Daemon

Be the first to rate this file! 9 Downloads (last 30 days) File Size: 8 KB File ID: #30120

Matlab Daemon

by Joshua Dillon

 

21 Jan 2011 (Updated 24 Jan 2011)

A Bash script & Mex program which allows for #!-style scripting against a background Matlab session.

| Watch this File

File Information
Description

Unfortunately Mathworks has not designed Matlab to behave like the typical Unix interpreter, i.e., there is no #! ("shebang") support similar to Bash, Perl, or Python. This submission demonstrates how to set this up using only about 20 lines of bash (and a small mex program written in C).

To minimize execution time of each #! script, the provided Bash script establishes a background session of Matlab and re-uses this session as needed.

Please see "readme.html" for installation and comments.

MATLAB release MATLAB 7.11 (2010b)
Other requirements Unix, Linux, Mac
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
24 Jan 2011 Joshua Dillon

The script is available here:
http://www.almostsure.com/mytoolbox/utility/kill/matlabd

24 Jan 2011 Joshua Dillon

The script is available here:
http://www.almostsure.com/matlabd

16 May 2012 Mathieu Dubois

Interesting concept.

It would be really interesting to be able to pipe data to the script. Do you have any idea on how to do that?

16 May 2012 Joshua Dillon

Hi Mathieu. That's the idea--just look at the code--it already does this.

Please login to add a comment or rating.
Updates
24 Jan 2011

Updated documentation.

Tag Activity for this File
Tag Applied By Date/Time
unix Joshua Dillon 24 Jan 2011 10:52:00
linux Joshua Dillon 24 Jan 2011 10:52:00
bash Joshua Dillon 24 Jan 2011 10:52:00
daemon Joshua Dillon 24 Jan 2011 10:52:00
shebang Joshua Dillon 24 Jan 2011 10:52:00
script Joshua Dillon 24 Jan 2011 10:52:00

Contact us at files@mathworks.com