Problem 1216. Mean ignoring NaNs
Define a function that behaves in the same way as mean(x) and mean(x,d) except that it ignores NaNs (unless all of the values being averaged are NaNs, in which case the result for those values should be NaN).
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers49
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15467 Solvers
-
17025 Solvers
-
Construct a string from letters and counts
141 Solvers
-
Accessing elements on the diagonal
99 Solvers
-
5031 Solvers
More from this Author11
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!