como dejar de ejecutar guide
1 次查看(过去 30 天)
显示 更早的评论
deseo dejar de ejcutar guide, nose como hacerlo trate de eleminar los componentes y eliminar la grafica por completo pero el programa me da error, como resuelvo el probelma?
1 个评论
Walter Roberson
2023-8-7
Approximate translation:
I want to stop executing guide, I don't know how to do it, I tried to eliminate the components and eliminate the graph completely, but the program gives me an error, how do I solve the problem?
回答(1 个)
Walter Roberson
2023-8-7
In order to stop running a MATLAB program without the cooperation of the code, there are a small number of ways you can proceed:
- you can use quit or exit to cause the entire MATLAB session to terminate (will not go back to the command prompt)
- you can trigger an error condition that the outer code cannot handle. Historically it used to work to deliberately trigger infinite recursion, or to deliberately request more memory than is available on the system, but I notice that catch is now able to handle both of those in current versions, so I do not know if there are any remaining error conditions that |try catch} cannot handle
Because of these factors, it is much better if you are able to code the program to end with it's cooperation . For example if you currently have a processing loop, then you might do something like change
while true
existing code
end
to
while isvalid(gcf)
existing code
end
then after that if you delete() the figure then the loop would stop running.
In some cases in GUIDE, depending on the configuration, the trick to allow the program to exit smoothly is to use uiresume
2 个评论
Walter Roberson
2023-8-7
编辑:Walter Roberson
2023-8-7
Rename the file. It must start with an English letter, and the characters after that must be English letters or 0 to 9 or underscores. You cannot use spaces or dashes or brackets.
For example you can use
MyProject_3.m
but not
MyProject (3).m
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!