[PD] max value of last n samples