Simple questions on Mechanical Vibrations
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
yung zhen lek
el 13 de Nov. de 2018
Respondida: Keith Hekman
el 29 de Dic. de 2020
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194917/image.jpeg)
For k = 100, c = 2 and m = 1 use Matlab to calculate ωn, ωd and ξ. and Solve the equation of motion for F = F0sin(ωt) where ω = 1 → 20 rad/s and F0 = 10 N and plot the maximum response at steady-state for each frequency.
%Part 2
%Equation of motion
clear all;
clc;
m=1;
c=2;
k=100;
F=0;
Force=[0;0;F];
M=[m 0 0;0 m 0;0 0 m];
K=[2*k -k 0;-k 2*k -k;0 -k k];
C=[2*c c 0;-c 2*c -c;0 -c c];
%Finding values
Z=zeros(3);
I=eye(3);
A=[C M;I Z];
B=[K Z;Z -I];
[V,D]=eig(B,A)
d=diag(D);
r=real(d);
im=imag(d);
wn=abs(d)
wd=im/-1
zeta=sqrt(1-(wd/wn)^2)
%Part 3
%2 equations: (K-Mw^2)a + Cwb=0, -Cwa+(K-Mw^2)=f
F0=10;
f=[0;0;F0];
z=[0;0;0];
w=1:0.1:20;
t=0:0.01:100;
for ii=1:length(w)
G=K-M.*w(ii)^2;
H=C.*w(ii);
T=[G H;-H G];
constants(:,ii)=T^(-1)*[z;f];
a(:,ii)= constants(1:3,ii);
b(:,ii)= constants(4:6,ii);
x=a(:,ii)*cos(w(ii)*t)+b(:,ii)*sin(w(ii)*t);
amp(:,ii)=sqrt((a(:,ii)).^2+(b(:,ii)).^2)
end
plot(w,x)
I am not sure why does MATLAB keeps on responding with vectors are not of the same length. Are there any ways to edit my solution/code?
I cant seem to plot the graph out =( please help!!!
0 comentarios
Respuesta aceptada
Más respuestas (1)
Keith Hekman
el 29 de Dic. de 2020
NOTE, you are missing the - in front of the c noted by the ""
C=[2*c "-"c 0;-c 2*c -c;0 -c c];
0 comentarios
Ver también
Categorías
Más información sobre Vibration Analysis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!