how to convert .m from windows to linux executable file?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kavita Navria
am 11 Jul. 2017
Kommentiert: Walter Roberson
am 6 Aug. 2019
I am working on matlab in windows OS. I am using h5 files and creating some images. I want to create an executable file from my .m script that can be run on a linux redhat. Thank you
0 Kommentare
Akzeptierte Antwort
Kojiro Saito
am 12 Jul. 2017
Convert to execution file from m file, you have 2 options.
MATLAB Compiler convert MATLAT scripts to execution file (if Windows) and .sh file (if Linux).
MATLAB Runtime (no-cost) is necessary for running. You need to compile on Linux when you want to create standalone execution file for Linux. Supported functions by MATLAB Compiler is in this link.
MATLAB Coder converts MATLAB scripts to C code so you can create execution file. Some functions are not supported C code generation, so please refer to this link.
4 Kommentare
Walter Roberson
am 6 Aug. 2019
Bearbeitet: Walter Roberson
am 6 Aug. 2019
Antonio Adaldo comments to Kojiro Saito:
The answer seems to neglect that the user is planning to use the executable on a different platform than the one it was created with. I seem to remember that this workflow is not possible: https://uk.mathworks.com/matlabcentral/answers/13054-compile-for-linux-on-a-windows-machine
Walter Roberson
am 6 Aug. 2019
Antonia, Kojiro specifically said,
"You need to compile on Linux when you want to create standalone execution file for Linux."
and then gave the alternative of generating C code using MATLAB Coder. The generated C code could be compiled on a Linux system.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!