Question
im having trouble doing this problem with matlab code and we can not use ode45 in our code unfortunitely.

thank you!
T L =undeformed length k =stiffness om The mass m is suspended from an elastic cord with an extensional stiffness k and undef
0 0
Add a comment Improve this question Transcribed image text
Answer #1

IF YOU HAVE ANY DOUBT PLEASE FEEL FREE TO COMMENT

L = undeformed length K= stiffness Ť = 782+ g coso - Ķ (r-L) - (1) ö= -288 - grino - (2) 9- 9.80665 ms ke 40 NI. L=0.5m m=0.22. first order Above equations can be transformed into Diff equation by i= u = di = 0 = de dizu - (0) Tv - (T) Equation (1) c2. first order Above equations can be transformed into Diff equation by i= u = di = 0 = de dizu - (0) Tv - (T) Equation (1) c

funPendulum.m

function fVal= funPendulum(t,Y)

r=Y(1);

theta=Y(2);

u=Y(3);

v=Y(4);

%constants

K=40;

m=0.25;

g=9.80665;

L=0.5;

% define dy/dt

fVal(1,1)=u;

fVal(2,1)=v;

fVal(3,1)=r*(u^2)+g*cosd(theta)-(K/m)*(r-L);

fVal(4,1)=(-2*u*v-g*sind(theta))/r;

end

runPendulum.m

Y0=[0.5;60;0;0];

tSpan=[0 3.05675];

[time,Ysol]=ode23(@(t,Y) funPendulum(t,Y),tSpan,Y0);

r=Ysol(:,1);

theta=Ysol(:,2);

u=Ysol(:,3);

v=Ysol(:,4);

clf;

plot(time,Ysol);

xlabel('Time(s)');ylabel('r theta u v')

hold on;

plot(3.05675,0.543911,'*b')

[theta,time,r]

e - o to become Zero was found Time needed first for Time = 3.0568 sec. of Gode shows 3 In rundpendulum. m Goloumns. last lin

Add a comment
Know the answer?
Add Answer to:
im having trouble doing this problem with matlab code and we can not use ode45 in...
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
ADVERTISEMENT