Question

Matlab: Study the effects of damping by starting a pendulum (use l = 9.81 m and...

Matlab:

Study the effects of damping by starting a pendulum (use l = 9.81 m and q = 0.1) with an initial displacement (θ = 0.5 rad, for example). Estimate the time constant for the decay of the pendulum oscillation obtained with these values.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

% compute the knee angle (térdszög számolása)
v1 = m1(:,2:3)-m2(:,2:3);
v2 = m3(:,2:3)-m2(:,2:3);
% magnitude of both vectors (mindkét vektor hossza)
magv1 = sqrt(v1(:,1).^2 + v1(:,2).^2);
magv2 = sqrt(v2(:,1).^2 + v2(:,2).^2);
% scalar product of v1 and v2 (v1 és v2 skalárszorzata)
v1dotv2 = dot(v1,v2,2);
% computing the angle (szögek számítása)
alpharad = acos(v1dotv2./(magv1.*magv2));
% plot the results (Eredmény kiiratása)
offset = 119; % offset
Tsamp = 1/30; % sampling time - idő mintavétel
t = (0:length(alpharad)-1)'*Tsamp; % time vector
alpha=alpharad*180/pi-offset;
figure(1)
subplot(1,2,1)
plot(m1(:,3),-m1(:,2),'rx', m2(:,3),-m2(:,2),'gx', m3(:,3),-m3(:,2),'bx')
grid
xlabel('x koordinata [pixel]')
ylabel('y koordinata [pixel]')
subplot(1,2,2)
plot(t, alpha)
grid
xlabel('ido [s]' )
ylabel('térdszög [fok]')

Add a comment
Know the answer?
Add Answer to:
Matlab: Study the effects of damping by starting a pendulum (use l = 9.81 m and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT