Modelling with Sparse And Dense Matrices