Can anybody help me to figure out a way to plot these ttwo g

Can anybody help me to figure out a way to plot these ttwo graphs on the same graph using MATlab?:

h = 1;
xspan = [0 10];
y0 = 0.5;
dydx = @(x,y) y - y^2;
EulerApprox(dydx, xspan, y0, h)
[x,y] = EulerApprox(dydx, xspan, y0, h);
plot(x, y)
y(size(y,1))

PLOTTED ON THE SAME GRAPH AS:

xspan = [0 10];
y0 = 0.5;
dydx = @(x,y) 5*y*(1-y);
EulerApprox(dydx, xspan, y0, h)
[x,y] = EulerApprox(dydx, xspan, y0, h);
plot(x, y)
y(size(y,1))

Solution

euler approximation of first order nonlinear differential equation with input using MATLAB as before to perform this new approximation all that is necessary is to change the calculation of k1 and the intial condition the exact solution is also changed for plotting

Can anybody help me to figure out a way to plot these ttwo graphs on the same graph using MATlab?: h = 1; xspan = [0 10]; y0 = 0.5; dydx = @(x,y) y - y^2; Euler

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site