There is positive definiteness of the stiffness matrix of truss, and this can be checked by positive Eigenvalues. But I'm not getting all Eigenvalues as positive.
Whatever system you are handling with, from frquency analysis if you find one or more eigenvalues it means that you have one or more rigid body motions, so your structure is not perfectly constrained (it is not an iso-static structure).
Consider now a bar loaded with a axial compressive load. You can compute the Euler Critical Load, that is the load for which the structure goes to be unstable. But when the bar goes to be unstable, your first eigenvalue goes to be zero.
Now, if you have the stiffness matrix of a particular system, you can introduce the geometrical stiffness matrix, that is a matrix that takes into account the axial load applied to, for example, a bar.
So, you can perform an iteration in matlab, computing for each cycle, for each value of the load applied, the eigenvalues of the system as:
eig(K-Kg), where Kg is the geometrical stiffness matrix. When the first eigenvalue goes to be zero, you found the critical load that brings your structure/system to instability.
If the stiffness matrix K of your structure is singular, that is, determinant of K is zero, it admits rigid-body motion and is statically unstable. This is eqivalent to having a zero eigenvalue.
If column vectors of K or row vectors of K are not linearly independent, K is singular.
If you get very small eigenvalues, such as in the order of e^-10, they are effectively zero and thus the structure is effectively unstable (or effectively allows rigi-body motion).
Have you solved your problem now? If not, you are welcome to show me all the eigenavlues of [K]. You can sen [K] if it is now very big and if you wish.
Please note the definition of eigenvalues must be clear. Lambda is called an eigenvalue if [K]*{x}=lambda*{x}.
When you calculate the eigenvalues of [K] in line 35, the [K] is the stiffness matrix of the truss wihtout the external constraints at nodes 4 and 5. Therefore the whole truss is not constrained and thus allows rigid-body motion => positive SEMI-DEFINITE => zero eigenvalues
smallest eig value
ans =
-2.2141e-11
is effectively mean zero eigenvalue.
When you calculate a real-number quantity which should be zero in Matlab, it will not be an exact zero as it is a real number. Insteady it would be a very small positive or negative number.
This looks right now ---the unconstrained truss (allowing rigid-body motion) has zero eiegnavlues while the properly constrained truss has non-zero eigenvalues.