Error using textscan
Param/value pairs must come in pairs.
From the documentation, this format should be as follows:
C = textscan(fileID,formatSpec)
or with the optional parameters set:
C = textscan(fileID, formatSpec, Name, Value);
I was getting this error as I had originally tried to define the 'formatspec' entry name - and this turns out to be unnecessary.
I ended up using the following formatSpec for the command:
format_spec = '%s%f%f%f%f%f%f%f%f%f'
(Note no commas here)
date_format='%{yyyy-mm-dd_HH-MM-SS}D';
However this produced the following error:
Error using textscan
Badly formed format string.
I'm sure that the date_format string is correct, so I found that I can replace this with a simple %s to read the column into a string, and handle the data manually.
No comments:
Post a Comment