I am quite new in this field. For my university I prepared a stiffness matrix to solve for a project group. This matrix consists of 450 equations with 450 unknows (it's a Matlab script) and I have the associated load vector $\{L\}$ of 450 rows. since I need to calculate the displacements would you advice me to simply do $\{x\} = [K]^{-1} \{L\}$?
Asked
Active
Viewed 187 times
0
-
Just use any routine for solving linear systems, as inverting a matrix must be avoided. In MatLab, you have the backslash. Look the documentation on mathworkds, you'll find anything you need – VoB Jan 25 '21 at 16:17
-
1This is such a small problem that matlab's backslash operator is the way to go. – Wolfgang Bangerth Jan 25 '21 at 17:02
1 Answers
1
As mentioned in the comments by Wolfgang Bangerth, for this problem you want to use the backslash operator, i.e.,
u = K \ L;
In general, you don't want to reinvent the wheel and should go with a linear algebra library for this kind of problem.
PS: Keep in mind that your stiffness matrix might be singular if you haven't imposed any constraints.
nicoguaro
- 8,500
- 6
- 23
- 49