Search code examples
matlabdockergitlab-cimatlab-compiler

How can I run a Matlab file with MCR (Matlab Compiler Runtime) in a Linux terminal?


I am trying to create a CI/CD pipeline with GitLab. In this CI/CD pipeline, matlab unit tests should be executed (class-based unit tests). For this pipeline I use the Matlab Runtime in a Linux docker. The Matlab Runtime is installed in the docker and the project files are also in the docker.

My Question: How can I run a matlab (*.m) file in this Linux docker with a terminal command? And is it even possible to run matlab files with the MCR?

Thanks for your help


Solution

  • You cannot run M-files using the MATLAB Runtime. The MATLAB Runtime is to run packages created with the MATLAB Compiler. Someone with a MATLAB license, and a MATLAB Compiler license, must compile the code so that it can run with the MATLAB Runtime.