Hi every one, can you help me please !

3 vues (au cours des 30 derniers jours)
Johnny Vendetta
Johnny Vendetta le 6 Sep 2019
Commenté : darova le 6 Sep 2019
I have a code about vibration:
function main
d1=1;
v=10;
t_end=100*0.5*d1/v;
t=0:0.0001:t_end;
y0=[0;0;0;0];
[t,y]=ode45(@daodong,t,y0);
hold on;grid on;
plot(t,y(:,1));
xlabel('Thoi gian (s)')
ylabel('Bien Do dao dong (m)')
title('DAO DONG CUA HANH KHACH')
end
function yp = daodong(t,y)
c=10;
vt=10;
k1=84.24;
m1=5.265;
I1=0.2322;
a=0.21;
yp = zeros(4,1);
yp(1) = y(2);
yp(2) = ((-(c*(y(2)-0.05*2*pi*vt*(sin(4*pi*vt*t))-(a*y(4)/2))+k1*(y(1)-(0.05*(sin(2*pi*vt*t))^2)-(a*y(3)/2))))/m1);
yp(3) = y(4);
yp(4) = ((-(a*c*(y(2)-0.05*2*pi*vt*(sin(4*pi*vt*t))-(a*y(4)/2))+a*k1*(y(1)-(0.05*(sin(2*pi*vt*t))^2)-(a*y(3)/2))))/(2*I1));
end
Can you help me draw graph "Amplitude - Frequency"draw graph "Amplitude - Frequency" of y(:,1), please!
Thank you very much every one.
  1 commentaire
darova
darova le 6 Sep 2019
The script works fine as for me
img1.png

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Acoustics, Noise and Vibration dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by