How to create a struct arrary in the app designer.
이전 댓글 표시
I am creating a GUI in the app designer, and i have several list box and push button, they are all running based of call backs.
My questions are;
How do you save the inputs from the list boxes and push buttons.
How do create an array that save the information of each user without replacing the previous one
How do you link all the apps so that the infomration from each app is saved in the array
댓글 수: 9
Jan
2022년 11월 11일
"How do you save the inputs" - saving to a file or to restore the values for the next run?
To create an array, append the new data instead of overwriting them:
S = struct();
for k = 1:5
S(k).value = k;
end
What does "link all the apps" mean?
Nwasinachi
2022년 11월 11일
Nwasinachi
2022년 11월 11일
Jan
2022년 11월 11일
"each time a user interacts with app their answers are saved in a struct array" - for which purpose? The data are stored in the GUI already. Is there a benefit to stored them in a struct in addition?
"is k=1:5 refering to the number of trials? or number of users?" - What is a trial? What is a user? You asked for the creation of a struct array and I've posted an example code to create one. I do not know the project you are working in.
Maybe you are using a non-standard definition of "apps".
Nwasinachi
2022년 11월 11일
Jan
2022년 11월 12일
Your questions are welcome and the purpose of my questions for clarifications is to find a solution for your problem. The terminology is as essential as complicated and misunbderstandings are a typical part of finding a solution.
Are you working with a set of different GUIs? Then "apps" might be the correct term.
"how to assign values to list box or radio button" - Actually the values are set by clicking on the controls.
Nwasinachi
2022년 11월 12일
Jan
2022년 11월 12일
Maybe it is easier to combine the set of GUIs into one GUI with different tabs.
It is not clear, what "record responses" mean. If you click on a GUI element, its value changes automatically. So afterwards you can request the property "Value".
Until now you have explained the purpose of the code by text only. Then an explicit suggestion for a modification of the code is not possible. Answering would be much easier, if you post the relevant part of the code.
Nwasinachi
2022년 11월 13일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Develop Apps Programmatically에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
