suppress start message of Matlab

后端 未结 5 1987
甜味超标
甜味超标 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:21

    I'd recommend saving the output to a file, and then reading in that file. This approach is slightly more complicated, but less fragile as formats change etc. It gives you much more control. You'll find plenty of scripts on the web to transform Matlab files to a different host language.

    Example:

    A = randn(3, 2);
    save temp_output.mat A
    # Later, read temp_output.mat in whichever language you desire.
    

提交回复
热议问题