sizem
(Removed) Row and column dimensions needed for regular data grid
sizem
has been removed. Instead, create a geographic raster
reference object, and then query its RasterSize
property. For more information, see Version History.
Syntax
[r,c] = sizem(latlim,lonlim,scale)
rc = sizem(latlim,lonlim,scale)
[r,c,refvec] = sizem(latlim,lonlim,scale)
Description
[r,c] = sizem(latlim,lonlim,scale)
returns the required size for a regular data grid lying between the latitude
and longitude limits specified by the two-element input vectors
latlim
and lonlim
, which are
of the form [south-limit north-limit]
and
[west-limit and east-limit]
, respectively. The
scale
is the desired cells-per-degree measure of
the desired data grid.
rc = sizem(latlim,lonlim,scale)
returns the size of the matrix in one two-element vector.
[r,c,refvec] = sizem(latlim,lonlim,scale)
also returns the three-element referencing vector geolocating the desired
regular data grid.
Examples
How large a matrix would be required for a map of the world at a scale of 25 matrix cells per degree? (That's 25x25=625 cells per “square” degree.)
[r,c] = sizem([90,-90],[-180,180],25) r = 4500 c = 9000
Bear in mind for memory purposes — 9000 x 4500 = 4.05 x 107 entries!