App Designer Capabilities - it is nerve-wrecking!
Show older comments
Hi!
I am exploring the app-designer instead of GUI. I want to use the app-designer just because it looks nicer, but I am having difficulty figuring out its capacilities. It is getting really nerve-wrecking actually b/c it is hard to find examples on app designer, even something little takes long time to figure out. I have quick questions I will list below. In an app that is compiled as a standalone:
- Can I add "print" to the menubar, the generic "print" we have on a typical guide?
- Can I add, save, saveas,... to menubar, in this save it d save whatever is seen on the app's current screen including all components?
- Can I manipuate a table to have move-up and move-down buttons?
- Can I have pan, rotate, etc. for a figure?
I think all of those are doable using "Guide", I wonder if they are doable in the app-designer? I appreciate if you guys could answer those questions!
Accepted Answer
More Answers (1)
Paul Dirac
on 3 Mar 2020
2 votes
It is absolutely incredible that Mathworks, after all these years, still hasn't found a decent way to create advanced GUIs.
Now, they are forcing everyone to migrate from GUIDE to App Designer, which sucks even more and imposes even more limitations. The App Designer developers seem to do everything to make GUI development with Matlab an even bigger pain in the bottom than it was with GUIDE.
7 Comments
Baha411
on 3 Mar 2020
Ken Garrard
on 19 Sep 2021
App Designer is a complete waste of time and only suitable for toy apps. Even the tutorial examples are ridiculously slow.
Harry Smith
on 18 Dec 2022
Totally agree
I am days into getting a simple graph going to slice and dice a large table. In other applications, this effort takes about 30 minutes.
The tutorials on hello world and calculators does not help someone learn to load a .mat file and allow a user to choose inputs to a simple graph.
The program layout does not provide enough information to learn what you don't know (no workspace, use of syntax different than matlab).
Image Analyst
on 28 Dec 2022
@Ted H, yes it is annoying that you have to switch apps from App Designer to MATLAB to see the Command Window or the Workspace Panel. I've let them know strongly several times that those need to be visible in App Designer so we don't need to switch apps to see them.
To load a .mat file, it's no big mystery or complicated thing. It's no more complicated than calling any other function that takes inputs and returns outputs. You simply do
s = load(fileName);
where s is a structure with all the variables in the .mat file as fields, and fileName is the name of the .mat file.
Not sure what you mean by "choose inputs to a simple graph" though. That could be taken many different ways. Maybe you want to call inputdlg to get a number, or maybe you want to get a number from a scrollbar or an option from a radio button, checkbox, or listbox. Maybe you want to call drawfreehand or drawpolygon to lassoo some subset of plotted data points. have no idea what you have in mind. If you care to elaborate (in a new discussion thread/question), we could show you.
@Image Analyst I might ditch app designer. My goal was to set up a simple swarm plot (similar to box and whiskers). My table has about 80 variables of measurements and categories. A user would print a swarm graph of a voltage measurement chosen from a drop down in categories across the x axis chosen by another drop down. An example might be choosing Va from the list (Va, Vb, Vc) and choosing the car variable as the category. The result is a swarm/box plot for each car in that variable across the x axis. What I am finding is appDesigner has only built in axis graph (x,y plotting like to plot a sine wave), and I have to create a swarm plot 'template' in the startup function, if I want to graph in the developed app. I have gotten as far as opening a figure window, but no data shows up. I am not even sure how to troubleshoot that (it works in regular matlab). And I have yet to find examples of how to do this. It should be simple. Matlab might need to redefine their competitors and focus development there.
Adam Danz
on 28 Dec 2022
@Ted H, if you have this working outside of AppDesigner then it can work inside app designer. You can define local private functions within AppDesigner. Move your plotting function from the m file to a local function within the app. If you're not doing so already, specify the axes handles in your plotting commands. For example:
plot(app.UIAxes, __)
The app's startup function can initialize the plot and the plot can be updated any time any parameter value is changed by the users by setting up callback functions for the app components.
Alternatively, your app can generate the plot outside of appdesigner if that's what you're aiming for.
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!