mat2vec.ix function

Auxiliary function, gives mask for matrix for directed, undirected etc.