上传者: lishengjie22222
|
上传时间: 2022-11-05 16:26:46
|
文件大小: 516B
|
文件类型: M
function draw3D filename
%% you should use this fuction in commandwindow as follows: draw3D "book xls"
%read data
%data xlsread filename ;
%%if your matlab can"t open the "xls" you can copy your data from xls to a
%%txt and then load "book txt"
data load filename ;
x data : 1 ;
y data : 2 ;
z data : 3 ;
xi linspace min x max x ;
yi linspace min y max y ;
[X Y] meshgrid xi yi ;
Z griddata x y z X Y "V4" ;
surf X Y Z ;
end">function draw3D filename
%% you should use this fuction in commandwindow as follows: draw3D "book xls"
%read data
%data xlsread filename ;
%%if your matlab can"t open the "xls" you can copy your data from xls to a
%%txt and then load "book txt"
[更多]