function Ktmp=Evaluate_Elemental_Contribution(anElement,Ndofs) %The coefficients of the global stiffness matrix of each element %are contributing to the corresponding global degrees of freedom Ktmp=zeros(Ndofs,Ndofs); nElementNodes=size(anElement.iEnd,2); nElementDofs=size(anElement.Kg,1); for irow=1:nElementDofs iGlobalrow=anElement.index(irow); for icol=1:nElementDofs iGlobalcol=anElement.index(icol); Ktmp(iGlobalrow,iGlobalcol)=anElement.Kg(irow,icol); end end