Code covered by the BSD License  

Highlights from
Chebpack

image thumbnail

Chebpack

by

 

15 Jul 2011 (Updated )

The MATLAB package Chebpack solves specific problems for differential or integral equations.

Ex6_delay_dde(p , alpha , beta, A, B, K )
function sol = Ex6_delay_dde(p , alpha , beta, A, B, K )
% use sol=Ex6_delay_dde(10,1/0.1625,12/0.1625,0.5,-1,50)
%     sol=Ex6_delay_dde(10,1/0.1625,12/0.1625,0.5, 1,50);
% the same code may be use for dde23
options=ddeset('RelTol',1.e-3,'AbsTol',1.e-6);
sol=ddesd(@ddeex6de,1,@ddeex6hist,[0,K],options);
%plot(sol.x,sol.y);xlabel('t');ylabel('y');grid;
function dydt=ddeex6de(~,y,Z)
    dydt=beta*Z / (1 + Z^p) - alpha*y;
end
function s=ddeex6hist(t)
    s=A+B*t;
end
end

Contact us