I have a .txt file with thousands of lines of data that I want to read into my Matlab workspace. The problem is that the data does not use a consistent separation. For example, 2 lines of data look similar to this:
HA: 2012-01-08, 11:01:45.802 – FFFF0811111111210208
BA: 2012-01-08, 11:01:45.805 – FFFF0811111111220333
In this, I have a variable, “HA” and “BA”, each with a date, time and 422 data. I want to read in this data for a large number of lines. I am trying textscan but I am a little confused how to read in the data because it is not separated by a consistent delimiter such as comma-delimited. Thus far, I have wrote:
I am trying to get my script into a format similar to what Matlab shows in "help textscan":
“C = textscan(FID,'FORMAT',N,'PARAM',VALUE)”
Any help is greatly appreciated.