Modifying the MATLAB » History » Version 3

Chris Cannam, 2014-03-12 02:06 PM

1 1 Chris Cannam
h1. Modifying the MATLAB
2 1 Chris Cannam
3 2 Chris Cannam
h2. Context
4 2 Chris Cannam
5 2 Chris Cannam
You want to change something in the MATLAB code and deploy the changed version.
6 2 Chris Cannam
7 2 Chris Cannam
h2. You will need
8 2 Chris Cannam
9 2 Chris Cannam
 * A computer with a licensed copy of MATLAB. This step uses the "mcc" compiler included in the MATLAB distribution.
10 2 Chris Cannam
 * The Java development kit (JDK) of whichever version your MATLAB installation expects. Current MATLAB seems to call for Java 7.
11 2 Chris Cannam
12 2 Chris Cannam
You do _not_ need the separate MATLAB compiler runtime package at this stage.
13 3 Chris Cannam
14 3 Chris Cannam
h2. What to change; limitations
15 3 Chris Cannam
16 3 Chris Cannam
The webapp repository includes the MATLAB code as a sub-repository, in a directory called @mcode@. Any MATLAB code in this directory can be called from the web app. The calling convention uses a MATLAB struct to pass the arguments, as you can see in the existing examples.
17 3 Chris Cannam
18 3 Chris Cannam
File access is a thorny subject; compiled MATLAB is usually run in its own environment in which the current working directory is unpredictable. It's safest to assume that the current working directory is unavailable or unknown, and to pass in a working or scratch directory as one of the MATLAB function arguments and then use paths relative to that.
19 3 Chris Cannam
20 3 Chris Cannam
h2. How to rebuild