Run m-script from outside a Matlab window
No License
Ever needed to call an m-script from the command prompt ("dos box")? This C-code allows you to do just that in a simple way. Just call the exe-file you get from compiling it, and it will run the m-code you want. See guide on how to compile and use it in the comment within the code.
Example: I run a calibration software (PEST) written in FORTRAN. It controls all model calls and intermediate calculations. One of the models involved is in FORTRAN, the other in Matlab. With runMscript.exe I simply list my models one by one in a .bat file and am able to work from the command prompt, as PEST was written for.
Cite As
Lars Christiansen (2026). Run m-script from outside a Matlab window (https://www.mathworks.com/matlabcentral/fileexchange/23879-run-m-script-from-outside-a-matlab-window), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
