Question
Q3p please with mathlab.
1) The growth of populations of organisms has many engineering and scientific applications. One of the simplest models assume
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;clear all
%%Midpoint-Euler method
dydx=@(x,y) (1+4.*x).*sqrt(y); %%Given ODE
a=0;b=1;h=0.1;
[xa ya]=MidEuler(dydx,a,b,h,1) %%Function call


function [x y]=MidEuler(ODE,a,b,h,yini) %%Function for Mid-Point Euler method
x(1)=a;y(1)=yini; %%Initial conditions
n=(b-a)/h; %%Intervals
for(i=1:n) %%Midpoint Euler method
xm=x(i)+0.5*h;
ym=y(i)+ODE(x(i),y(i))*0.5*h;
x(i+1)=x(i)+h;
y(i+1)=y(i)+ODE(xm,ym)*h;
end
end

1 2 3 - clc;clear all Midpoint-Euler method dydx=@ (x, y) (1+4.*x).*sqrt(y); Given ODE a=0; b=1;h=0.1; [xa ya] =MidEuler (dyd

Add a comment
Know the answer?
Add Answer to:
Q3p please with mathlab. 1) The growth of populations of organisms has many engineering and scientific...
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
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