removing speech marks from data

5 vues (au cours des 30 derniers jours)
Luke Parry
Luke Parry le 15 Juil 2011
Hi,
I've not got a lot of experience with matlab so I apologise if it seems like a waste of time. I have a straightforward problem (hopefully). I am importing data in csv format, however the wizard cannot distinguish the data from the text header because it is in speech marks. I was wondering whether there is a simple way to remove the speech marks? I'm on quite a brief summer internship so I would really appreciate your help.
Many Thanks
Luke

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 15 Juil 2011
What do you mean speech marks? If it is text header, can you simply ignore them and import the numeric data only. When you do the import through wizard, you can specify the number of text header lines. Try to type the following command in the MATLAB command window and see what you got.
Data=importdata('MyDataFile.csv')
  3 commentaires
Walter Roberson
Walter Roberson le 18 Juil 2011
You can use textscan() with the double-quote included in your Whitespace parameter.
Walter Roberson
Walter Roberson le 18 Juil 2011
Include comma in the Whitespace list as well to make parsing easier.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Large Files and Big Data dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by