Как настроить несколько радиокнопок при нажатии на кнопку - PullRequest
0 голосов
/ 04 мая 2019

Я написал короткую программу, которая делает различные формы, например квадратные. У меня есть два случайных числа (одно для строки и одно для столбца моей матрицы), и мой код дает мне вот что вот такое

     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0
     1     1     1     1     1     0     0     0     0     0
     1     1     1     1     1     0     0     0     0     0
     1     1     1     1     1     0     0     0     0     0
     1     1     1     1     1     0     0     0     0     0
     1     1     1     1     1     0     0     0     0     0

Теперь я создаю GUI и у меня есть «матрица» переключателей. И я хочу установить несколько переключателей одновременно, когда я нажимаю кнопку, но я действительно не знаю, как это сделать. В обратном вызове у меня есть матрица:

RadioButton = [app.RadioButton1 app.RadioButton2 app.RadioButton3 app.RadioButton4 app.RadioButton5 app.RadioButton6 app.RadioButton7 app.RadioButton8 app.RadioButton9 app.RadioButton10;...
           app.RadioButton11 app.RadioButton12 app.RadioButton13 app.RadioButton14 app.RadioButton15 app.RadioButton16 app.RadioButton17 app.RadioButton18 app.RadioButton19 app.RadioButton20;...
           app.RadioButton21 app.RadioButton22 app.RadioButton23 app.RadioButton24 app.RadioButton25 app.RadioButton26 app.RadioButton27 app.RadioButton28 app.RadioButton29 app.RadioButton30;...
           app.RadioButton31 app.RadioButton32 app.RadioButton33 app.RadioButton34 app.RadioButton35 app.RadioButton36 app.RadioButton37 app.RadioButton38 app.RadioButton39 app.RadioButton40;...
           app.RadioButton41 app.RadioButton42 app.RadioButton43 app.RadioButton44 app.RadioButton45 app.RadioButton46 app.RadioButton47 app.RadioButton48 app.RadioButton49 app.RadioButton50;...
           app.RadioButton51 app.RadioButton52 app.RadioButton53 app.RadioButton54 app.RadioButton55 app.RadioButton56 app.RadioButton57 app.RadioButton58 app.RadioButton59 app.RadioButton60;...
           app.RadioButton61 app.RadioButton62 app.RadioButton63 app.RadioButton64 app.RadioButton65 app.RadioButton66 app.RadioButton67 app.RadioButton68 app.RadioButton69 app.RadioButton70;...
           app.RadioButton71 app.RadioButton72 app.RadioButton73 app.RadioButton74 app.RadioButton75 app.RadioButton76 app.RadioButton77 app.RadioButton78 app.RadioButton79 app.RadioButton80;...
           app.RadioButton81 app.RadioButton82 app.RadioButton83 app.RadioButton84 app.RadioButton85 app.RadioButton86 app.RadioButton87 app.RadioButton88 app.RadioButton89 app.RadioButton90;...
           app.RadioButton91 app.RadioButton92 app.RadioButton93 app.RadioButton94 app.RadioButton95 app.RadioButton96 app.RadioButton97 app.RadioButton98 app.RadioButton99 app.RadioButton100];

Когда я попробовал что-то подобное без случайных чисел RadioButton (2,2). Значение = 1; это работает, но только для одной радиопереключателя. Когда я сделал RadioButton (2,2). Значение = 1; RadioButton (2,3). Значение = 1; Это не работает.

Я не очень хорошо знаю matlab и appdesigner, поэтому извините, если мой вопрос прост:)

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...