实例:添加效果

[复制链接]
 楼主| cooldog123pp 发表于 2024-7-26 23:48 | 显示全部楼层 |阅读模式
ck, TI, ar, ST, se, AC
  1. h0=figure('toolbar','none',...
  2.     'position',[200 50 300 350],...
  3.     'name','实例54');
  4. h1=axes('parent',h0,...
  5.     'position',[0.2 0.4 0.6 0.6],...
  6.     'visible','off');
  7. ezsurf('sin(sqrt(x.^2+y.^2))/sqrt(x.^2+y.^2)',[-6*pi,6*pi])
  8. b1=uicontrol('parent',h0,...
  9.     'units','points',...
  10.     'tag','b1',...
  11.     'style','pushbutton',...
  12.     'string','设置',...
  13.     'backgroundcolor',[0.75 0.75 0.75],...
  14.     'position',[40 50 50 20],...
  15.     'callback',[...
  16.         'view(0,75);,',...
  17.         'shading interp;,',...
  18.         'lightangle(-45,30);,',...
  19.         'k=findobj(gca,''type'',''surface'');,'...
  20.         'set(k,''facelighting'',''phong'');,',...
  21.         'set(k,''ambientstrength'',0.3);,',...
  22.         'set(k,''diffusestrength'',0.8);,',...
  23.         'set(k,''specularstrength'',0.9);,',...
  24.         'set(k,''specularexponent'',25);,',...
  25.         'set(k,''backfacelighting'',''unlit'')']);
  26. b2=uicontrol('parent',h0,...
  27.     'units','points',...
  28.     'tag','b2',...
  29.     'style','pushbutton',...
  30.     'string','关闭',...
  31.     'backgroundcolor',[0.75 0.75 0.75],...
  32.     'position',[120 50 50 20],...
  33.     'callback','close');


VelvetStars 发表于 2025-6-15 19:13 | 显示全部楼层
学到了,实例添加的用法
 楼主| cooldog123pp 发表于 2025-6-25 13:17 | 显示全部楼层
VelvetStars 发表于 2025-6-15 19:13
学到了,实例添加的用法

回复帖子就能下载学习了,收到老铁的感谢,还会努力。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2224

主题

7416

帖子

31

粉丝
快速回复 在线客服 返回列表 返回顶部