Hello! There are many work of Prof. Carsten Carstensen regarding Finite element methods and MATLAB codes. Also, I recommend you to check some softwares like FreeFem++ and FenicsProject, in which several FEM spaces are included and immediately ready for application in a wide variety of variational problems.