Thanks, very helpful.
I was wondering if this has been superseded by now and what the best tool is to read NMEA data. Particularly, I have about 1 GB of NMEA strings to read, so I need something quite fast.
I also had some crashes with this script when the NMEA strings weren't detected. The oderfields command crashed when given a Nan. I added this to the end of the code, which seemed to fix the problem for me.
data = orderfields(data);