How do I make multiple variables into one csv file?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone,
Probably a simple question, but I have about 9 variables that are all separated that I would like to compact into a single CSV file with the variable names as headers. Is there an easy function to do this so that I can load the data outside of Matlab?
0 Kommentare
Antworten (1)
Image Analyst
am 3 Feb. 2015
See the first example on writing a text file in the help for writetable(). It does exactly what you want.
writetable(yourTable, filename);
2 Kommentare
Image Analyst
am 3 Feb. 2015
Then you must have an old version of MATLAB, earlier than R2013b. So you can simply use fopen(), fprintf(), and fclose(). Examples are in the help. It's not hard like 3-5 lines of code.
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!