Making an array for a density plot
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!