我将我的 matlab 程序转换为独立的 exe。当我从命令行调用 exe 时,它不会等到 exe 被执行。该程序大约需要 20-30 秒才能运行。该程序主要创建一个 txt 文件。我怎样才能让它等到exe执行。我的matlab主要功能是
function []=features(img_path,category,output_path)
if (strcmp('shoe',category)== 1)
if exist(img_path,'file')
test_shoes(img_path,output_path);
else
disp ('Input image path does not exist');
end
else
disp('Sorry wrong input for category.Please give shoe/dress/handbag');
end
return;
问题如下图所示:
“所有警告的状态都是‘关闭’。”实际上由来自 MATLAB 的 exe 在 5 秒后显示,但终端不会等到 exe 完成执行,即“E:\test>”在调用 exe 后立即显示在下一行中。
我怎样才能让命令行等到 exe 操作系统完成执行,以便新的命令行在它完成之前不会出现?
最佳答案
关于matlab - 命令行不会等到 exe 执行完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18509007/