www.gusucode.com > map 案例源码 matlab代码程序 > map/ConstructReferencingObjectForGlobalRasterExample.m
%% Construct Referencing Object for Global Raster % %% % Construct a referencing object for a global raster comprising a grid of % 180-by-360 one-degree cells, with rows that start at longitude -180, and % with the first cell located in the northwest corner. % Copyright 2015 The MathWorks, Inc. latlim = [-90 90]; lonlim = [-180 180]; rasterSize = [180 360]; %% % Create a raster referencing object by specifying the raster size. R = georefcells(latlim,lonlim,rasterSize,'ColumnsStartFrom','north') %% % Obtain the same result by specifying cell extents. extent = 1; R = georefcells(latlim,lonlim,extent,extent,'ColumnsStartFrom','north')