MathWorks Interview Question

How to speed up the matrix assembling process?