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

조회 수: 9 (최근 30일)
Oguz Gulbay
Oguz Gulbay 2021년 2월 28일
댓글: Mario Malic 2021년 2월 28일
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.

답변 (1개)

Mario Malic
Mario Malic 2021년 2월 28일
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
Oguz Gulbay
Oguz Gulbay 2021년 2월 28일
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 2021년 2월 28일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by