--profile Julia
指定で、Julia モードで起動for i = 1:10
println(i)
end
1 2 3 4 5 6 7 8 9 10
# Pkg.add("Gadfly")
using Gadfly
# A simple scatter plot:
plot(x = rand(10), y = rand(10))
# Let's try a random walk:
plot(x = 1:100, y = cumsum(rand(100)-0.5), Geom.point, Geom.line)
# And smooth it out:
plot(x = 1:100, y = cumsum(rand(100)-0.5), Geom.point, Geom.smooth)
# Pkg.add("Images")
using Images
function foo(z)
c = (φ-2)+(φ-1)im
max = 80
for n = 1:max
abs(z) ≥ 2 && return n-1
z = z^2 + c
end
return max
end
foo(x, y) = foo(x + y*im)
foo_grid(n) =
broadcast(foo,
linspace(-0.5, 1, n)',
linspace(-1, 0.5, n))
convert(Image, scale(foo_grid(500), 1/80))