clc;
clear;
close all;
L = 0.2;
m = 2;
g = 9.81;
M = m*L^2 * [3 2 1;
2 2 1;
1 1 1];
K = m*g*L * [3 0 0;
0 2 0;
0 0 1];
[V,D] = eig(K,M);
lambda = sort(diag(D));
wn = sqrt(lambda);
disp('Eigenvalues:');
disp(lambda);
disp('Natural frequencies (rad/s):');
disp(wn);
To embed this project on your website, copy the following code and paste it into your website's HTML: