按顺序批量调用 matlab 和 ImageJ
batch call matlab and ImageJ in sequential order
我正在尝试让 matlab 和 ImageJ 在批处理文件中的 for 循环中工作。
代码是这样的
set iterationTimes=4
for /l %%i in (0,1,%iterationTimes%) do (
call matlab -nodesktop -nosplash -r "loop=%%i%%;"%stitchFile%
call %IJPath% -macro %JythonPath% %%arg%%
)
我指定了变量,问题是 ImageJ 需要使用 matlab 代码的输出,但批处理似乎同时执行 ImageJ 和 Matlab...
我已经使用 call 使迭代变量 i 工作,在两句之前添加另一个 call 也无济于事..
那么如何先执行 matlab 并在 matlab 完成 运行ning 后执行 运行 ImageJ?
谢谢!!!!
问题是您需要使用 matlabs wait option。您不使用 cmd.exe 的 CALL
或 START /WAIT
命令。
set iterationTimes=4
for /l %%i in (0,1,%iterationTimes%) do (
matlab -wait -nodesktop -nosplash -r "loop=%%i;"%stitchFile%
call %IJPath% -macro %JythonPath% %%arg%%
)
我正在尝试让 matlab 和 ImageJ 在批处理文件中的 for 循环中工作。
代码是这样的
set iterationTimes=4
for /l %%i in (0,1,%iterationTimes%) do (
call matlab -nodesktop -nosplash -r "loop=%%i%%;"%stitchFile%
call %IJPath% -macro %JythonPath% %%arg%%
)
我指定了变量,问题是 ImageJ 需要使用 matlab 代码的输出,但批处理似乎同时执行 ImageJ 和 Matlab...
我已经使用 call 使迭代变量 i 工作,在两句之前添加另一个 call 也无济于事..
那么如何先执行 matlab 并在 matlab 完成 运行ning 后执行 运行 ImageJ?
谢谢!!!!
问题是您需要使用 matlabs wait option。您不使用 cmd.exe 的 CALL
或 START /WAIT
命令。
set iterationTimes=4
for /l %%i in (0,1,%iterationTimes%) do (
matlab -wait -nodesktop -nosplash -r "loop=%%i;"%stitchFile%
call %IJPath% -macro %JythonPath% %%arg%%
)