我想在不同的文件上運行一個函數;我想用Bash-Like腳本來做到這一點。當我看着網絡時,我發現我可以使用.bat文件。使用.bat文件在Windows上逐個運行Matlab命令
我.bat文件包含此
matlab -bodesktop -nosplash -r myFunction('input_1.txt')
matlab -bodesktop -nosplash -r myFunction('input_2.txt')
matlab -bodesktop -nosplash -r myFunction('input_3.txt')
matlab -bodesktop -nosplash -r myFunction('input_4.txt')
matlab -bodesktop -nosplash -r myFunction('input_5.txt')
當我雙擊該文件,似乎這些命令並行,其中,使得PC崩潰運行。
我看着Matlab的論壇的替代解決方案,但不能跟我
工作的另一種選擇,我發現:
start -wait matlab -bodesktop -nosplash -r "myFunction('input_1.txt');exit"
..
任何人使用此之前?
除了所有的東西外,我很肯定它應該拼寫'-nosplash'。 –
[你必須使用matlab的-wait選項](http://stackoverflow.com/a/22307518/2732801)。 – Daniel
沒有工作Daniel,我正在使用Windows – user3378649