We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After updating to latest julia and atom 1.27 I get error image not define in Juno, in trying the tutorial line at the convert function.
Pkg.add("Images") using Images
# typing a \ and selecting from the autocomplete, e.g. \phi or \le.
\
\phi
\le
Shift-Enter
const ϕ = golden
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
# Let's try this out – play around with the numbers!
foo(0) foo(0.1+0.5im)
# Let's apply foo to a grid of numbers. Don't worry too much if you don't # understand this code, but make sure to evaluate it. (Bonus points for
foo(x, y) = foo(x + y*im)
foo_grid(n) = broadcast(foo, linspace(-0.5, 1, n)', linspace(-1, 0.5, n))
# Can you see the pattern?
foo_grid(10)
# Let's try it as an image:
convert(Image, scale(foo_grid(500), 1/80))
The text was updated successfully, but these errors were encountered:
I try that and still get the same error image not define at convert(Image, scale(foo_grid(500), 1/80))
Sorry, something went wrong.
No branches or pull requests
After updating to latest julia and atom 1.27 I get error image not define in Juno, in trying the tutorial line
at the convert function.
Pkg.add("Images")
using Images
Let's try visualising this function. You can type latex symbols by
# typing a
\
and selecting from the autocomplete, e.g.\phi
or\le
.You can use
Shift-Enter
to quickly evaluate definitions.const ϕ = golden
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
# Let's try this out – play around with the numbers!
foo(0)
foo(0.1+0.5im)
# Let's apply foo to a grid of numbers. Don't worry too much if you don't
# understand this code, but make sure to evaluate it. (Bonus points for
using that Ctrl-D trick here, though)
foo(x, y) = foo(x + y*im)
foo_grid(n) =
broadcast(foo,
linspace(-0.5, 1, n)',
linspace(-1, 0.5, n))
# Can you see the pattern?
foo_grid(10)
# Let's try it as an image:
convert(Image, scale(foo_grid(500), 1/80))
The text was updated successfully, but these errors were encountered: