Finding Natural frequencies and Mode shapes of an undamped 2 DOF Systems through Matlab
85 次查看(过去 30 天)
显示 更早的评论
Hello, I'm a student and I look for a solution for Matlab. I'm quite beginner to use Matlab. Could you pls help me to write it through Matlab? I need how to write these codes through Matlab.
Thank you for all your supports and helps!

0 个评论
回答(3 个)
AVB
2020-12-10
Try using below .... change m1, m2 , k1 and k2 with your problem values.
clc;
m1 = 5;
m2 = 10;
k1= 1500;
k2 = 6500;
m = [m1 0; 0 m2];
k = [(k1 + k2) -k2; -k2 k2];
eigsort(k,m);
function [u,wn]=eigsort(k,m)
Omega=sqrt(eig(k,m));
[vtem,~]=eig(k,m);
[wn,isort]=sort(Omega);
il=length(wn);
for i=1:il
v(:,i)=vtem(:,isort(i));
end
disp("The natural frequencies are (rad/sec)")
wn
disp("\nThe eigenvectors of the system are")
v
disp("Ratios of eigenvectors are:\n")
A1_A2_1 = v(1,1)/v(2,1)
A1_A2_2 = v(1,2)/v(2,2)
figure(1)
plot([0,1,2,3], [0,A1_A2_1,1,0],'b-s', 'LineWidth',2, 'MarkerSize',10);
hold on;
plot([0,1,2,3], [0,-A1_A2_2,-1,0],'r-s', 'LineWidth',2, 'MarkerSize',10);
hold off; ylabel('Eigne Vector Ratio'); xlabel('Mass Number'); xticks([1 2]);
legend('Mode 1', 'Mode 2')
end
1 个评论
Rakesha
2023-9-5
clc;
m1 = 5;
m2 = 10;
k1= 1500;
k2 = 6500;
m = [m1 0; 0 m2];
k = [(k1 + k2) -k2; -k2 k2];
eigsort(k,m);
function [u,wn]=eigsort(k,m)
Omega=sqrt(eig(k,m));
[vtem,~]=eig(k,m);
[wn,isort]=sort(Omega);
il=length(wn);
for i=1:il
v(:,i)=vtem(:,isort(i));
end
disp("The natural frequencies are (rad/sec)")
wn
disp("\nThe eigenvectors of the system are")
v
disp("Ratios of eigenvectors are:\n")
A1_A2_1 = v(1,1)/v(2,1)
A1_A2_2 = v(1,2)/v(2,2)
figure(1)
plot([0,1,2,3], [0,A1_A2_1,1,0],'b-s', 'LineWidth',2, 'MarkerSize',10);
hold on;
plot([0,1,2,3], [0,-A1_A2_2,-1,0],'r-s', 'LineWidth',2, 'MarkerSize',10);
hold off; ylabel('Eigne Vector Ratio'); xlabel('Mass Number'); xticks([1 2]);
legend('Mode 1', 'Mode 2')
end
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!