Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need some help in matlab to solve this differential equation. I have a code but I need to fix it. I have wrote this

I need some help in matlab to solve this differential equation. I have a code but I need to fix it.

image text in transcribed

I have wrote this code, But I can't get the problem image text in transcribed

Using Euler integration solve the following: 1. 2. Create a spreadsheet to integrate x = Cos(k t) where initial X = x, Use the following: a. At = 0.005, x, = 1, k = 2 1, determine the value of x when t = 2.5 b. At = 0.005, x, = 2, k = 41, determine the value of x when t = 2.5 t = 0.01, x, = 3, k = n, determine the value of x when t = 2.5 For the values in 2a, plot x on vertical and time on horizontal. a. Change the At from 0.005 up to 1. Observe what happens to the graph. c. 3. 1 . 2 i Aw 11 6 deltaT = .5; initialxyz = [1 2 3]; %freg = 3 * pi(); endTime = 5; initialTime = 0; %timeRange [initialTime endTime]; % timeRange = 0:deltat:endTime; stuffForTheDot = [1]; https://www.mathworks.com/help/matlab/math/choose-an-ode-solver.html (theTime, theX] = ode 45 (@(tt, yy) getTheDot (tt,yy, stuffForTheDot), ... timeRange, initialxyz, ... %deltat, stuffForTheDot); plot (theTime, theX); ylim ( [0 2.5]); 8 - 9 10 - 11 12 13 14 - 15 16 17 18 19 III III. function theDotIs = getTheDot (time, x, stuff) thex = x(1); they = x(2); theZ = x(3); xdot = -theX + TheY - cosd (3*time); they = xdot -ydot; zdot = -TheZ + theY; 20 - 21 22 23 24 the DotIs = [xdot; ydot; zdot]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

Explain the Neolithic age compared to the paleolithic age ?

Answered: 1 week ago

Question

What is loss of bone density and strength as ?

Answered: 1 week ago

Question

Define and measure service productivity.

Answered: 1 week ago