Convert CSV to cell array
조회 수: 46 (최근 30일)
이전 댓글 표시
I've tried searching for solutions to this, but can't seem to find one that works for my file format. I have a .CSV file output from some other software, and want to analyse the data in Matlab. The output (attached 2 examples) consists of a row of amplitudes, a row of standard deviations (the length of which varies by data set), and then a row of fit diagnostics. Following that is a table with additional information.
Is there a way to directly convert this CSV into a cell array? I'm sure I could write something to stucture the data once it's in a cell array, but using things like textscan etc has been giving me a headache...
댓글 수: 0
답변 (1개)
Gaurav Ahuja
2018년 1월 5일
use this syntax
if true
[num,txt,raw] = xlsread(___)
end
returns the text fields in cell array txt, and both numeric and text data in cell array raw, using any of the input arguments in the previous syntaxes.
refer this documentation link for example: https://in.mathworks.com/help/matlab/ref/xlsread.html#bthgbmn
Hope this helps.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!