Cell Array to CSV-file [improved cell2csv.m]

Writes cell array content into a *.csv file.

이 제출물을 팔로우합니다

편집자 메모: This file was selected as MATLAB Central Pick of the Week

now works with empty cells, numeric, char, string, row vector, and logical cells.
row vector such as [1 2 3] will be separated by two spaces, that is "1 2 3"
other types will be converted to the string "NA".
One array can contain all of them, but only one value per cell.
2x times faster than Sylvain's codes (8.8s vs. 17.2s):
tic;C={'te','tm';5,[1,2];true,{}};C=repmat(C,[10000,1]);cell2csv([datestr(now,'MMSS') '.csv'],C);toc;

credits go to Sylvain Fiedler:
modified and optimized from Sylvain Fiedler's codes at http://www.mathworks.com/matlabcentral/fileexchange/4400-cell-array-to-csv-file--cell2csv-m-

To get csv back to cell, use csv2cell(). There are a couple of that on fileexchange. I have packed them into a single library together with other useful routines. Feel free to check at http://www.mathworks.com/matlabcentral/fileexchange/47193-easy-matlab-and-shell-interaction-library--ez-m-

인용 양식

Jerry (2026). Cell Array to CSV-file [improved cell2csv.m] (https://kr.mathworks.com/matlabcentral/fileexchange/47055-cell-array-to-csv-file-improved-cell2csv-m), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 준 파일: fcell2csv - Fastest Cell Array to CSV-file

카테고리

Help CenterMATLAB Answers에서 Cell Arrays에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.6.0.0

link to my ez library

1.5.0.0

updated file description

1.4.0.0

replace repmat with subfunction

1.3.0.0

fixed a printing bug

1.2.0.0

made the parsing of arg more robust.

1.1.0.0

changed the title of this matlab page (nothing about codes itself)

1.0.0.0