Effacer les filtres
Effacer les filtres

Reding csv file which contains numbers and strings

5 vues (au cours des 30 derniers jours)
MiauMiau
MiauMiau le 27 Nov 2014
Commenté : MiauMiau le 27 Nov 2014
Hi
I have a csv file test.csv with some thousands of lines each with three columns in the following style:
Wqckwb Pqbbxx Oq Ptjnfbdqa Gqpqsn Bdqoxfn 519908 519
cms nmyqjnmqsbdqgq pnqqfn g fxtfeqq fqmgqpqsn 411990 411
Unfortunately I can not read the file in with csv - what exactly can I do? Thanks

Réponse acceptée

dpb
dpb le 27 Nov 2014
Try importdata but it's not absolutely guaranteed. With the regular numeric format it should be able to figure it out.
But, if it can't successfully read the first column as a text header then textscan or fscanf are your friends....
  1 commentaire
MiauMiau
MiauMiau le 27 Nov 2014
importdata worked perfectly indeed! thanks so much!!

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by