problem with making exe file from .m file with deploytool

1 次查看(过去 30 天)
I have written a code that reads data from serial port. When I run the code through MATLAB there is no problem and it works fine. I want an exe version of this file to run on another computer that doesn't have Matlab installed. So I build the exe file with "deploytool". When I run the exe file, my serial port does not open! It opens and closes immediately because the exe file is executed only once. I tried to force the code to stay open by using an infinite loop or using the input command. This method was effective, but it involves a lot of CPU and RAM. Is there a way to keep the generated exe file open without involving them?

采纳的回答

Walter Roberson
Walter Roberson 2022-12-10
See waitfor and uiwait and uiresume

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by