我有叶绿素数据的 HDF 文件。我正在尝试处理这些 HDF4 文件以生成该期间的 NDVI。但是当我尝试执行时
Band = hdfread('F:\MATLAB\HDF data\binned hdf\OCMHDFFiles_20-Sep-2012\O2_01APR2011_004_000_GAN_L3B_CL_M.hdf','clo','Fields','');
% Construct an RGB matrix from the three bands into one 3D matrix.
SPCrater_321 = cat(Band);
% Display the image
figure(1)
imshow(SPCrater_321)
xlabel('Longitude (pixels)')
ylabel('Latitude (pixels)')
title('ASTER Bands 3, 2, 1')
??? Error using ==> permute
Out of memory. Type HELP MEMORY for your options.
Error in ==> hdfsdsread at 57
data = permute(data,ndims(data):-1:1);
Error in ==> hdfread at 240
varargout{1} = hdfsdsread(hinfo,start,stride,edge);
下一个执行是,
Band_3 = hdfread('F:\MATLAB\HDF data\binned hdf\OCMHDFFiles_20-Sep-2012\O2_01APR2011_004_000_GAN_L3B_CL_M.hdf','clo','Fields','ImageData3N');
Band_2 = hdfread('F:\MATLAB\HDF data\binned hdf\OCMHDFFiles_20-Sep-2012\O2_01APR2011_004_000_GAN_L3B_CL_M.hdf','clo','Fields','ImageData2');
Band_1 = hdfread('F:\MATLAB\HDF data\binned hdf\OCMHDFFiles_20-Sep-2012\O2_01APR2011_004_000_GAN_L3B_CL_M.hdf','clo','Fields','ImageData1');
% Calculate NDVI.
Band_2 = im2single(Band_2);
Band_3 = im2single(Band_3);
SPCrater_NDVI = (Band_3 - Band_2) ./ (Band_3 + Band_2);
% Display the image.
j=imresize(SPCrater_NDVI,0.5);
figure(5)
imshow(j,'DisplayRange',[0 1])
??? Out of memory. Type HELP MEMORY for your options.
这就是我在执行时键入“memory”命令时得到的结果:
memory
Maximum possible array: 255 MB (2.669e+008 bytes) *
Memory available for all arrays: 569 MB (5.971e+008 bytes) **
Memory used by MATLAB: 1197 MB (1.255e+009 bytes)
Physical Memory (RAM): 8181 MB (8.578e+009 bytes)
* Limited by contiguous virtual address space available.
** Limited by virtual address space available.
谁能帮我解决这个问题。如何增加内存数组的长度。
我非常感谢您能提供的任何帮助。如果你能把这些信息发给我,我将不胜感激。
M.普拉布
(马普拉布)