配列の抽出
10 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Hernia Baby
on 11 Jul 2022
Edited: Hernia Baby
on 11 Jul 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)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!