Is it possible to call a matlab file from linux code script?

9 Ansichten (letzte 30 Tage)
Rom
Rom am 1 Aug. 2013
Is it possible to call a matlab file from linux code script?
I created .m files on Windows; however, I am using PuTTY on Windows in order to write code in the Linux environment. I would like to call matlab files from within the code.
Would the best solution be to compile the .m files into a standalone application? Or is there a linux command that can call the files?

Akzeptierte Antwort

Ken Atwell
Ken Atwell am 1 Aug. 2013
One way or the other, you will need MATLAB on your Linux box. Assuming your MATLAB code is visible to Linux as well, you can use
matlab -r "command"
to run from the Linux command line; there is more information about startup flags here.
You could use MATLAB Compiler to avoid needing MATLAB on Linux goign forward, but you would still need MATLAB installed on Linux to perform the compilation -- you cannot cross-compile from Windows to Linux using MATLAB Compiler.
  2 Kommentare
Rom
Rom am 1 Aug. 2013
Thank you, I think I get it.
If my m-file is called summmation.m How would I open this file using Linux without having to open Matlab? What command would I use?
Rom
Rom am 1 Aug. 2013
In other words, I'd like to run the .m file without having to open in Matlab to run it. Is this possible as a Linux command?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

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!

Translated by