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"
[更多]
1