Problem 44410. NaN (欠損値) が含まれている行を削除しよう
行列 A が与えられたとき、その行列の中に NaN (Not a number; 欠損値) の要素がある行を見つけ出し、その行を削除しましょう。
例:
A = [ 1 5 8 -3 NaN 14 0 6 NaN ];
の行列が与えられたとき、関数は以下のようなベクトル B を返します。
B = [ 1 5 8 ]
- (英語版) Problem 25. Remove any row in which a NaN appears https://www.mathworks.com/matlabcentral/cody/problems/25
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers321
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15601 Solvers
-
10199 Solvers
-
917 Solvers
-
11019 Solvers
-
Calculate the average value of the elements in the array
1314 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!