lines = asciiread(filename,-1,"string")
nlines = dimsizes(lines)
delim = ","
field_names = str_split(lines(0),delim)
nfields = dimsizes(field_names)
fields = new((/nfields,nlines/),float)
do nf=0,nfields-1
fields(nf,:) = tofloat(str_get_field(lines,nf+1,delim))
end do
网友评论