警告: EraseMode 属性不再受支持,而且在以后的版本中会出错。
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 = ;
h = plot(x(1), x(2), ' . ');
darkgreen = ;
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 = ;
A1 = ; b1 = ;
A2 = ; b2 = ;
A3 = [-0.15 0.28; 0.26 0.24]; b3 = ;
A4 = ;
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上不行了,,感谢感谢
页:
[1]