主题: [MATLAB基础] 如何用matlab画3维数据文件?
查看单个帖子
旧 2009-11-18, 06:12   #1
adameye
初级会员
 
注册日期: 2009-11-17
帖子: 6
声望力: 0
adameye 正向着好的方向发展
默认 如何用matlab画3维数据文件?

真是奇怪,我在网上找个例子:
http://sc.tamu.edu/shortcourses/SC-m.../matlab-9.html
>> load out.dat;
>> x=out(:,1);
>> y=out(:,2);
>> [X Y]=meshgrid(x,y);
>> Z=out(:,3:size(out,2));
>> mesh(X,Y,Z);
但是为啥matlab总是提示我
??? Error using ==> mesh at 69
Z must be a matrix, not a scalar or vector.

Error in ==> test1 at 6
mesh(X,Y,Z);

搞不懂,文件很简单呀,比如:
2 4 5
2 3 4
4 7 8
...
文件有3列,代表x,y,z空间坐标

谢谢
adameye 当前离线   回复时引用此帖