How do I stop my app from closing after messages are displayed?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am in the process of developing my first MATLAB app and decided to try the application compiler.
I've now installed my app, leaving just a few disp lines without a semicolon.
When I run it, the Windows command prompt closes immediately after my messages are shown.
What do I have to code to avoid this from happening?
0 Kommentare
Antworten (1)
prabhat kumar sharma
am 23 Jan. 2025
Hello Mário Sousa,
It sounds like your compiled MATLAB application is closing immediately after running, and you'd like it to remain open until you decide to close it. You can achieve this by wrapping your code in a `while` loop, which will keep the application running until a specific condition you define is met.
Here's a simple example:
while true
% Your application code here
% Condition to break the loop
if someCondition
break;
end
end
This loop will keep the application active until `someCondition` becomes true. You can define `someCondition` based on your application's logic or user input.
I hope this suggestion helps resolve the issue!
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!