Converting 1D indexed array to 2D matrix
Mostrar comentarios más antiguos
I have a 1-D array of radar data for latitude, longitude, and altitude (dimensions of 2301 x 1201 x 24). Since not all latitude, longitude, and altitudes contain measurable reflectivities (radar data), the radar data are stored as an indexed 1-D array to save storage space. (If all latitude, longitudes, and altitudes contained data, this 1-D array would span 66,324,024 (2301x1201x24) cells).
Indices are zero-based, with data stored in order of increasing Longitude, then Latitude, then Altitude. So for example, the southwest corner of the grid at the lowest altitude is index 0. The southeast corner of the grid at the lowest altitude is index 2300.
I need to get this 1-D array over to a 2-D array based on the first altitude level (or alternatively on a 3D array for lattitude, longitude, and altitude). I start with converting linear indices to subscripts, but once I do so, how do I broadcast the indexed-based reflectivities on a 2D array of longitude and latitude?
[lonind,latind,altind] = ind2sub([2301 1201 24],inddata);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Geographic Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!