MATLAB二维插值会出现报错
x=[0,0.2,0.23,0.5,0.56,0.78,0.8,0.9,0.91,0.94,0.99];y=[0,20,50,70,83,99,103,105,117,1...
x=[0,0.2,0.23,0.5,0.56,0.78,0.8,0.9,0.91,0.94,0.99];
y=[0,20,50,70,83,99,103,105,117,118,119];
z=[2,7,0,3,5,6,7,2,1,12,4];
xx=0:0.01:1;
yy=0:2:200;
v=interp2(x,y,z,xx,yy,'spline')
??? Error using ==> polyfun\private\chckxy
There should be at least two data points.
Error in ==> spline at 55
[x,y,sizey,endslopes] = chckxy(x,y);
Error in ==> splncore>splint at 121
[ignored,coefs,l,k,d] = unmkpp(spline(x,y));
Error in ==> splncore at 62
values = splint(x{i},reshape(values,prod(nv(1:d-1)),nv(d))).';
Error in ==> interp2>spline2 at 585
F = splncore(varargin(2:-1:1),varargin{3},varargin(5:-1:4));
Error in ==> interp2 at 230
zi = spline2(x,y,z,xi,yi,ExtrapVal);
请问程序是哪里出了什么问题? 展开
y=[0,20,50,70,83,99,103,105,117,118,119];
z=[2,7,0,3,5,6,7,2,1,12,4];
xx=0:0.01:1;
yy=0:2:200;
v=interp2(x,y,z,xx,yy,'spline')
??? Error using ==> polyfun\private\chckxy
There should be at least two data points.
Error in ==> spline at 55
[x,y,sizey,endslopes] = chckxy(x,y);
Error in ==> splncore>splint at 121
[ignored,coefs,l,k,d] = unmkpp(spline(x,y));
Error in ==> splncore at 62
values = splint(x{i},reshape(values,prod(nv(1:d-1)),nv(d))).';
Error in ==> interp2>spline2 at 585
F = splncore(varargin(2:-1:1),varargin{3},varargin(5:-1:4));
Error in ==> interp2 at 230
zi = spline2(x,y,z,xi,yi,ExtrapVal);
请问程序是哪里出了什么问题? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询