hero_lucifer 发表于 2008-6-2 09:52

绘图出现错误?

我用以下代码绘图
clear all
clc
mk=importdata('data.txt');
xx = mk(:,1);
yy = mk(:,2);
z = mk(:,3);
= meshgrid(xx,yy);
=griddata(xx,yy,z,x,y,'v4')
clear mk
mesh(x,y,z)
grid on

有的时候可以成功得到图像,有的时候却说
Warning: Matrix dimensions must agree, not rendering mesh
请问是什么状况?

ch_j1985 发表于 2008-6-2 10:14

原帖由 hero_lucifer 于 2008-6-2 09:52 发表 http://www.chinavib.com/forum/images/common/back.gif
我用以下代码绘图
clear all
clc
...

能否把data.txt传上来?

sigma665 发表于 2008-6-2 10:27

clear all
clc
mk=importdata('data.txt');
xx = mk(:,1);
yy = mk(:,2);
z = mk(:,3);
= meshgrid(xx,yy);
Z=griddata(xx,yy,z,x,y,'v4')
clear mk
mesh(x,y,Z)
grid on
页: [1]
查看完整版本: 绘图出现错误?