implemented matrix-init-* functions