matlab app designer where is the workspace?
166 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Robert Scott
am 1 Aug. 2021
Kommentiert: Keith
am 8 Okt. 2024
ok so im a bit confused. I used the old version of this some years ago.
In the old app guide you had access to variables in your work space and could debug the app as normal.
If i for example have a simply app that does nothing but return the sum of somthing and have a variable called sum.
Where is that? I dont see a workspace where its kept?
How do i debug this thing if i dont have access to the workspace variables?
Any ideas?
0 Kommentare
Akzeptierte Antwort
Sylvain
am 1 Aug. 2021
HI Robert,
my own technique is to add a push button call debug. The callback of the push button uses the function assign('base','VariableName',VariableToExtract). This allow to get the data from the app into the workspace.
Depending on how you coded the app, the VariableToExtract may be found in app.ObjectParent1.Object.PropertyToExtract. Or similar.
0 Kommentare
Weitere Antworten (1)
Image Analyst
am 1 Aug. 2021
Robert,
Yes, this is what I've been complaining to them about for years. I've even talked in person to the developers in Natick about it and they know my views and why this is a complete show stopper for me moving to App Designer.
I'd happily move to App Designer because it has some nice things about it, like more advanced widgets/controls, but having the Current Folder, Command Window, and the Workspace panel in a separate app (the main MATLAB IDE) and the GUI designer and source code in a separate app (App Designer) is a total deal breaker for me. I can't be thrashing windows all the time when I want to debug. It might be OK for people with two monitors (MATLAB IDE on one monitor, and App Designer on the other monitor), but for those of use with laptops, or who prefer a single monitor, it's a total deal breaker.
If I were you I'd call them on the phone and complain. Please, please do this. The more of us that complain, perhaps the quicker they'll fix it. I think they understood my complaints but I don't know how much of an effort it is to fix it. Frankly I don't even know if they will fix it -- they just said they understood my complaints and understand how it's a hinderance to a productive workflow. Every release I check, but no luck so far.
Until they fix it, you're stuck with dealing with two separate apps and thrashing over to the "correct" window when you want to do something. A real pain, I know, believe me.
6 Kommentare
Image Analyst
am 2 Aug. 2021
Wow - another reason for me to hate App Designer. Are you just putting the loop counter on its own line without a semicolon, using disp(), or using fprintf()? You might try it all three ways and see if one of them works.
Or you might try the drawnow command.
drawnow;
It works very well for updating GUIs. I'm just not sure if it will work on the command window panel but it's worth a try.
Keith
am 8 Okt. 2024
I work with MATLAB / Simulink professionally, but part-time. I'm trying to build something fairly expediently, but I don't plan to work it long term. Just need to whip up something effective, but quick. That the App Designer is not connected to the Workspace is absolutely baffling to me.
Googling "import workspace data into App Designer MATLAB" shows me nothing but folks in the same position sharing beleaguered workarounds. It's great otherwise, but having it not be an extension of the main program, i.e. something that folks like me can experiement into, seems like a huge miss.
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!