登录
首页 » matlab » fractal-use

fractal-use

于 2013-03-02 发布 文件大小:43KB
0 199
下载积分: 1 下载次数: 4

代码说明:

  分形的练习一 ①Koch曲线 用复数的方法来迭代Koch曲线 clear i 防止i被重新赋值 A=[0 1] 初始A是连接(0,0)与(1,0)的线段 t=exp(i*pi/3) n=2 n是迭代次数 for j=0:n A=A/3 a=ones(1,2*4^j) A=[A (t*A+a/3) (A/t+(1/2+sqrt(3)/6*i)*a) A+2/3*a] end plot(real(A),imag(A)) axis([0 1 -0.1 0.8]) ②Sierpinski三角形 A=[0 1 0.5 0 0 1] 初始化A n=3 迭代次数 for i=1:n A=A/2 b=zeros(1,3^i) c=ones(1,3^i)/2 A=[A A+[c b] A+[c/2 c]] end for i=1:3^n patch(A(1,3*i-2:3*i),A(2,3*i-2:3*i), b ) patch填充函数 end (Fractal Exercise One The ① Koch curve Plural iteration Koch curve clear i to prevent i is reassigned A = [0 1] initial A is a connection (0,0) and (1,0) of the segments t = exp (i* pi/3) n = 2 n is the number of iterations for j = 0: n A = A/3 a = ones (1,2* 4 ^ j) A = [A (t* A+ a/3) (A/t+ (1/2+ sqrt (3)/6* i)* a) A+2/3* a] end plot (real (A), imag (A)) axis ([0 1-0.1 0.8])   ② Sierpinski triangle A = [0 1 0.5 0 0 1] initialized A n = 3 the number of iterations. for i = 1: n A = A/2 b = zeros (1,3 ^ i) c = ones (1,3 ^ i)/2 A = [A A+ [c b] A+ [c/2 c]] end for i = 1:3 ^ n patch (A (1,3* i-2: 3* i), A (2,3* i-2: 3* i), b ) patch filled function end)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 1
    说明:  液晶空间光调制器的原理和具体的应用以及相关的算法描述(Liquid crystal spatial light modulator of the principles and specific applications)
    2011-03-12 19:53:14下载
    积分:1
  • inflection
    introduction to water level control system
    2013-11-28 09:37:23下载
    积分:1
  • cljscx
    说明:  一个简单的潮流计算程序,计算其电压电流功率等数据(Simple Answer to Power Flow Computing Program)
    2019-04-08 18:51:58下载
    积分:1
  • Digital-Signal-Processing-(Sanjit)
    数字信号处理(Sanjit)(第四版)随处CD,matlab代码(Digital Signal Processing(Forth Edition)(Sanjit),matlab)
    2013-05-17 21:49:51下载
    积分:1
  • 纳什均衡计算
    说明:  本代码用于求解多方非合作博弈的纳什均衡解(This code is used to solve the Nash equilibrium solution of a multi-party non-cooperative game)
    2021-01-17 21:24:19下载
    积分:1
  • PM
    说明:  the attached file is the power mangement for MP201
    2007-10-26 16:50:23下载
    积分:1
  • spEnergy
    Calculate energy vector for a speech signal
    2014-08-08 15:06:39下载
    积分:1
  • 巴克码 barker code
    巴克码(相位编码脉冲信号)的波形、频谱和模糊函数的计算。((Phase-coded pulse signal) is calculated waveform, spectrum and ambiguity function Barker code.)
    2020-08-03 15:08:34下载
    积分:1
  • arma_last
    This function provides an ARMA spectral estimate which is maximum entropy satisfying correlation constraint (number of poles)and cepstrum constrains (number of ceros)
    2008-07-08 15:00:49下载
    积分:1
  • prtools
    A Matlab Toolbox for Pattern Recognition,PRTools..Version 3.0
    2009-07-21 11:18:57下载
    积分:1
  • 696518资源总数
  • 106148会员总数
  • 10今日下载