How to display values from MATLAB standalone windows deployment executable?
22 次查看(过去 30 天)
显示 更早的评论
I have created a matlab script file as follows
function MyWorld
var1 = [9 10];
var2 = 5;
disp(var2)
disp(var3)
It works and displays value of var1 and var2 in MATLAB terminal. Now for deployment I choose the windows standalone exe. I got the .exe file and run it on windows command terminal, but did not get any output.
Please suggest anywhere I am wrong...
0 个评论
回答(3 个)
Martin Lechner
2020-10-8
I had the same problem but I found a solution to redirect the output to a file
MyWorld.exe >output.log
It's also possible to redirect the standard error to a file
MyWorld.exe >output.log 2>error.log
The solution was found: https://helpdeskgeek.com/how-to/redirect-output-from-command-line-to-text-file/
0 个评论
Ben11
2014-6-25
My guess would be that the "disp" command is only used to display stuff in the command window in the Matlab environment; for a standalone application you might want to display a message or something like this. Or you could build a simple GUI which would display your variables.
Kilsu Kim
2023-5-9
This is an old question, but I hope the following documentation will help you.
See "Customize an Application/Additional Runtime Settings":
You can see the code output by unchecking "Do not display the Windows Command Shell (console) for execution" when packaging the file.
For code you want to see output, you need to either remove the semicolon (;) or use the "disp" function.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!