From: Catalin Eberhardt on
Hi Andres,

Many thanks for replying! In this case, I could define as a "bad line" any line that contains either ":", "test" or "=". I tried the command

A=txt2mat('d:\data.csv','BadLineString',{[':' '=' 'test']})

but this produced

A =
Columns 1 through 12
4.8086 1.6040 2.1617 -0.4620 0.6502 -3.0033 -4.5974 3.8317 1.5116 1.8449 -0.5677 0.2805

Columns 13 through 14
-2.4620 -4.3333

Trying with just ':' also produced a different matrix than expected.

It is the case that I only need the numbers from these identically-formated data files, so if I could just eliminate all the lines containing one of those strings, I would be happy :)
From: Catalin Eberhardt on
Solved it - your solution

A = txt2mat('example.txt',0,'ReadMode','line')
A = A(any(isfinite(A),2),:)

was all that was needed! Many thanks for that indeed! Now I have the grueling task of reorganising that matrix in a more logical and less redundant way :)