I think you need to write your parser for this file. The key commands needed are…
function read_my_file(filename)
file = open(filename,"r")
for line in eachline(file)
data = split(line) # produces a vector of strings
n = parse(Int,data[1]) # converts one of the data fields to a number
m = Matrix{Int}(undef,n1,n2) # allocates the matrix, where n1=20,n=5 in the example
v = Vector{Int}(undef,n) # allocate the vector
if data[1] == "NW"
#read the vector data here
end
end
close(file)
return m, v
end
with proper care, a combination of those things can do the job. But since the file has a specific format with different number of columns, unless someone implemented its parsing already, it has to be done by hand.
Once you read the header line that specifies the sizes, I think you can use the readdlm function to read each array, passing a dims parameter to specify the size of each array to read in.