mgen function

Generate simulated network according to a given probability matrix