``````
%QuadTriangleAssemble   This function assembles the element
%                       stiffness matrix k of the quadratic
%                       triangular element with nodes i, j,
%                       m, p, q, and r into the global
%                       stiffness matrix K.
%                       This function returns the global
%                       stiffness matrix K after the element
%                       stiffness matrix k is assembled.
K(2*i-1,2*i-1) = K(2*i-1,2*i-1) + k(1,1);
K(2*i-1,2*i) = K(2*i-1,2*i) + k(1,2);
K(2*i-1,2*j-1) = K(2*i-1,2*j-1) + k(1,3);
K(2*i-1,2*j) = K(2*i-1,2*j) + k(1,4);
K(2*i-1,2*m-1) = K(2*i-1,2*m-1) + k(1,5);
K(2*i-1,2*m) = K(2*i-1,2*m) + k(1,6);
K(2*i-1,2*p-1) = K(2*i-1,2*p-1) + k(1,7);
K(2*i-1,2*p) = K(2*i-1,2*p) + k(1,8);
K(2*i-1,2*q-1) = K(2*i-1,2*q-1) + k(1,9);
K(2*i-1,2*q) = K(2*i-1,2*q) + k(1,10);
K(2*i-1,2*r-1) = K(2*i-1,2*r-1) + k(1,11);
K(2*i-1,2*r) = K(2*i-1,2*r) + k(1,12);
K(2*i,2*i-1) = K(2*i,2*i-1) + k(2,1);
K(2*i,2*i) = K(2*i,2*i) + k(2,2);
K(2*i,2*j-1) = K(2*i,2*j-1) + k(2,3);
K(2*i,2*j) = K(2*i,2*j) + k(2,4);
K(2*i,2*m-1) = K(2*i,2*m-1) + k(2,5);
K(2*i,2*m) = K(2*i,2*m) + k(2,6);
K(2*i,2*p-1) = K(2*i,2*p-1) + k(2,7);
K(2*i,2*p) = K(2*i,2*p) + k(2,8);
K(2*i,2*q-1) = K(2*i,2*q-1) + k(2,9);
K(2*i,2*q) = K(2*i,2*q) + k(2,10);
K(2*i,2*r-1) = K(2*i,2*r-1) + k(2,11);
K(2*i,2*r) = K(2*i,2*r) + k(2,12);
K(2*j-1,2*i-1) = K(2*j-1,2*i-1) + k(3,1);
K(2*j-1,2*i) = K(2*j-1,2*i) + k(3,2);
K(2*j-1,2*j-1) = K(2*j-1,2*j-1) + k(3,3);
K(2*j-1,2*j) = K(2*j-1,2*j) + k(3,4);
K(2*j-1,2*m-1) = K(2*j-1,2*m-1) + k(3,5);
K(2*j-1,2*m) = K(2*j-1,2*m) + k(3,6);
K(2*j-1,2*p-1) = K(2*j-1,2*p-1) + k(3,7);
K(2*j-1,2*p) = K(2*j-1,2*p) + k(3,8);
K(2*j-1,2*q-1) = K(2*j-1,2*q-1) + k(3,9);
K(2*j-1,2*q) = K(2*j-1,2*q) + k(3,10);
K(2*j-1,2*r-1) = K(2*j-1,2*r-1) + k(3,11);
K(2*j-1,2*r) = K(2*j-1,2*r) + k(3,12);
K(2*j,2*i-1) = K(2*j,2*i-1) + k(4,1);
K(2*j,2*i) = K(2*j,2*i) + k(4,2);
K(2*j,2*j-1) = K(

...
...
... to be continued.

This is a preview. To get the complete source file,

```
```