Insert a matrix into a larger matrix at certain positions Stiffness matrix
- June 30, 2023
- 2 replies
- 4028 views
Hello community!
I request your help with the following: I want to enter a matrix into a larger one.
I’m working on assembling a global stiffness matrix of a structure (truss)
I have defined the matrices of each element. The matrix of the element is 4x4, "i"= 1 to "n", n: number of elements
![]()
I have an auxiliary matrix that defines in each row the degrees of freedom associated with each element. For example row 1 contains the degrees of freedom of element 1 and so on. I named this matrix GDL

What I want is for Mathcad to grab the matrix of each element and place it in the global matrix at the positions corresponding to the columns and rows that indicate the row of the auxiliary matrix GDL. For example the stiffness matrix of element 3 must be placed in rows and columns numbers 1, 2,5 y 6 of the global matrix.
I understand that once the correct routine is created I would have to use a FOR cycle to do it for each element. But at the moment I’m trying to test with only one element
Very grateful in advance for your guidance



