Hey Everyone,
I am trying to construct a small 5 element, 2 noded finite element model of a tapered beam using matlab.
I currently have an acceptable answer, but I was wondering if there was any way that the clever people of the forum may have a more elegant solution.
Currently I am creating a global stiffness matrix using a connectivity matrix, describing the nodal connections. Since it is a beam, the nodes just line up with eachother simply.
In my nested loop I currently have the code at the bottom as a way of looping and checking if it is the corner of the sub-matrix 2x2. Do you all know if there is a better way of doing this so i dont have to use a if statement? It seems excessive.
A=[11449/15625; 7921/15625; 5041/15625; 2809/15625; 49/625];
kg(B(e,i),B(e,j))=kg(B(e,i),B(e,j))+k;