登录论坛

查看完整版本 : [MATLAB基础] matlab 三维插值 问题


m0932
2009-08-05, 02:41
我想做个一个全球温度场的插值 可是怎么都不对呢
我写的.m是这样的
x=1:96;
y=1:48;
z=1:12;
v=tas1;
[xi,yi,zi]=meshgrid(1:0.5:96,1:0.5:48,1:12);
vi=interp3(x,y,z,v,xi,yi,zi,'cubic');
tas1 就是经度 纬度 和时间 3维确定的一个温度值
可是总是提示出错
??? Error using ==> interp3
The lengths of X,Y and Z must match the size of V.
Error in ==> E:\xiao.m
On line 6 ==> vi=interp3(x,y,z,v,xi,yi,zi,'cubic');
请问这是为什么呢?