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.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Cris LaPierre
il 7 Gen 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 Commenti
Più risposte (0)
Vedere anche
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!