【发布时间】:2019-02-21 18:15:27
【问题描述】:
我有四个使用 NetCDF 数据创建的变量,即 高度、纬度、经度和日期。 现在我想创建一个将这些变量作为一列的矩阵,然后我应该忽略包含“NAN”数据的值。
我已经单独完成了这项工作,但我想要在一个矩阵中。 我必须在多个文件上运行这个过程。
for i = 1:length(theFiles)% Loop for each nc-file
%Select Single cycle
FileName = theFiles(i).name;
FullPathName=fullfile(folder_name, FileName); %reading file one by one
disp(['File selected:', FullPathName])
[Height,time,Lat,Long]=read_netcdf(FullPathName); % Read the selected nc file
lattiude=Lat;
longitude=Long;
B = [Height,time,Lat,Long];
end
还有一件事,完全没有。数据是 579X1 所有变量,但是当我从高度中删除 Nan 值时,它的尺寸减小到 45X1 现在我要做的是减少所有变量尺寸 w.r.t 高度。
我有我的矩阵,现在想删除所有包含 Nan Value 的行
NaN 736536.710457717 28.3771283105297 69.6958150783291 南 736536.710457858 28.3778490697636 69.6956231314990
75 736536.710458284 28.3800119048871 69.6950471308031 75 736536.710458426 28.3807327583405 69.6948551510433 南 736536.710458000 28.3785699096006 69.6954311612445 南 736536.710458142 28.3792909110158 69.6952391459993
【问题讨论】:
-
我正在处理 Sentinel 3 的 NetCDF 文件。它包含水位信息,我需要的是一个包含 NAN 以外的单个矩阵。