Overlapping points
2 ビュー (過去 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!