Median that ignores Nans
Show older comments
Hello,
just wondering if anyone can help me with the Median function?
I have long-term rainfall data in a matrix of 306 stations by 149 years (as I have already chosen a month) with rainfall in millimetres or NaNs for no values. I previously have been able to get the mean value for all years for each station by using
z = nanmean(values) ;
Now I would like to get the median for a chosen column but my results keep coming up with the median being NaNs for most stations.
Is anyone able to help with this?
Thankyou
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!