鱼C论坛

 找回密码
 立即注册
查看: 5294|回复: 0

警告: EraseMode 属性不再受支持,而且在以后的版本中会出错。

[复制链接]
发表于 2020-3-5 23:54:54 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
function fern
% FERN MATLAB impiementation of the Fractal Fern
% Michael Barnsley, Fractals Everywhere, Academic Press, 1993
% This version runs forever, or until stop is toggled.
% See also: FINITEFERN

shg
clf reset
set (gcf , 'color', 'white','menubar','none' , 'numbertitle','off','name','Fractal Fern')
x = [0.5 ; 0.5];
h = plot(x(1), x(2), ' . ');
darkgreen = [0 2/3 0];
set(h , 'markersize', 1, 'color', darkgreen, 'erasemode', 'none');
axis([-3 3 0 10])
axis off
stop uicontrol('style','toggle','string','stop','background','white');
drawnow

p = [0.85 0.92 0.99 1.00];
A1 = [0.85 0.04; -0.04 0.85]; b1 = [0 ; 1.6];
A2 = [0.20 -0.26; 0.23 0.22]; b2 = [0 ; 1.6];
A3 = [-0.15 0.28; 0.26 0.24]; b3 = [0; 0.44];
A4 = [0 0; 0 0.16];

cnt = 1;
tic
while ~get(stop,'value')
    r = rand;
    if r < p(1)
        x = A1*x + b1;
    elseif r < p(2)
        x = A2 * x + b2;
    elseif r < p(3)
        x = A3 * x + b3;
    else
        x = A4 * x;
    end
    set(h,'xdata',x(1),'ydata',x(2));
    cnt = cnt + 1;
    drawnow
end
t = toc;
s = sprintf('%8.0f points in %6.3f seconds' , cnt , t);
text(-1.5 , -0.5 , s , 'fontweight' , 'bold');
set(stop , 'style' , 'pushbutton' , 'string' , 'close' , 'callback' , 'close(gcf)')
            
            

end





>> fern
警告: EraseMode 属性不再受支持,而且在以后的版本中会出错。
> In fern (line 13)
未定义与 'char' 类型的输入参数相对应的函数 'stop'。

出错 fern (line 16)
stop uicontrol('style','toggle','string','stop','background','white');




这个怎么改,,,,MATLAB的,来这里碰碰运气,,这是因为这个适应较老的版本,在2018a上不行了,,感谢感谢
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-9-28 08:26

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表