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