MATLAB is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. More information can be found at:

Matlab on the HPCC

Interactive Matlab Sessions

  • Graphical (requires X Forwarding): qrsh -pe openmp 2 matlab -desktop
  • Textual: qrsh matlab -nodisplay

Submitting a Matlab Job

Create Matlab Commands File

Create a .m file with your commands, for example:

for i=1:1024
    A(i) = sin(i*2*pi/1024);


Create Matlab Job Script

Create a .sh file with at least the following contents:


matlab -nodisplay -nodesktop -nosplash < your-commands-file-1.m

or if your Matlab command file calls functions in separate function files:


matlab -nodisplay -nodesktop -nosplash < your-commands-file-1.m your-func-1.m your-func-2.m

Submit Matlab Job

More information: HPCC Job Management

Parallel Matlab on the HPCC

Remember HPCC Job Management with job limits for job queues.
  • Required to use parpool, run (on the command line, not in MATLAB): setup-parMatlab (this sets up your parallel environment in Matlab). You only need to do this one time. After that, all Matlab sessions will be ‘ready for parallel’.
  • To open a normal parallel matlab session, in your Matlab add the following code:
mypool = parpool(##)



where ## is the number of cores to use. See ‘Max TTL Cores’ (-1 for MATLAB master process!) in the ‘CURRENT PER-PROJECT LIMITS’ section which is displayed upon login to Be aware that Matlab doesn’t always scale well past 20 or so workers, due to communication overhead between the workers. Make sure that you test for an optimal number. Start small (8 workers?) and see if adding workers actually helps.

Matlab on my Laptop and Desktop

Wharton Site License!

Wharton pays for a Matlab site license for all Faculty, Staff, and Students. It expires annually on September 1st, and includes Base Matlab, and the following toolboxes:

Site Licensed Toolboxes

  • Simulink
  • Bioinformatics Toolbox
  • Communications System Toolbox
  • Computer Vision System Toolbox
  • Control System Toolbox
  • Curve Fitting Toolbox
  • DSP System Toolbox
  • Data Acquisition Toolbox
  • Database Toolbox
  • Datafeed Toolbox
  • Econometrics Toolbox
  • Financial Instruments Toolbox
  • Financial Toolbox
  • Fixed-Point Designer
  • Fuzzy Logic Toolbox
  • Global Optimization Toolbox
  • Image Acquisition Toolbox
  • Image Processing Toolbox
  • Instrument Control Toolbox
  • MATLAB Builder EX
  • MATLAB Builder JA
  • MATLAB Builder NE
  • MATLAB Coder
  • MATLAB Compiler
  • MATLAB Report Generator
  • Mapping Toolbox
  • Model Predictive Control Toolbox
  • Neural Network Toolbox
  • Optimization Toolbox
  • Parallel Computing Toolbox
  • Partial Differential Equation Toolbox
  • Robust Control Toolbox
  • Signal Processing Toolbox
  • SimBiology
  • SimMechanics
  • Simscape
  • Simulink 3D Animation
  • Simulink Coder
  • Simulink Control Design
  • Simulink Design Optimization
  • Spreadsheet Link EX
  • Stateflow
  • Statistics Toolbox
  • Symbolic Math Toolbox
  • System Identification Toolbox
  • Trading Toolbox
  • Vehicle Network Toolbox
  • Wavelet Toolbox
  • xPC Target

Wharton faculty, staff, and PhDs with Wharton-owned computers

Please contact your Academic Distributed Representative for further assistance.

Wharton students with personally-owned computers

Wharton now licenses Matlab and a host of awesome Matlab toolboxes for all students.

  • Follow the directions HERE