Question

23.8 The following nonlinear, parasitic ODE was suggested by Hornbeck (1975): d y di 5 ) If the initial condition is y(0) -0.

I want Matlab code.

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

% lets use clc to clear command window
% clear all to delete previous data
% close all to close all privious figures
clc;
clear all;
close all;

tspan = [0 5];
y0 = 0.08;

%% with ODE45

[t1,y1] = ode45(@(t,y) 5*(y-(t*t)), tspan, y0);
plot(t1,y1)
title('ODE45')
%% with ODE23s

[t2,y2] = ode23s(@(t,y) 5*(y-(t*t)), tspan, y0);
figure
plot(t2,y2)
title('ODE23s')
%% with ODE23tb

[t3,y3] = ode23tb(@(t,y) 5*(y-(t*t)), tspan, y0);
figure
plot(t3,y3)
title('ODE23tb')

x 10 3 ODE45 2.5 2 1.5 0.5 0 0 0.5 1.5 22.5 3 3.5 4 4.5 5x107 3 ODE23s 2.5 2 1.5 0.5 0 0 0.5 1.5 22.5 3 3.5 4 4.5 5ODE23tb 20 15 10 -5 -10 -15 0 0.5 1.52 2.5 3 3.5 4 4.55

Add a comment
Know the answer?
Add Answer to:
I want Matlab code. 23.8 The following nonlinear, parasitic ODE was suggested by Hornbeck (1975): d y di 5 ) If the...
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
  • I want Matlab code. 22.2 Solve the following problem over the interval from x = 0 to 1 using a step size of 0.25 whe...

    I want Matlab code. 22.2 Solve the following problem over the interval from x = 0 to 1 using a step size of 0.25 where y(0)-1. Display all your results on the same graph. r dV = (1 + 4x) (a) Analytically. (b) Using Euler's method. (c) Using Heun's method without iteration. (d) Using Ralston's method. (e) Using the fourth-order RK method. 22.2 Solve the following problem over the interval from x = 0 to 1 using a step size...

  • MATLAB help please!!!!! 1. Use the forward Euler method Vi+,-Vi + (ti+1-tinti , yi) for i=0.1, 2, , taking yo-y(to) to be the initial condition, to approximate the solution at 2 of the IVP y'=y-t...

    MATLAB help please!!!!! 1. Use the forward Euler method Vi+,-Vi + (ti+1-tinti , yi) for i=0.1, 2, , taking yo-y(to) to be the initial condition, to approximate the solution at 2 of the IVP y'=y-t2 + 1, 0 2, y(0) = 0.5. t Use N 2k, k2,...,20 equispaced timesteps so to 0 and t-1 2) Make a convergence plot computing the error by comparing with the exact solution, y: t (t+1)2 exp(t)/2, and plotting the error as a function of...

  • The Program for the code should be matlab 5. [25 pointsl Given the initial value problem...

    The Program for the code should be matlab 5. [25 pointsl Given the initial value problem with the initial conditions y(0) 2 and y'(0)10, (a) Solve analytically to obtain the exact solution y(x) (b) Solve numerically using the forward Euler, backward Euler, and fourth-order Runge Kutta methods. Please implement all three methods yourselves do not use any built- in integrators (i.e., ode45)). Integrate over 0 3 r < 4, and compare the methods with the exact solution. (For example, using...

  • Solve using MATLAB code 22.2 Solve the following problem over the interval from 0 to 1...

    Solve using MATLAB code 22.2 Solve the following problem over the interval from 0 to 1 using a step size of 0.25 where y(0) 1. Display all your results on the same graph. dy dx (a) Analytically (b) Using Euler's method. (c) Using Heun's method without iteration. (d) Using Ralston's method. (e) Using the fourth-order RK method. Note that using the midpoint method instead of Ralston's method in d). You can use my codes as reference.

  • show all step please ((NOT in MATLAB)) except part d Ralston's method 22.2 Solve the following...

    show all step please ((NOT in MATLAB)) except part d Ralston's method 22.2 Solve the following problem over the interval from x = 0 to 1 using a step size of 0.25 where y(0) = 1. Display all your results on the same graph. Bolo dy bolo moto = (1 + 2x)VÝ Viena no woliszt unigas og tog (a) Analytically. sanoi solist og (b) Using Euler's method. (c) Using Heun's method without iteration. (d) Using Ralston's method. (e) Using the...

  • write MATLAB scripts to solve differential equations. Computing 1: ELE1053 Project 3E:Solving Differential Equations Project Principle...

    write MATLAB scripts to solve differential equations. Computing 1: ELE1053 Project 3E:Solving Differential Equations Project Principle Objective: Write MATLAB scripts to solve differential equations. Implementation: MatLab is an ideal environment for solving differential equations. Differential equations are a vital tool used by engineers to model, study and make predictions about the behavior of complex systems. It not only allows you to solve complex equations and systems of equations it also allows you to easily present the solutions in graphical form....

  • I want the math lab code for theses problems in a unique way

    I want the math lab code for theses problems in a unique way Theory A projectile is launched from point A up an incline plane that makes an angle of 10 with the horizontal. The mountain is 6,000 m high. Vo 10° Figure 1: Flightpath of a projectile. If we neglect the air resistance, the flight path of a projectile launched at an initial speed vo and an angle θ of departure relative to the horizontal is a parabola (see...

  • I DESPERATELY NEED HELP WITH THIS DIFFERENTIAL EQUATIONS MATLAB ASSIGNMENT IM SUPPOSED TO BE LEARNING BUT...

    I DESPERATELY NEED HELP WITH THIS DIFFERENTIAL EQUATIONS MATLAB ASSIGNMENT IM SUPPOSED TO BE LEARNING BUT WE HAVE A SUB AND HE DIDN'T TEACH IT! ITS EULER AND IMPROVED EULER IN MATLAB! HERE IS THE LINK FOR THE IMAGE FILE THAT SHOWS THE FULL INSTRUCTIONS FOR THE CODE. https://imgur.com/a/gjmypLs Also, here is my code so far that I borrowed form an old assignment but the data is all wrong and the application of the code is slightly different so either...

  • I need help with question 30d 16. y = 0 (that is, y(x) = 0 for...

    I need help with question 30d 16. y = 0 (that is, y(x) = 0 for all x, also written y(x) = 0) is a solution of (2) (not of (1) if (x) • o , called the trivial solution 17. The sum of a solution of (1) and a solution of (2) is a solution of (1). 18. The difference of two solutions of (1) is a solution of (2). 19. If yı is a solution of (1), what...

  • help me with this. Im done with task 1 and on the way to do task...

    help me with this. Im done with task 1 and on the way to do task 2. but I don't know how to do it. I attach 2 file function of rksys and ode45 ( the first is rksys and second is ode 45) . thank for your help Consider the spring-mass damper that can be used to model many dynamic systems -- ----- ------- m Applying Newton's Second Law to a free-body diagram of the mass m yields the...

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