qq_39653007
qq_39653007
采纳率0%
2020-01-11 09:48 阅读 1.9k

Matlab提示错误使用 griddedInterpolant 插值要求每个维度至少有两个样本点。

clear;
home;
A=xlsread('beijiaoA.xls');
[Row,Col]=size(A);
time=A(:,1);

for i=1:Row
M(Row)=getframe;
zd(4,4)=A(i,2);
zd(4,3)=A(i,3);
zd(4,2)=A(i,4);
zd(4,1)=A(i,5);
zd(1,4)=A(i,6);
zd(1,3)=A(i,7);
zd(1,2)=A(i,8);
zd(1,1)=A(i,9);
zd(2,1)=interp2(1,1,A(i,9),2,1,'linear');
zd(2,2)=interp2(1,2,A(i,8),2,2,'linear');
zd(2,3)=interp2(1,3,A(i,7),2,3,'linear');
zd(2,4)=interp2(1,4,A(i,6),2,4,'linear');
zd(3,1)=interp2(4,1,A(i,5),3,1,'linear');
zd(3,2)=interp2(4,2,A(i,4),3,2,'linear');
zd(3,3)=interp2(4,3,A(i,3),3,3,'linear');
zd(3,4)=interp2(4,4,A(i,2),3,4,'linear');

surf(zd);

end

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

相关推荐