配列の抽出
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
A 430000×5 table
Aがワークスペースにある変数です。
Aの二行目に含まれるNaN以外のデータを取り出し配列を整理した場合にはどうすれば良いでしょうか。
431520 0.1 130 33 145
431450 NaN 181 91 123
431050 0.1 131 33 299
431370 13 130 34 348
431080 13 33 33 236
438077 14 130 34 308
431051 12 130 33 35
上記のNaNが含まれる列以外の行列データが欲しいのですが、わからないです。
0 Commenti
Risposte (1)
Hernia Baby
il 11 Lug 2022
Modificato: Hernia Baby
il 11 Lug 2022
rmmissingが使えます。
A = [431520 0.1 130 33 145
431450 NaN 181 91 123
431050 0.1 131 33 299
431370 13 130 34 348
431080 13 33 33 236
438077 14 130 34 308
431051 12 130 33 35]
欠損値のある列を削除なのでdimを2にします
rmmissing(A,2)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!