How to plot Euler's method and ODE45 against eachother?

N0=5 %Euler method
r=10
tmax=10
dt=0.1
[T,N]=expgrowthEULER(N0,tmax,dt,r)
a=[T,N]
tspan=[0,10] %numerical integration
Y0=5
r=10
[T,Y]=ode45(@(T,Y) expgrowthODE(T,Y,r),tspan,Y0)
b=[T,Y]
Error using horzcat
Dimensions of arrays being concatenated are not consistent.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!