Save .csv file as plain text
Ältere Kommentare anzeigen
Currently I am saving data to a .csv file, opening that file, and extracting certain columns. However, the only way that Matlab will read more than the first row is to open the saved csv file in Word and save. Words default is to convert it to plain text when saved (still a csv file, though)- so when I do this, Matlab has no trouble reading the entire file.
So, is there anyway that I can make Matlab save it as plaintext in the first place, to avoid opening and saving each file in Word?
My format is comma delimited, with carriage returns for each row. The Word-saved file and the original look identical when opened in notepad, but Matlab thinks there is a difference.
Thanks
4 Kommentare
Thomas
am 2 Okt. 2012
What command do you use to read the csv file in MATLAB?
Bernoulli Lizard
am 2 Okt. 2012
Daniel Shub
am 2 Okt. 2012
Where are the csv files coming from originally?
Bernoulli Lizard
am 2 Okt. 2012
Antworten (1)
Daniel Shub
am 2 Okt. 2012
0 Stimmen
The question seems a little weird to me. I think of csv files are being plain text files. I also do not see the difference between a semicolon delimited file and a comma delimited file. Finally, in R2011a I don't have a command csvimport, but there is csvread and dlmread. I would suggest using dlmread on the semicolon delimited file and then use MATLAB to extract the columns you want.
1 Kommentar
Bernoulli Lizard
am 2 Okt. 2012
Kategorien
Mehr zu Standard File Formats finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!