Overlapping points
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello
I was wondering if there was a way to prevent points from overlapping. I have generated a [200 by 50] matrix and at a certain point the points will all match up. Is there a way to create a code in matlab that will prevent the points from overlapping when plotting. For instance at step one there is a point A at 23,4 and another point B is 23,5. At step two point A is still 23,4 and point B becomes 23,4 as well. Is there a way to say that at location 23,4, there is already a point and therefore point B should just stay at 23,5.
Thanks
댓글 수: 0
답변 (1개)
Rob Campbell
2012년 6월 13일
It's not very clear what you're plotting so it's a little hard to answer your question. Maybe some of the following help.
%New coordinates for B: newB=[23,4];
%Only alter this row and column in "myMatrix" if the value there is zero if myMatrix(newB(1),newB(2))==0 myMatrix(newB(1),newB(2))=1; end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!