Skip to content
New issue

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

Image not define #223

Open
yehielliv opened this issue May 19, 2018 · 1 comment
Open

Image not define #223

yehielliv opened this issue May 19, 2018 · 1 comment

Comments

@yehielliv
Copy link

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))

@yehielliv
Copy link
Author

I try that and still get the same error image not define at
convert(Image, scale(foo_grid(500), 1/80))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant