QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 653|回复: 0
打印 上一主题 下一主题

【奠基经典】MATLAB实用程序案例之添加效果

[复制链接]
字体大小: 正常 放大

398

主题

13

听众

1344

积分

  • TA的每日心情
    慵懒
    2015-12-12 14:33
  • 签到天数: 81 天

    [LV.6]常住居民II

    跳转到指定楼层
    1#
    发表于 2015-7-31 00:07 |只看该作者 |倒序浏览
    |招呼Ta 关注Ta







    添加效果
    实例:

    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');




    关于本帖内容欢迎大家踊跃讨论,与在下交流!

    zan
    转播转播0 分享淘帖0 分享分享0 收藏收藏0 支持支持0 反对反对0 微信微信
    您需要登录后才可以回帖 登录 | 注册地址

    qq
    收缩
    • 电话咨询

    • 04714969085
    fastpost

    关于我们| 联系我们| 诚征英才| 对外合作| 产品服务| QQ

    手机版|Archiver| |繁體中文 手机客户端  

    蒙公网安备 15010502000194号

    Powered by Discuz! X2.5   © 2001-2013 数学建模网-数学中国 ( 蒙ICP备14002410号-3 蒙BBS备-0002号 )     论坛法律顾问:王兆丰

    GMT+8, 2025-8-18 03:44 , Processed in 0.294691 second(s), 52 queries .

    回顶部