Making an array for a density plot
조회 수: 2 (최근 30일)
이전 댓글 표시
I have 619209x1 double Latitude and 619209x1 double Longitude. The maximum lat value is 83.40 and minimum lat value is -79.83. similarly max long value is 179.99 and min long vaue is -179.99. Depending on their max min value I have made a dummy matrix of 155x360 double. Now, I need a code where , say lat value is 2.25 and long value is 2.75, a loop will add (place) 1 at the 2x2 cell. similarly say lat value is 2.75 and lng value is 2.88 then at the 2x2 cell there will be addding up, i.e, 1+1 =2 . This thing will continue for each of the numbers in the lat and long depending on the first digit before the decimal. e.g, lat = 85.44 and lon = 85.14, there will be +1 in the 88th cell. This is required for a density plot.
댓글 수: 0
답변 (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!