Matlab - run file without opening GUI, then quit

前端 未结 3 1761
攒了一身酷
攒了一身酷 2021-02-07 15:46

I want Matlab to run some .m file, which writes to a text file. I don\'t want the GUI to launch, and I don\'t want the command line interpreter to run. I\'ve got



        
3条回答
  •  深忆病人
    2021-02-07 16:12

    If you need to execute a matlab script you can do matlab -nodisplay < script.m. If you want to call a matlab function, you can do matlab -nodisplay -r "foo(); quit". IIRC, in both cases matlab should exit once it is done.

提交回复
热议问题