The issue appears to be with trying to read in the file twice , that is , when you set
info = readdlm("DataSet.txt")
you get a Julia object, like you said, a 30×6 Array{Float64,2}
. So the effective result inside the function is
M = readdlm(readdlm("DataSet.txt"))
The function call should just be
mymain("DataSet.txt",5)
or
info_filename = "DataSet.txt"
mymain(info_filename,5)