v = nanmedian(X [, dim]); nanmedian is identical to the median function except that NaN values are ignored. If all values are NaN, the median is returned as NaN. [Is this behaviour compatible?] See also: nanmin, nanmax, nansum, nanmean