[functions.global] added matrix-valued variant