How to solve readcell 1x1 missing ?
조회 수: 13 (최근 30일)
이전 댓글 표시
I am using readcell command in order to read a file. But some numbers/data in columns show 1x1 missing. How could I solve this problem?
I ve tried
data=readcell('input.txt')
y=rmmissing(readtable(data(3:end,8)))
but no use.
Could you please help me?
댓글 수: 2
Walter Roberson
2021년 2월 21일
The input to readtable() has to be a character vector or scalar string object. However, data(3:end,8) would be a cell, not a character vector or string scalar. data(3:end,8) would also typically be non-scalar unless the cell just happened to have exactly 3 rows.
채택된 답변
Walter Roberson
2021년 2월 21일
data = readtable('input.txt', 'readvariablenames', false);
rmdata = rmmissing(data);
y = table2cell(rmdata);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!