Finding Natural frequencies and Mode shapes of an undamped 2 DOF Systems through Matlab
    86 ビュー (過去 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 件のコメント
参考
カテゴリ
				Help Center および File Exchange で Downloads についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!