run Matlab commands one by one on windows using .bat file

后端 未结 2 1450
粉色の甜心
粉色の甜心 2021-01-26 04:59

I am trying to run a function on different files; I would like to use Bash-Like script to do that. When I looked on the web; I found that I can use .bat file.

My .bat fi

2条回答
  •  广开言路
    2021-01-26 05:16

    First check that you have the option spelled correctly. Click here for the options.

    Try this:

    matlab -wait -nodesktop -nosplash -r "myFunction('input_1.txt')"

    Edit:

    By default, when you call the matlab command from a script, the command starts MATLAB and then immediately executes the next statements in the script. The -wait option pauses the script until MATLAB terminates.

    Use the -wait option in a startup script to process the results from MATLAB. Calling MATLAB with this option blocks the script from continuing until the results are generated.

提交回复
热议问题