How to apply two masks simultaniously for plot
이전 댓글 표시
Hi all,
I have a data set of which I want to show the outcome in one plot. Four types of outcomes are possible: mask 1 & mask 2 are false, only one of those is true, and both are true. I can't figure out how the latter can be colored green. The last line of text is incorrect, but I can't find the right syntax.
Thank you all.
Koen
figure; hold on; % new figure window. enable overlaying of plots
plot(x,y,'r.'); % plot a red dot for all points
plot(x(mask1),y(mask1),'m.') % overwrite all points where mask1==true
plot(x(mask2),y(mask2),'c.') % overwrite all points where mask2==true
plot(x([mask2]&&[mask1]), y([mask2]&&[mask1]), 'g.')%overwrite all point where mask1 & mask2 are true.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!