I'm reviving an old script in Matlab which uses "[d h v c t] = textread(fn,'%s %*s %s %f %s %s');" to import data, I want to replace the textread with textscan as that seems to be recommended.
My problem (with both the old and the new) is that my fourth column of data - the floating point value- has some gaps in it. As whitespace is my delimiter this means that matlab tries to insert the fifth column which contains letters as a floating point value and therefore gives me an error.
Any suggestions on how to make it automatically skip lines without a value? I have about 100 files which need to be periodically updated and therefore an manual methods are too time consuming. My data looks like this but over a long period of time:
31/12/1991 @ 00:00:00 Q25 T2
01/01/1992 @ 00:00:00 Q25 T2
02/01/1992 @ 00:00:00 24.451330 Q25 T2
03/01/1992 @ 00:00:00 24.674587 Q25 T2
04/01/1992 @ 00:00:00 25.264880 Q25 T2
Thanks