我致力于MOD10C2积雪(8天),当我夹MODIS积雪对不同区域的海拔高度对.i.e总趋势的结果。高海拔低显示积雪和低海拔显示更高的积雪。我用matlab inpolygon函数(inpolygon (yq xq,十五,青年志愿))我无法找出犯错误。我试着(月度)和(8天)部分积雪数据,海拔从SRTM DEM提取多边形。我试图以这种方式使用matlab shapefile = ' shapefile。轴马力”;S = shaperead (shapefile);N =长度(S);i = 1: N的阴谋(S(我)方式,(我).Y)抓住结束% %朗=负载(“testlon.mat”);朗=经度。testlon;lat =负载(“testlat.mat”); lat = lat.testlat ; [X,Y] = meshgrid(lon,lat) ; data = load('testarray.mat') ; data = data.testarray ; [nx,ny,d] = size(data) ; %%Extract data iwant = cell(d,N) ; for i =1:d A = data(:,:,i) ; for j = 1:N idx = inpolygon(X(:),Y(:),S(i).X,S(i).Y) ; iwant{i,j} = A(idx) ; end Then output iwant converted into matrix in this way test = cell2mat(cellfun(@transpose,tp5k6k,'uniform',0)); [1]: https://nsidc.org/data/MOD10C2
Baidu
map