- 1、本文档共4页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
《Fractal Basins of Attraction paper》.doc
Fractal Basins of Attraction paper
Liudong 101237
Considering using the Newton downhill method to iterate the polynomial, we can choose the points that the Newton iteration converges and at the same time we plot the historical points of the successful iteration points with a small point shown on the picture. As for the different color of each basin we can determine the final iteration point on which basin and for each basin we have different colors on it; and the program code is shown as follows:
function basinsz3
t0=clock;
n=100;
for j=1:n
for k=1:n
a=-1+2*(j-1)/(n-1);
b=1-2*(k-1)/(n-1);
z(j,k)=a+b*i;
[z,hist,flag]=newton(z(j,k),f,g);
if flag==1
hold on
if real(z)0.8
plot(hist,.b)
elseif imag(z)0.3
plot(hist,.r)
else
plot(hist,.g)
end
title(Basins of attraction);
axis ([-1,1,-1,1]);
hold off
end
end
end
t=etime(clock,t0)
end
function [z,hist,flag]=newton(z0,f,g)
maxit=100;
tol=1e-6;
flag=1;
z=z0;
hist=z;
fz=feval(f,z);
for it=1:maxit,
if norm(fz)=tol,
return;
end
d=feval(g,z)\fz;
lambda=1.0;
zn=z-d;
fn=feval(f,zn);
while norm(fn)=norm(fz),
lambda=lambda*0.5;
if lambdatol,
flag=0;
break;
end
zn=z-lambda*d;
fn=feval(f,zn);
end
z=zn;
fz=fn;
hist=[hist z];
end
end
function v=f(z)
v=z^3-1;
end
function v=g(z)
v=3*z^2;
end
For this kind of program will debugs for a lot of time, here we just choose 100*100 pixels and we get the picture as shown below:
For p(z)=z^3-1: t
您可能关注的文档
- 《Elements of Statistical Learning Solution Book 2》.pdf
- 《EMB-STM32-M3_Code_RM_v1实验指导手册》.pdf
- 《Embest面向Altera SoC FPGA的支持-Linux on SoC》.pdf
- 《EMD-PCB设计相关知识》.pdf
- 《EMERSON UPS技术参数》.pdf
- 《Employee Share incentives in UK》.pdf
- 《EN 300-2016 Oriented Strand Boards (OSB) - Definitions》.pdf
- 《end 电流反馈型运放【TI FAE 分享】》.pdf
- 《Enforcement and Public Health - WCC-PDA - Nov 09》.ppt
- 《English for TV Viewers》.pdf
文档评论(0)