check box GUI and grapsh
이전 댓글 표시
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
Adam
2018년 12월 19일
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
2018년 12월 19일
Sarah Crimi
2018년 12월 19일
편집: Sarah Crimi
2018년 12월 19일
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
2018년 12월 20일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Time Series Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!