How to solve readcell 1x1 missing ?

36 ビュー (過去 30 日間)
Ivan Mich
Ivan Mich 2021 年 2 月 21 日
回答済み: Walter Roberson 2021 年 2 月 21 日
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
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.
Ivan Mich
Ivan Mich 2021 年 2 月 21 日
Ok , what to do then in order to separate my problem?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2021 年 2 月 21 日
data = readtable('input.txt', 'readvariablenames', false);
rmdata = rmmissing(data);
y = table2cell(rmdata);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by