Skip to main content
  • Resources
    • Overview
    • Request Access
    • Manage Existing Project
    • HPC Resources
    • Compute Resources
    • Software Packages
    • Partner Program
  • Documentation
    • Get Started
    • Log In
    • Transfer Files
    • Storage
    • Compiling
    • Running Jobs
  • Support
    • Contact Us
    • Training and Events
    • Proposals and Publications
    • Links for Learning
  • Cluster Status
  1. OIT HPC
  2. Software

    MATLAB R2024a (and Above) Required Procedures

    Symbolic link for ~/.MathWorks directory (one-time procedure)

    R2024a (and above) installs large files in the ~/.MathWorks directory, which is a problem because the user's home directory will quickly fill up. A work-around has been identified.

    Note, the directories removed in the instructions below are auto-generated by MATLAB when it starts up, and are safe to delete, but please double check you did not manually move an important file into them by accident.

    First, end all MATLAB jobs (for all versions) you have running interactively and in LSF jobs, then run these commands:

    cd $HOME
    rm -rf .MathWorks
    rm -rf .MATLABConnector
    mkdir /share/$GROUP/$USER/.MathWorks
    ln -s /share/$GROUP/$USER/.MathWorks .MathWorks

    Now, continue using R2024a (and above) as normal

    Running MATLAB R2024a (and above) in an LSF batch job

    • For all commands that use the “-r” command line MATLAB flag, replace with “-batch”. For example:
      matlab -nodisplay -nosplash -nodesktop -singleCompThread -r "run('script.m');exit;"
      
      # Replacement for above command is:
      
      matlab -nodisplay -nosplash -nodesktop -singleCompThread -batch "run('script.m');exit;"
    • At the end of your MATLAB script (e.g., script.m), add the command:
      exit
Copyright © 2026 · Office of Information Technology · NC State University · Raleigh, NC 27695 · Accessibility · Privacy · University Policies