matlab无法画surf图程序代码如下:[x,y]=meshgrid([-2:.4:2]);Z=x.*exp(-x.^2-y.^2);fh=figure('position',[300,150,500,500],'color','w');ah=axes('color',[.8 .8 .8],'XTick',[-2 -1 0 1 2],'YTick',[-2 -1 0 1 2]);sh=surf('XData',x,'YData',y,'ZData',
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 18:27:39
matlab无法画surf图程序代码如下:[x,y]=meshgrid([-2:.4:2]);Z=x.*exp(-x.^2-y.^2);fh=figure('position',[300,150,500,500],'color','w');ah=axes('color',[.8 .8 .8],'XTick',[-2 -1 0 1 2],'YTick',[-2 -1 0 1 2]);sh=surf('XData',x,'YData',y,'ZData',
matlab无法画surf图
程序代码如下:
[x,y]=meshgrid([-2:.4:2]);
Z=x.*exp(-x.^2-y.^2);
fh=figure('position',[300,150,500,500],'color','w');
ah=axes('color',[.8 .8 .8],'XTick',[-2 -1 0 1 2],'YTick',[-2 -1 0 1 2]);
sh=surf('XData',x,'YData',y,'ZData',Z,...
'FaceColor',get(ah,'color')+.1,...
'EdgeColor','k','Marker','o',...
'MarkertFacecolor',[.5 1 .85]);
错误出在sh那一句,错误提示如下:
Invalid property found.
Object Name : surface
Property Name : 'MarkertFacecolor'.
Error in graph3d.surfaceplot>localConstructor (line 136)
h = graph3d.surfaceplot(argin{:});
Error in graph3d.surfaceplot (line 7)
h = localConstructor(varargin{:});
Error in surf (line 98)
hh =
double(graph3d.surfaceplot(args{:},'parent',parax));
Error in twelve_1 (line 5)
sh=surf('XData',x,'YData',y,'ZData',Z,...
初学matlab,求解答,不胜感激!
matlab无法画surf图程序代码如下:[x,y]=meshgrid([-2:.4:2]);Z=x.*exp(-x.^2-y.^2);fh=figure('position',[300,150,500,500],'color','w');ah=axes('color',[.8 .8 .8],'XTick',[-2 -1 0 1 2],'YTick',[-2 -1 0 1 2]);sh=surf('XData',x,'YData',y,'ZData',
报错信息说的很清楚,没有MarkertFacecolor属性,应为MarkerFacecolor(多了一个t).