How to plot time vs displacement?
Afficher commentaires plus anciens
Hi i'm not great at coding on MATLAB and need help to to find the dynamic response to a 5 DOF system with intitial displacments (velocity = 0) over a certain time period. I need to find the minimum and maximum displacements of a specific node in this time period. There is no damping.
The equation is in the form Ut = @(t) A1*cos(w1*t) + A2*cos(w2*t) + A3*cos(w3*t) + A4*cos(w4*t) +A5*cos(w5*t) where Ai is a 5x1 vector and w are the natural frequency constants.
u0 = [u1; u2; u3; u4; u5] is the initial displacement at each node
udot0 = 0
t0 = 0 start time
tf = 779.3 end time
dt = 7.1 time increment
How would I program this so that I get the values at each node for each time step and then get the maximum and minimum value for one of the nodes? Is there a way to simulate the system visually on matlab?
Sorry to be vague, I am just wanting tips for a novice.
Réponse acceptée
Plus de réponses (1)
akshata
le 3 Juin 2024
0 votes
t0 = 1 ; t1 - 10; dt = 0.01 ;
u = @(w,t) = cos(w*t) ;
t = t0:dt:t1 ;
w = 2*pi ;
n = length(t) ;
s = zeros(1,n) ;
for i = 1:n
s(i) = u(w,t(i)) ;
end
plot(t,s)
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!