Hi,
Is it possible to have a table with only the result ?
I don't want row /column names.

using DataFrames
function iain_magic(n::Int)
    M = zeros(Int, n, n)
    for I = 1:n, J = 1:n
        @inbounds M[I,J] = n*((I+J-1+(n >> 1))%n)+((I+2J-2)%n) + 1
    end
    return M
end
mm=iain_magic(3)
df=DataFrame(mm)

Reply via email to