Of course!
I enclose both the one with Young's variable modulus and the one with mass density. The first one works, because the stiffness matrix is the same as the one calculated on another program. While, in that of the density of variable mass in space, the matrix of the masses is completely...