Question

Would appreciate some help with this, please post the code as well as some plots, thank you.FOUR- Matlab Assume the following equations of motion for a system: mLO cos 0 - m,L0 sin0+ kx = F, sin ot (mm m,L m2L cos0 +

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

clc
clear all
close all
format long
F0=1;
w=1;
k=1;
m1=1;
m2=1;
g=10;
L=1;
f=@(t,y) [y(2); -(g*m2^2*sin(y(1)) - k*m2*cos(y(1))*y(3) + g*m1*m2*sin(y(1)) - F0*m1*cos(y(1))*sin(t*w) + L*m2^2*cos(y(1))*sin(y(1))*y(2)^2)/(L*m2*(m1 + m2 - m2*cos(y(1))^2));y(4);(F0*sin(t*w) - k*y(3) - F0*cos(y(1))^2*sin(t*w) + L*m2*sin(y(1))*y(2)^2 + g*m2*cos(y(1))*sin(y(1)))/(m1 + m2 - m2*cos(y(1))^2)];
[T,Y]=ode45(f,[0,10],[1;1;1;1]);
plot(T,Y(:,1));
figure;
plot(T,Y(:,3));

A MATLAB R2018 HOME PLOTS APPS EDITOR PUBLISH VIEW B E N IFTY 50 SENSEX 12,021.30 40,757.42 81.20 287.72 0.6996 0.72% Figure

Add a comment
Know the answer?
Add Answer to:
Would appreciate some help with this, please post the code as well as some plots, thank...
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
  • Please answer the question and include matlab code and plots. Thank You Problem 1: The operation...

    Please answer the question and include matlab code and plots. Thank You Problem 1: The operation of signal dilation or decimation or down-sampling is defined by y(n) = x(nM) in which the sequence x(n) is down-sampled by an integer factor M. Explore Matlab’s downsample command to implement the above equation. Now generate x(n) = sin(0.125πn), for −50 ≤ n ≤ 50. Decimate x(n) by a factor of 4 to generate y(n). Plot both x(n) and y(n) using subplot and comment...

  • please do all ! thank you INSTRUCTIONS: Answer the subsequent set of questions to solve the...

    please do all ! thank you INSTRUCTIONS: Answer the subsequent set of questions to solve the "Goal of this problem. We recommend you write out your answer to compare to the particular questions as you go along, as if you were going to submit it fully SETUP: As shown in the figure, a painter climbs along a uniform ladder leaned up against a smooth wall. There is static friction between the feet of the ladder and the ground. The painter...

  • Can you please help me with this question. Much appreciated. So I have a sample code,...

    Can you please help me with this question. Much appreciated. So I have a sample code, but we need to change the code in a way that fits the problem. A planar slab of material is initially at a temperature of 300 K. At the time t=0, microwave radiation is directed at the material, leading to internal heat generation that is uniform within the material. The sides of the slab experience negligible heat losses and a water bath maintains the...

  • //Need help ASAP in c++ please. Appreciate it! Thank you!! //This is the current code I have. #include <iostream> #include <sstream> #include <iomanip> using namespace std; cl...

    //Need help ASAP in c++ please. Appreciate it! Thank you!! //This is the current code I have. #include <iostream> #include <sstream> #include <iomanip> using namespace std; class googlePlayApp { private: string name; double rating; int numInstalls; int numReviews; double price;    public: googlePlayApp(string, double, int, int, double); ~ googlePlayApp(); googlePlayApp();    string getName(); double getRating(); int getNumInstalls(); int getNumReviews(); string getPrice();    void setName(string); void setRating(double); void setNumInstalls(int); void setNumReviews(int); void setPrice(double); }; googlePlayApp::googlePlayApp(string n, double r, int ni, int nr, double pr)...

  • please answer all pre-lab questions 1 through 5. THANK YOU!!! this is the manual to give...

    please answer all pre-lab questions 1 through 5. THANK YOU!!! this is the manual to give you some background. the pre-lab questions.. the pre-lab sheet. Lab Manual Lab 10: String Waves & Resonance Before the lab, read the theory in Sections 1-3 and answer questions on Pre-lab Submit your Pre-lab at the beginning of the lab. During the lab, read Section 4 and follow the procedure to do the experiment. You will record data sets, perform analyses, answer questions, and...

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