我已经在这个半球上计算了数据:
% Compute hemisphere coordinates
segments = 20;
theta = deg2rad(linspace(-180,0,segments))'; % Elevation (bottom half of a sphere)
phi = deg2rad(linspace(-180,180,segments)); % Azimuth
[phi,theta]=meshgrid(phi,theta);
zObsG = obsRadius.*sin(theta);
xObsG = obsRadius.*cos(theta).*cos(phi);
yObsG = obsRadius.*cos(theta).*sin(phi);
我现在想将此数据插值到包含更多元素的更精细的网格中:
segmentsInterp = 100;
thetaInterp = deg2rad(linspace(-180,0,segmentsInterp))';
phiInterp = deg2rad(linspace(-180,180,segmentsInterp));
[phiInterp,thetaInterp]=meshgrid(phiInterp,thetaInterp);
zObsGInterp = obsRadius.*sin(thetaInterp);
xObsGInterp = obsRadius.*cos(thetaInterp).*cos(phiInterp);
yObsGInterp = obsRadius.*cos(thetaInterp).*sin(phiInterp);
我在某种程度上很难在Matlab中使用interp或griddata函数,例如:“必须从严格单调递增的网格向量创建网格。”或“输入坐标数组的数量不等于这些数组的维数(NDIMS)”。 是否有任何提示将获得的数据插值到新网格?
非常感谢!