欠損データの行の削除方法

エクセルよりデータを読み込みました。 まだ補間は行っていないため、データの欠損があります。 1列目に存在するNaNを検出し、その該当する行のみを削除するにはどのようなコードを利用すればよいでしょうか。 初心者なのでわかりません。教えてください。

 Risposta accettata

lattice
lattice il 11 Lug 2018

2 voti

isnan で 1 列目の NaN のある行を選んで,その行の全列を空にします.
元のデータを X とすると,
id = isnan(X(:,1));
X(id, :) = [];

Più risposte (1)

yuki suda
yuki suda il 11 Lug 2018

0 voti

ありがとうございます。 できました!!

1 Commento

Jiro Doke
Jiro Doke il 11 Lug 2018
是非、latticeさんの回答を「採用」してあげてください。

Accedi per commentare.

Categorie

Community Treasure Hunt

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

Start Hunting!