Delay differential equation,how to solve WITHOUT using any solver(dde23)????
2 views (last 30 days)
Show older comments
I have to write a matlab code for a delay equation.I have already the main body but i can't make it work.Maybe there is someone who can find what i am doing wrong?Or maybe have another example?
h=.25;
r=5;
T=15;
D=0:h:r;
N1=length(D);
t=0:h:T;
N=lenght(t);
y(1:N1)=t(1:N1)*(t(1:N1)-r);
for i=N1:N
y(i+1)=y(i)+h*y(i-N1);
end
figure(12)
plot(t,y)
figure(2)
plot(t(N1:N),y(N1,N))
0 Comments
Answers (0)
See Also
Categories
Find more on Interpolation 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!