Question
need help please with coding in mat lab and writing the system as two 1D equations
Problem 2: The equationdegsin0-0, a 20 non-linar model, represents a dt dt simple Pendulum. Assume all parameters to be posit
with different values of c? X Problem b: Write the system as two 1D equations and code this into your Matlab program.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

clc%clears the screen
clear all %clears the history
g=9.81;
L=[5:9];
c=linspace(0.4,0.9,length(L));
for i=1:length(L)
figure;
f=@(t,y) [y(2);-(c(i)*y(2) + g*sin(y(1)))/L(i)];
[T,Y]=ode45(f,[0,10],[1,1]);
plot(Y(:,1),Y(:,2));
title(['For L=' num2str(L(i)) ', C=' num2str(c(i))]);
xlabel('\theta(t)');
ylabel('\theta''(t)');
end

MAT LA Figure 2 ② ▼| rch Documentation Log In File Edit View Insert Tools Desktop Window Figure 1 File Edit View Insert Tools

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
need help please with coding in mat lab and writing the system as two 1D equations...
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