OptFEM2DP1 is a Matlab/Octave toolbox which performs the assembly of P1-Lagrange finite element matrices in 2D.