Skip Navigation

MATLAB

OU Supercomputing Center for Education and Research, The University of Oklahoma website wordmark
Skip Side Navigation

What version of MATLAB is available on OSCER resources?

To find out which version of MATLAB is currently available on OSCER resources:

  • Log into the OSCER system
  • Type module avail MATLAB
  • You will get a result similar to this (with the version available at the time):

Click here to see all MATLAB components and toolboxes covered under OU's license.

Who can use MATLAB on OSCER resources?

The following users are allowed to access MATLAB on OSCER resources:

  • Active OU faculty/staff/students with valid OU Norman campus accounts are allowed use the OU-licensed MATLAB.
  • Visiting scholars/researchers/professors/affiliates/etc. also qualify to use MATLAB, as long as they have valid OU Norman campus accounts during their involvement with OU. However, they are restricted to using it for OU purposes only (basically, for the reasons why they are at OU).
  • Retirees are not eligible to use MATLAB.
Please Note: OU-licensed MATLAB can only be used for educational/classroom purposes and for academic research in which OU is directly involved. It cannot be used for commercial purposes (even by eligible OU users), nor for academic and research purposes at other institutions.

Getting access to use MATLAB on OSCER resources

Eligible users are granted access to MATLAB by placing them in a special group. Follow the steps below to see if you already have access to run MATLAB on OSCER resources:

  • Log into the OSCER system
  • Type id
  • If you find matlab under groups, you are already able to run MATLAB
  • If you do not find matlab under groups, please contact us at support@oscer.ou.edu to request access to MATLAB. Please note that we will have to verify your eligibility before granting access.

Using MATLAB Interactively is FORBIDDEN

Running interactively on the login nodes could negatively impact performance for other users. You are FORBIDDEN to use MATLAB interactively. This means you are not allowed to type matlab at the Unix command prompt. Instead, ALL MATLAB runs MUST be performed via the batch scheduler. We will cancel jobs running interactively on the login nodes if we determine they are causing performance issues.

Click here to learn the basics of submitting jobs on Schooner.

Sample Code

Step 1: Create a sample Matlab file called matlab_test.m and insert the following lines of code:

echo on;
colormap(hsv);
x = zeros(32);
x(13:20,13:20) = ones(8);
mesh(x);
y = fft2(x);
z = real(sqrt(y.^2));
w = fftshift(z);
surf(w);
grid;
echo off;
print -dpdf matlab_test_output.pdf;
quit;

Step 2: Create a batch submission file called matlab_batch.sh and insert the following lines of code:

#!/bin/bash
#
#SBATCH --partition=normal
#SBATCH --job-name=matlab_test
#SBATCH --output=matlab_output.txt
#SBATCH --error=matlab_error.txt
#SBATCH --nodes=1
#SBATCH --ntasks=1
module load MATLAB
matlab -nodisplay -r matlab_test

Step 3: Submit the batch job by typing sbatch matlab_batch.sh

Step 4: Upon successful completion of the job, you will find three new files in your directory: matlab_output.txt, matlab_error.txt, and matlab_test_output.pdf.

Step 5: Transfer the matlab_test_output.pdf to your computer and open it (see Uploading & Downloading Files for instructions on transferring files). It should look like the image below.