Difference between revisions of "Software:matlab"

From CAC Wiki
Jump to: navigation, search
(Matlab)
(Matlab)
Line 1: Line 1:
== Matlab ==
 
{|  style="border-spacing: 8px;"
 
| valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#e1eaf1; border-radius:7px" |
 
 
MATLAB® is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology.  
 
MATLAB® is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology.  
  
'''<u>Important</u>: The Centre for Advanced Computing does currently not have a stand-alone Matlab license. This means that users who wish to use MATLAB on our systems have to provide a valid license. This may require a connection to an external license server, or the purchase of a local license file.
+
'''Previously, using MATLAB required a user-supplied license (and a lot of effort) to run on our systems. CAC now has an academic license for MATLAB provided by Queen's University.'''
  
* '''Version''': R2014b
+
* '''Version''': R2017a
* '''Location''':  /opt/matlab
+
 
* '''Related link''': For more information go to the [http://www.mathworks.com/products/matlab/ MATLAB web site]
 
* '''Related link''': For more information go to the [http://www.mathworks.com/products/matlab/ MATLAB web site]
 
* '''Statement''': [http://cac.queensu.ca/wp-content/files/cac-matlab-statement.pdf Necessary for accessing the software]
 
* '''Statement''': [http://cac.queensu.ca/wp-content/files/cac-matlab-statement.pdf Necessary for accessing the software]
* '''Local Usage (FAQ)''': [[HowTo:matlab|MATLAB Help File]]
+
 
* '''Related Software''':
+
= Getting access =
: [[Software:petsc|PETSc]]
+
 
: [[Software:hypre|Hypre]]
+
Send a signed [http://cac.queensu.ca/wp-content/files/cac-matlab-statement.pdf MATLAB usage statement] form to [mailto:cac.admin@queensu.ca cac.admin@queensu.ca]. This will add you to the <code>matlab</code> group that allows access to the software. To check if you have been authorized access, type <code>groups</code> while logged on to the system. If <code>matlab</code> appears in the output, you are ready to go!
: [[Software:fftw|FFTW]]
+
 
: [[Software:R|R]]
+
= Running MATLAB =
 +
 
 +
To load MATLAB to your current environment on the SW cluster, use the command <code>use matlab</code> (<code>module load matlab</code> on the Frontenac cluster). If your SSH client supports X-forwarding (and you have logged in using X-forwarding using <code>ssh -X</code>, you can bring up the MATLAB user interface with the command <code>matlab</code>.
 +
 
 +
To run MATLAB non-interactively (such as when running a script or submitting a job to the cluster), use the command <code>matlab -nodisplay < name_of_your_script.m</code>
 +
 
 +
An example of a MATLAB job is shown below:
 +
 
 +
<pre>
 +
#!/bin/bash
 +
#$ -q abaqus.q
 +
#$ -cwd
 +
#$ -V
 +
 
 +
# replace "X" with the number of processors requested
 +
#$ -pe shm.pe X
 +
# replace "Y" with the amount of memory requested (in GB)
 +
#$ -l mf=YG
 +
 
 +
use matlab
 +
matlab -nodisplay < name_of_matlab_script.m
 +
</pre>

Revision as of 14:51, 9 May 2017

MATLAB® is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology.

Previously, using MATLAB required a user-supplied license (and a lot of effort) to run on our systems. CAC now has an academic license for MATLAB provided by Queen's University.

Getting access

Send a signed MATLAB usage statement form to cac.admin@queensu.ca. This will add you to the matlab group that allows access to the software. To check if you have been authorized access, type groups while logged on to the system. If matlab appears in the output, you are ready to go!

Running MATLAB

To load MATLAB to your current environment on the SW cluster, use the command use matlab (module load matlab on the Frontenac cluster). If your SSH client supports X-forwarding (and you have logged in using X-forwarding using ssh -X, you can bring up the MATLAB user interface with the command matlab.

To run MATLAB non-interactively (such as when running a script or submitting a job to the cluster), use the command matlab -nodisplay < name_of_your_script.m

An example of a MATLAB job is shown below:

#!/bin/bash
#$ -q abaqus.q
#$ -cwd
#$ -V

# replace "X" with the number of processors requested
#$ -pe shm.pe X
# replace "Y" with the amount of memory requested (in GB)
#$ -l mf=YG

use matlab
matlab -nodisplay < name_of_matlab_script.m