I need a fem code either in matlab or fortran to refer to as I am stuck at some places. Please help.
Hey, enough of criticism.
Nobody has any idea what you're talking about. The title of the thread mentions heat transfer, but it looks like you're solving some kind of structural dynamics problem.