Hi all,
I have a regular grid of Nx * Ny, over which I am computing some things. Now, I want to select a circle on it at location (Nx/4, Ny/2) with radius (Ny/4). I have tried the following:

circle = @. [((x - Nx/4)^2 + (y - Ny/2)^2 < (Ny/4)^2) for x in 1:Nx, y in 1:Ny]

If I understood correctly, I don’t need to meshgrid because of broadcasting, right? However, if I try to plot some data on this with a heatmap, e.g.:

#u is a vector of size (Nx, Ny) with random data
u[circle] .= NaN
heatmap(u)

Thank you, this solves my issue! So I think my problem was mostly about not adjointing the y vector, which totally makes sense. Cool use of hypot too, I did not know this function. Thanks!