Skip to content

Project-Sustain/matlab-notebook

Repository files navigation

matlab-notebook

Dynamic execution of MATLAB models and collection of results. The idea here is to execute MATLAB functions from Java.

Installation

MathWorks MATLAB Java Engine

  1. Locate MATLAB installation directory, <matlab_root>:
    • On MacOS, this is /Applications/MATLAB_R2021a.app
    • On CentOS, CSU Lab machines /s/parsons/l/sys/matlab
  2. Add MATLAB architecture to system environment variable:
    • Documentation for this step: https://www.mathworks.com/help/matlab/matlab_external/setup-environment.html
    • On MacOS, this is <matlab_root>/bin/maci64
      • Add export DYLD_LIBRARY_PATH="/Applications/MATLAB_R2021a.app/bin/maci64" to .zshrc or .bashrc
    • On CentOS, CSU Lab machines <matlab_root>/bin/glnxa64:<matlab_root>/sys/os/glnxa64
      • Add export LD_LIBRARY_PATH="/s/parsons/l/sys/matlab/bin/glnxa64:/s/parsons/l/sys/matlab/sys/os/glnxa64" to .zshrc or .bashrc
  3. Locate Java engine jars within:
    • <matlab_root>/java/jar
  4. Add required jars to Gradle/Maven dependencies:
    • Example for Gradle on MacOS:
dependencies {
   implementation files('/Applications/MATLAB_R2021a.app/java/jar/engine.jar')
   implementation files('/Applications/MATLAB_R2021a.app/java/jar/javaenginecore.jar')
   implementation files('/Applications/MATLAB_R2021a.app/java/jar/matlab.jar')
}

Helpful documentation:

About

Dynamic execution of MATLAB models and collection of results.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •