Using the IMAS-MATLAB¶
Making the IMAS-MATLAB available for use¶
When you’re working with a local installation (see Building and installing the IMAS-MATLAB), you can source the installed environment file:
Set environment variables (replace
<install_dir> with the folder of your local install)¶source <install_dir>/bin/al_env.sh
Using the Access Layer with your MATLAB program¶
The following example program will load the MATLAB interface to the Access Layer to print the version of the access layer and data dictionary.
imas_hello_world.m¶disp('Hello world!')
disp('Access Layer version info:')
disp(imas_versions())
See also
If you save this as a file imas_hello_world.m, you can run it as follows:
$ module load MATLAB
[...]
$ matlab -batch imas_hello_world
[...]
Hello world!
Access Layer version info:
al_version: '5.0.0'
hli_version: '5.0.0'
dd_version: '3.39.0'
hli_version_array: [3x1 int32]
dd_version_array: [3x1 int32]
Congratulations if this runs successfully! In the next sections of the documentation you can see how to: