display text when running exe in dos command window

After upgrading from Matlab 2015a to Matlab 2022a, I noticed that disp() function does not print anything when running the exe in dos command window. I want to see the display so I know the progress. How can I see the display again?
function dispTest
x = 5;
disp(x)
end

 采纳的回答

When you compile use the -m option; in particular do not use the -e option.

2 个评论

I use deploytool to compile. I unchecked 'Do not require Windows Command Shell' in the Additional Runtime Settings and I got the number 5 when running the updated exe in DOS command window. I will look into the mcc command. Thanks for your help.
The deploytool option you unchecked should be the same as using the -m option.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 MATLAB Compiler SDK 的更多信息

产品

版本

R2022a

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by