3. ぱっと見、普通なLL
function
randmatstat(t)
n
=
5
v
=
zeros(t)
w
=
zeros(t)
for
i=1:t
a
=
randn(n,n)
b
=
randn(n,n)
c
=
randn(n,n)
d
=
randn(n,n)
P
=
[a
b
c
d]
Q
=
[a
b;
c
d]
v[i]
=
trace((P.'*P)^4)
w[i]
=
trace((Q.'*Q)^4)
end
return
(std(v)/mean(v),
std(w)/
mean(w))
end
function
mandel(z)
c
=
z
maxiter
=
80
for
n
=
1:maxiter
if
abs(z)
>
2
return
n-‐1
end
z
=
z^2
+
c
end
return
maxiter
end
4. もちろん対話環境有
$
julia
_
_
_
_(_)_
|
A
fresh
approach
to
technical
computing
(_)
|
(_)
(_)
|
Documentation:
http://docs.julialang.org
_
_
_|
|_
__
_
|
Type
"help()"
for
help.
|
|
|
|
|
|
|/
_`
|
|
|
|
|_|
|
|
|
(_|
|
|
Version
0.3.0
(2014-‐08-‐20
20:43
UTC)
_/
|__'_|_|_|__'_|
|
Official
http://julialang.org/
release
|__/
|
x86_64-‐apple-‐darwin13.3.0
julia>
1
+
2
3
julia>
ans
3
http://docs.julialang.org/en/release-0.3/manual/getting-started/