removed stats toolbox dependency

Thanks to Chad Greene for pointing out that nanmax is from the stats
toolbox