-
fractal-use
分形的练习一
①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)
- 2013-03-02 10:03:09下载
- 积分:1
-
ang2Pnts
Angle between two points
- 2011-12-03 04:30:02下载
- 积分:1
-
Matlab-Simulation-for-Com-(1)
Matlab Simulation for Comparison of Different QAM
Constellations and Mapping for a Channel with
Additive White Gausian Noise
- 2013-12-06 06:00:09下载
- 积分:1
-
suanli1_1_3
孙志忠编写的《偏微分方程数值解法》一书中例题1.1.3的程序。用紧差分格式解常微分方程边值问题。(SUN Zhi-zhong prepared, )
- 2007-10-08 22:38:53下载
- 积分:1
-
IM
说明: 一个关于考虑铁损的感应电机用M语言写的模型,输出为电流等十六个参数。(1 on the induction motor considering iron loss of the written language with the M model, the output current of 16 parameters.)
- 2010-01-20 11:14:00下载
- 积分:1
-
机器人编队(three_car_formation_control.m)
机器人编队运行
- 2020-11-28下载
- 积分:1
-
2DMaxima
在二维空间里有两个点A=(X1,Y1)和B=(X2,Y2),如果X1>X2并且Y1>Y2 ,我们认为A优于B,A是这个集合的最大极值点,在给定的二维空间里的N个点的集合S中,找出最大极值点。(In two-dimensional space, there are two points = A = (X1, Y1) and B (X2, Y2), if the X1 and Y1 > X2 > Y2, we think that A is superior to B, A is the biggest extreme value point of the set, in A given set of N points in the two-dimensional space S, find out the most extreme value point.)
- 2013-12-24 21:02:56下载
- 积分:1
-
huffmann
基于matlab的哈夫曼编码图像压缩算法(matlab huffmann coding)
- 2009-09-25 20:06:11下载
- 积分:1
-
bd
说明: 双馈电机的数学仿真模型,很有用,希望给大家一些提示(Double-fed motor mathematical simulation model, was very useful, want to give you some tips)
- 2009-10-22 10:03:56下载
- 积分:1
-
Estabilidad-flujo-de-Poiseuille
code for calculate the stability of the poiseuille flow in a round tube
- 2011-02-28 02:08:03下载
- 积分:1