I would do this with a loop over each line and a regex to parse each line and then parse to interpret each field. That's the standard way to do this sort of thing in Python, Perl, Ruby, etc.
On Wed, Feb 17, 2016 at 1:25 PM, Victor Liu <victor....@gmail.com> wrote: > I have a text file of the following format: > > --- snip --- > Nx Ny > dx dy > > v(x1,y1) > v(x2,y2) > ... > v(xNx,y1) > v(x1,y2) > ... > v(xNx,yNy) > --- snip --- > > In C, I would normally use fscanf to read in the four fields at the top > first, then loop through and read in the rest. > What is the idiomatic way of achieving the same thing in Julia? I would > like the list of numbers to end up in a matrix of the proper size. > As far as I can tell, there's no simple way of reading only one textual > field from a file at a time. >