How do you write a code in app designer in order to make a random integers of multiple edittable text? I created this code but I'm afraid this doesn't work.
조회 수: 2 (최근 30일)
이전 댓글 표시
a=randi(1,1);
b=randi(1,1);
c=randi(1,1);
d=randi(1,1);
e=randi(1,1);
f=randi(1,1);
g=randi(1,1);
h=randi(1,1);
a=app.EditField.Value;
b=app.EditField_2.Value;
c=app.EditField_3.Value;
d=app.EditField_4.Value;
e=app.EditField_5.Value;
f=app.EditField_6.Value;
g=app.EditField_7.Value;
h=app.EditField_8.Value;
댓글 수: 0
채택된 답변
Cris LaPierre
2021년 1월 7일
If I understand your question correctly, you want to make the value in your numeric edit field a random value.
Remember that in MATLAB, the value to the left of the equals sign is assigned the value of what is to the right of the equals sign. In order the change the value of your edit field, put that on the left, and put the new value to the right.
app.EditField.Value=randi(1,1);
app.EditField_2.Value=randi(1,1);
...
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File 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!