(App designer) How can I display all the graphs that I am plotting in a for loop?

10 visualizzazioni (ultimi 30 giorni)
Hello everyone,
I am designing an app which I use a for loop to plot multiple graphs and I want to display these graphs in the axes I put on the app window. Maybe a drop down menu to show graphs would be an idea. However, I still could not find a way to do that. I am pretty new at these stuff so any help will be extremely helpful.

Risposte (1)

Mario Malic
Mario Malic il 28 Feb 2021
Hello,
You can set up your code into calculating your results, getting them all in a single matrix or a structure or a table and plot from there. Whatever you choose for your variable to be saved in, set it up as a property of the app so you can use it to plot the data easier from whereever in the app.
In your dropdown, define ItemsData, to be the vector 1:length(Items) in the App Designer. This way dropdown's value property will be numeric, corresponding to the ItemsData, and you can use it to index into the property(variable) with the results you want to plot.
  2 Commenti
Oguz Gulbay
Oguz Gulbay il 28 Feb 2021
Thanks for your answer. I added an example of a graph that I am plotting in a loop. I did not quite understand how I can do the things you said in the first paragpraf for this kind of plot. Can you explain maybe one more time in a different way. I'd be appreciated.
Mario Malic
Mario Malic il 28 Feb 2021
Well, can I suggest first that you try App Designer interactive tutorial? When you open App Designer, if there are tiles with the apps on front page, there's one called Interactive Tutorial. If there are none, click Open button on toolbar, and you will see the app. Try that first and then get back with some progress, at least components laid down on the canvas.

Accedi per commentare.

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by