Command lines appear when I run an app.
6 views (last 30 days)
ErikJon Pérez Mardaras on 24 Oct 2021
I am making an app on "Matlab app designer" and in a near future, when I have the app done, I would like to have it like an executable, I mean, like a program.
The point is that whenever I open Matlab app designer and run my app, in the command window of matlab appears all the names and dimensions of the widgets that are on my app (boxes, menus, text, windows...etc) as you can see in the photo below.
Is this supposed to happen, or is it supposed to be the command window clear without any command line? If in a near future I would like to export my app like an executable archive, do I have to get rid off this phenomenon?
Thank you very much
Chris on 24 Oct 2021
Edited: Chris on 24 Oct 2021
It sounds like you have a line somewhere that is missing a semicolon.
If you set a property in the app but don't terminate the line with a semicolon, the Command Window will display everything about the app--just like in Matlab, if you set a variable without a semicolon, it will be displayed in the Command Window as well.
There is likely a warning present (indicated by an orange bar near the right side of App Designer, and a squiggly somwehere on the relevant line) that says "Terminate statement with a semicolon to supporess output"
More Answers (2)
Image Analyst on 26 Oct 2021
You can compile with the -e option to mcc to compile your app without a console (command) window, though I don't recommend it since often error messages will pop up there and if it's not there you won't see them and won't know what went wrong.
mcc -e yourApp.m
Image Analyst on 28 Oct 2021
You might have done something like
app.NdeinputsLabel.String = 'whatever' % no semicolon
and when it hits that line, it lists all the fields of app like you've shown in your screenshot.
However, I've noticed several times now with R2021b that sometimes it lists all my lines of code regardless of whether semicolons are there or not. It's as if somehow "echo on" got turned on. I can do
and that fixes it (for a while), but I have no idea who, what, or how echo got turned on in the first place.