Le vendredi 14 octobre 2016 à 19:59 -0700, Henri Girard a écrit : > Hi, > Is it possible to have a table with only the result ? > I don't want row /column names. So why do you create a data frame? Isn't a Matrix enough?
Regards > 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)
