How to plot Euler's method and ODE45 against eachother?
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!