- h0=figure('toolbar','none',...
- 'position',[200 50 300 350],...
- 'name','实例54');
- h1=axes('parent',h0,...
- 'position',[0.2 0.4 0.6 0.6],...
- 'visible','off');
- ezsurf('sin(sqrt(x.^2+y.^2))/sqrt(x.^2+y.^2)',[-6*pi,6*pi])
- b1=uicontrol('parent',h0,...
- 'units','points',...
- 'tag','b1',...
- 'style','pushbutton',...
- 'string','设置',...
- 'backgroundcolor',[0.75 0.75 0.75],...
- 'position',[40 50 50 20],...
- 'callback',[...
- 'view(0,75);,',...
- 'shading interp;,',...
- 'lightangle(-45,30);,',...
- 'k=findobj(gca,''type'',''surface'');,'...
- 'set(k,''facelighting'',''phong'');,',...
- 'set(k,''ambientstrength'',0.3);,',...
- 'set(k,''diffusestrength'',0.8);,',...
- 'set(k,''specularstrength'',0.9);,',...
- 'set(k,''specularexponent'',25);,',...
- 'set(k,''backfacelighting'',''unlit'')']);
- b2=uicontrol('parent',h0,...
- 'units','points',...
- 'tag','b2',...
- 'style','pushbutton',...
- 'string','关闭',...
- 'backgroundcolor',[0.75 0.75 0.75],...
- 'position',[120 50 50 20],...
- 'callback','close');