CSV with column headers

This simple routine extends the function of the MATLAB csvwrite function to add column headers
9,4K download
Aggiornato 6 gen 2011

Visualizza la licenza

I have often needed to generate data files to export from Matlab for other programs with headers to explain the contents of the columns. This simple routine extends the function of the MATLAB csvwrite function to add column headers

Please refer the help for csvwrite for a detailed description of all the parameters but this a simple example of how to use the function:

>> headers = {'A','B','C'}

headers =

'A' 'B' 'C'

>> data = [1,2,3;4,5,6]

data =

1 2 3
4 5 6

>> csvwrite_with_headers('test.csv',data,headers)

Cita come

Keith Brady (2024). CSV with column headers (https://www.mathworks.com/matlabcentral/fileexchange/29933-csv-with-column-headers), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2010b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0