fixed error in the Deterministic model

the M matrix was not constructed correctly