I was wondering if matlab has a built in way to deal with NaN\'s in function calls. More specifically, I am trying to take the mean of a vector that has a
NaN
I think this should work:
mean(x(isfinite(x)));