MATLAB: 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.

app designerrandom number generator

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;

Best Answer

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);
...