How to solve the Logistic Delay differential equation with out using dde23, ddesd, ddensd, deval functions? Need to use for loop or if condition.... Please help

1 次查看(过去 30 天)
%% Dx(t) = r*x(t)*(1-x(t-tau))
%% r=0.5
%% x(0)=0.85
%% If tau=0
%% Dx(t) = r*x(t)*(1-x(t))
%% r=0.5
%% x(0)=0.85
%% We use Nonstandard finite difference scheme and obtain the code given below.
close all
clear all
clc
N=100;
h=0.2;
r=0.5;
x(1)=0.85;
for n=2:h: N
x(n)=(1+h*r)*x(n-1)/(1+h*x(n-1))
end
plot (x)
Please write the code using tau function (Means delay factor)
Please donot use built in functions....
  1 个评论
Steven Lord
Steven Lord 2019-1-10
The fact that you're asking not to use the built-in functions suggests to me that this is a homework assignment. If that's the case show us the full text of the assignment and what you've tried to do to solve the assignment and ask a specific question about where you're having difficulty and you may receive some guidance.
If this is not a homework assignment, why aren't you allowed to use the delay differential equation solvers included in MATLAB? Doing so probably would be easier and more robust than building your own.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by