Filter löschen
Filter löschen

reading text file a matrix of string

2 Ansichten (letzte 30 Tage)
Dany
Dany am 20 Okt. 2013
Kommentiert: Dany am 20 Okt. 2013
Hi, i have a large data file in which each row looks like this:
1/1/2012 00:05:00 0.45
all rows have the same format. i want to read it into matlab by using the command "tdfread". it works, but the first 2 columns comes out wrong, the third one is ok.
is there any way to make the command read the first two columns as a string/char and not as a scalar?
using "fopen" takes too long, thats why im trying to use this command.
thank you for your help.
  6 Kommentare
dpb
dpb am 20 Okt. 2013
Bearbeitet: dpb am 20 Okt. 2013
Quite likely-- tdfread is an m-file that sucks in the whole file as stream and then tries to figure out what it is that it has read.
textscan otoh is a builtin function that uses a specific format string and the i/o libraries...
Dany
Dany am 20 Okt. 2013
it works perfect. thank you

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by