Commit 72e4ccd4 authored by Michael Krause's avatar Michael Krause 🎉
Browse files

matlab: typos

parent 35c5fa45
......@@ -11,7 +11,7 @@ A workaround is to "compile" a script and create a standalone redistribution
environment, which does not require a license to run.
Different Matlab versions are available via environment modules. You can list
them with `module avail matlab` and activate a specific version with `module
them with :program:`module avail matlab` and activate a specific version with :program:`module
load matlab/<version>`.
Regular sessions
......@@ -47,12 +47,12 @@ start in command line mode.
>> _
In a job context you would just run `matlab -r main` with main.m containing your script:
In a job context you would just run :program:`matlab -r main` with main.m containing your script:
.. code-block:: bash
[krause@master ~] echo "module load matlab/R2014b; matlab -m main" | qsub -d.
[krause@master ~] echo "module load matlab/R2014b; matlab -r main" | qsub -d.
.. important:
......@@ -87,10 +87,10 @@ over. A little like this maybe:
Running :program:`mcc -m project.m` would then "compile" (or rather encrypt and
package) your function and output a system dependent binary named
:file:`project` a wrapper script file:`run_project.sh`. To run your script you
now have to combine the shell wrapper script, the location of a Matlab Compile
Runtime or the local installation path of the matlab instance that was used by
mcc and a sufficient number of arguments for the function project().
:file:`project` and a wrapper script :file:`run_project.sh`. To run it you
now have to combine the wrapper script, the location of a Matlab Compile
Runtime or the local installation path of the matlab instance, that was used by
mcc, and a sufficient number of arguments for the function project().
Example:
......@@ -110,7 +110,7 @@ Example:
[krause@master ~]
To include toolboxes in you script you have to add them during the compile step
To include toolboxes in your script you have to add them during the compile step
so they get included in your package. Matlab built-in toolboxes like signal
processing or statistics are detected automatically by scanning the functions
used in your script and don't need to be added explicitly.
......@@ -119,6 +119,7 @@ Example: Suppose you collect your project library in a toolbox called project,
which in turn uses the function `normrnd()` from the statistics package:
.. code-block:: bash
[krause@master ~] cat matlab/tools/project/myrnd.m
function X = myrnd(arg)
......@@ -127,10 +128,12 @@ which in turn uses the function `normrnd()` from the statistics package:
You can then either use the "-a" or the "-I" switch of mcc to add your own toolbox.
+ `-a`: will add the functions or directories listed directly to the compiled package/archive
+ `-I`: will add the location to the mcc search path so it get's included implicitly
+ **-a** will add the functions or directories listed directly to the compiled package/archive
+ **-I** (uppercase i) will add the location to the mcc search path so it get's included implicitly
Both options should work fine.
Both options should work fine. The example below uses mcc from matlab R2014b,
but you can use any version. The important part is to use the same Matlab
version as MCR upon script invocation with :program:`run_project.sh`.
.. code-block:: matlab
......@@ -157,25 +160,25 @@ Both options should work fine.
.. note::
You only have to compile your project once and can then use it any number
of times. Matlab extracts your package a shared hidden folder called
of times. Matlab extracts your package to a shared hidden folder called
`.mcrCache<Version-Number>`. Those folders sometimes get corrupted by
Matlab, especially when multiple jobs start at exactly the same time. The
only workaround so far is to add a sleep 1s between qsub calls and hope
there is no collision. Also, it makes sense to regularly remove those
directories. But make sure all your jobs have finished before removing
them with `rm -rf .mcrCache*`.
them with :file:`rm -rf .mcrCache*`.
SPM
---
SPM already comes as a pre-compiled version and can, identical to the examples
above, be started with `run_spm8.sh` or `run_spm12.sh`. Usually users are
above, be started with :program:`run_spm8.sh` or :program:`run_spm12.sh`. Usually users are
exporting a number of batch files with the spm gui on their local machine,
change the paths to reflect the names on the tardis and then call
:program:`run_spm12.sh` with the **run** parameter for each batch file.
Example: segmentation for a number of nifti images. The file batch.template contains the string `%%IMAGE%%` as a placeholder so we can easily replace it with the current image path and create a number of new batches from a single template:
Example: segmentation for a number of nifti images. The file batch.template contains the string :`%%IMAGE%%` as a placeholder so we can easily replace it with the current image path and create a number of new batches from a single template:
.. code-block:: bash
......@@ -195,6 +198,7 @@ for instance if you need a specific version or if you want to add external
toolboxes to SPM (e.g. cat12).
.. code-block:: matlab
[krause@master ~] matlab
Warning: No display specified. You will not be able to display graphics on the screen.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment