Renamed any to anyMat to distinguish between vector and non-vector inputs