Question: Please include code as well as answers. Matlab using ode45 3. (4 points) Let's do a double pendulum. The equations of motion for t, and

Please include code as well as answers. Matlab using ode45  Please include code as well as answers. Matlab using ode45 3.
(4 points) Let's do a double pendulum. The equations of motion for

3. (4 points) Let's do a double pendulum. The equations of motion for t, and 2, the angles of the two pendulum arms, come from Newton's second law, so they are 2nd order differential equations. We can turn this system of two 2nd order equations into a system of four 1st order differential equations. This system is in the file pendulum.m on Canvas. This problem illustrates the use of ode45 in situations where the system of differential equations is too big or too messy to use an anonymous function. Solve this system on 0 st 15 with initial conditions [1.5 3 0 0]. After solving the system, use the code below (Just some trigonometry) to turn your@-solutions into the x and y positions of the end of each pendulum arm: LI 1; L2 = 2; %position of first arm x1 = L1 * sin (y(:,1)); yl--L1 cos (Y ,1)) %position of 2nd arm x2Ll sin(Y,1)) +12 sin (Y (,2)) y2 L1 cos (Y (, 1))-L2 cos (Y (:,2)) Plot the (z, y) position of the end of the second pendulum arm. Repeat this for 0 sts 100, and turn in that plot as well

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!