Generalized Pascal functional matrix and its applications