Making an array for a density plot

2 visualizaciones (últimos 30 días)
Joydeb Saha
Joydeb Saha el 27 de Abr. de 2020
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.

Respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by