load TXT file into column vectors with different types of data
Mostra commenti meno recenti
Hello,
I am trying to read some columns from a text file into matlab. I want colum "Serial Number" as strings 'because I don't want the serial number cut off) and column "Creation date" as a Matlab recognized date. I tried dlmread, textscan, converting it to CSV and use csvread, but nothing worked correctly. What should I do to read that data?
"REGID";"Line";"Machine";"Previous Operation";"Serial Number";"Signal Name";"Signal Value";"Creation date"
"594093484";"xxxx";"xxxx";"10";"051805140904122954";"xxxx";"811";"4/09/2014 12:25:38"
"594095082";"xxxx";"xxxx";"10";"051805140904123524";"xxxx";"1000";"4/09/2014 12:31:06"
Risposte (1)
Orion
il 20 Ott 2014
0 voti
Use the Import wizard tool (right click on your text file in the Current folder, then import data).
I created a text file

and then generate a sciprt with the import wizard, see the mfile attached.
you juste need to specify if you want to import your data as text or as number.
Categorie
Scopri di più su Text Files in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!