streamline computation of averaged matric via cellfun