Pregunta de entrevista de MathWorks

How to speed up the matrix assembling process?