suppress start message of Matlab

后端 未结 5 1995
甜味超标
甜味超标 2020-12-03 05:57

I want to call matlab in bash non-interactively and use its result outside Matlab.

For example, I have a script test.m

rand(3,4)
quit
5条回答
  •  感动是毒
    2020-12-03 06:07

    To suppress the display of ans =, you can use the DISP function:

    disp(rand(3,4));
    

    To suppress that first warning message, you can try adding in the option -nojvm to see if that helps.

    To suppress everything else, you can try this solution from a MathWorks Newsgroup thread that addresses the same problem.

提交回复
热议问题