欠損データの行の削除方法
20 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
エクセルよりデータを読み込みました。 まだ補間は行っていないため、データの欠損があります。 1列目に存在するNaNを検出し、その該当する行のみを削除するにはどのようなコードを利用すればよいでしょうか。 初心者なのでわかりません。教えてください。
0 Commenti
Risposta accettata
lattice
il 11 Lug 2018
isnan で 1 列目の NaN のある行を選んで,その行の全列を空にします.
元のデータを X とすると,
id = isnan(X(:,1));
X(id, :) = [];
0 Commenti
Più risposte (1)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!