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 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Crish
le 7 Jan 2021
Réponse apportée : Cris LaPierre
le 7 Jan 2021
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 commentaires
Réponse acceptée
Cris LaPierre
le 7 Jan 2021
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!