Using Euler method, ODE45 and Simulink solve the following ODE's. a) y+c(dy/dt)=10sinwt c=2, w=10, y(0)=0 Assume time span...

80.2K

Verified Solution

Question

Programming

Using Euler method, ODE45 and Simulink solve the following ODE's.
a) y+c(dy/dt)=10sinwt
c=2, w=10, y(0)=0
Assume time span 0: 0.01: 10
b) dy/dt=t^2+yz
dz/dt=t+y^2z^2
y(0)=0.2
z(0)=-0.1
Assume time span 0: 0.1 :1
c)(d^2)y/dt^2+0.5(dy/dt)+siny=0
y(0)=1
dy/dt =0 when t=0
assume time span 0: 0.01 :10
Matlab code please

Answer & Explanation Solved by verified expert
4.1 Ratings (732 Votes)
PART a y c dydt 10 sin wt y0 0 dydt 10 sin wt y cclcclearclose allc 2 w 10 y0 0h 001 dtt 0 h 10 time vector spann lengtht 1 number of subintervalsf ty 10 sinwt y c dydt as a function Eulers methody1 y0 set initial conditionfor i 1 nyi1 yi h ftiyiend ode45 methody2 ode45fty0 plot resultsplotty rty2    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students