How to display error messages in Matlab Runtime (compiled) version
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi all
I have made a matlab program that uses an Input file where all input parameters are defined. I have programed it such that if the parameters are out of range, then matalb gives me an error with a message that I have written. I use the
if then else command and the error command.
Now, I am compiling this program to run it as 'Runtime' executable version. I use a txt file to define my inputs now. How can I make the Runtime version also display error messages when a parameter is out of range? If I use the same code as the original version, I simply don't get anything.. as a result..
댓글 수: 0
답변 (1개)
Adam
2015년 12월 4일
편집: Adam
2015년 12월 4일
Either use
errordlg
if you want the message to be displayed to the user or if you make sure that your executable creates a log file (it is an option towards the bottom of the compiler UI) into which the error messages that would otherwise be printed to command line will be shown. This will only warn you with a sound though when it happens so is not ideal if you expect this to be a part of the general workflow of your tool. In that case, if the user is expected to respond then errordlg is the way (or create your own UI to popup if you want something more in-depth than what errordlg offers).
참고 항목
카테고리
Help Center 및 File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!