check box GUI and grapsh
Mostra commenti meno recenti
I'm back again, becouse I'm still working on my gui;
Now I've the following question:
In my gui I've placed 6 check box;
each check box if is actived shall plot a graphs;
Of course what I want is each time that I select a check box the graph shall plot data that coming from different matrix:
EX: given six matrix A1,A2,A3,A4,A5,A6
and six check box (c1,c2,c3,..c6) if for example I select c1 and c2 I want a graphs with both data;
I tried to create the condictions with a cicle 'If ' but I understood that this will be a little complicated becouse I have to consider 64 different condictions....(2 elevated to the sixth...)
is there any easiest way to do that???
4 Commenti
Adam
il 19 Dic 2018
Surely you just have 6 conditions, one for each checkbox? If it is on plot it if it isn't don't, or make it invisible if you prefer so that you can toggle it on and off more easily.
ADC
il 19 Dic 2018
Sarah Crimi
il 19 Dic 2018
Modificato: Sarah Crimi
il 19 Dic 2018
You only want A1 through A6, right? Then, 64-6 solutions should be error messages. I think it is better to do radio buttons possibly because then you can use a radio button group in guide.
If you want to do checkboxes, you could do:
if(Sector1==1 & Sector2==0 & Serctor3==0 & Sector4==0 & Sector5==0 & Serctor6==0)
plot (A1(:,1),A1(:,2))
elseif(Sector1==0&Sector2==1 &&Serctor3==0 & Sector4==0 & Sector5==0 & Serctor6==0)
plot (A2(:,1),A2(:,2))
elseif (Sector1==0&Sector2==0 &&Serctor3==1 & Sector4==0 & Sector5==0 & Serctor6==0)
plot (A3(:,1),A3(:,2))
....etc.
else
msgbox('Error');
end
ADC
il 20 Dic 2018
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Time Series Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!