function maichon_shizhi1()

clear;clc

PeriodT=10;q=0.5;
%NumOfStep 是每半个周期取多少点画图,NumOfPer 是画多少个周期的相图
NumOfStep=50;NumOfPer=10;

%以下是初值和初始时刻
Inx1=1;Inx2=1;Inx3=1;Inxt=0;

for j=1:20

x1=zeros((NumOfStep+1)*NumOfPer,1);
x2=zeros((NumOfStep+1)*NumOfPer,1);
x3=zeros((NumOfStep+1)*NumOfPer,1);
t=zeros((NumOfStep+1)*NumOfPer,1);

temp1=0;temp2=0;temp3=0;
%延迟时间值
lags=[0.5];
%下面是控制误差的参数,越小则运行速度越慢
ppp=odeset('RelTol',1e-8,'AbsTol',1e-8);
for i=1:NumOfPer  %循环一次画一个周期的轨线
    
    if i==1
       x111= Inx1;
       x211= Inx2;
       x311= Inx3;       
    else
  %以下三个语句确定脉冲后的值         
       x111=temp1+2.1;
       x211=temp2+0.5;
       x311=temp3;
       
       Inx1=x111;
       Inx2=x211;
       Inx3=x311;
    end
    sol1 = dde23(@myddefun,lags,[Inx1,Inx2,Inx3],[(i-1)*PeriodT+Inxt,(i-0.5)*PeriodT+Inxt]);
%     
%     sol1.x;
%     sol1.y(1,:);
%     sol1.y(2,:);
%     sol1.y(3,:);   
 
    temp1=sol1.y(1,end);
    temp2=sol1.y(2,end);
    temp3=sol1.y(3,end);

%以下三个语句确定脉冲后的值    
        Inx1 = 0.5 * temp1;
        Inx2 = temp2 + 5*temp1;
        Inx3 = temp3;
    
       x1((i-1)*(NumOfStep+1)+1)=Inx1;
       x2((i-1)*(NumOfStep+1)+1)=Inx2;
       x3((i-1)*(NumOfStep+1)+1)=Inx3;
       
    t((i-1)*(NumOfStep+1)+1)=(i-0.5)*PeriodT+Inxt;
    sol=ode45(@OdePP,[(i-0.5)*PeriodT+Inxt,i*PeriodT+Inxt],[Inx1,Inx2,Inx3],ppp);
    j=linspace(PeriodT*(i-0.5+1/NumOfStep)+Inxt,i*PeriodT+Inxt,NumOfStep);

x1(((i-1)*(NumOfStep+1)+2):(i*(NumOfStep+1)))=deval(sol,j,1);
    x2(((i-1)*(NumOfStep+1)+2):(i*(NumOfStep+1)))=deval(sol,j,2);
    x3(((i-1)*(NumOfStep+1)+2):(i*(NumOfStep+1)))=deval(sol,j,3);
    t(((i-1)*(NumOfStep+1)+2):(i*(NumOfStep+1)))=j;
    
    t1=t(((i-1)*(NumOfStep+1)+1):(i*(NumOfStep+1)));
    x11=x1(((i-1)*(NumOfStep+1)+1):(i*(NumOfStep+1)));
    x21=x2(((i-1)*(NumOfStep+1)+1):(i*(NumOfStep+1)));
    x31=x3(((i-1)*(NumOfStep+1)+1):(i*(NumOfStep+1)));
    
    temp1=x11(end,1);
    temp2=x21(end,1);
    temp3=x31(end,1);
    
    t1_zhuanzhi= (t1).';
    x11_zhuanzhi=(x11).';
    x21_zhuanzhi=(x21).';
    x31_zhuanzhi=(x31).';

%     figure(1)      
%
%     plot(sol1.x,sol1.y(1,:),(t1).',x11_zhuanzhi);     
%     ylabel('S1(t)');
%     hold on
%     axis([(i-1)*PeriodT,i*PeriodT,0,2]);
%
%     figure(2)    
%     plot(sol1.x,sol1.y(2,:),(t1).',x21_zhuanzhi);
%     ylabel('S2(t)');
%     hold on

%     figure(3)    
%     plot(sol1.x,sol1.y(3,:),(t1).',x31_zhuanzhi);
%     ylabel('x(t)');
%     hold on

figure(4)
    plot3(horzcat(sol1.x,t1_zhuanzhi),horzcat(sol1.y(1,:),x11_zhuanzhi),horzcat(sol1.x,t1_zhuanzhi),horzcat(sol1.y(3,:),x31_zhuanzhi),horzcat(sol1.x,t1_zhuanzhi),horzcat(sol1.y(2,:),x21_zhuanzhi));
    xlabel('S1(t)');
    ylabel('x(t)');
    zlabel('S2(t)');
    hold on
    
%     figure(5)
%     plot3(horzcat(sol1.y(1,:),x11_zhuanzhi),horzcat(sol1.y(3,:),x31_zhuanzhi),horzcat(sol1.y(2,:),x21_zhuanzhi));
% %     xlabel('S1(t)');
% %     ylabel('x(t)');
% %     zlabel('S2(t)');
%     hold on

end

Inx1=Inx1+0.5;
Inx2=Inx2+0.3;
Inx3=Inx3+0.2;

end
function dx= myddefun(t,x,Z)
dx=[
    2.5-x(1);
    -x(2)-(x(2)*x(3))/(0.5*(1+x(2)));
    -x(3)+exp(-0.5)*Z(2,1)*Z(3,1)/(1+Z(2,1))];

function dxdt=OdePP(t,x)
%以下参数是系统参数

dxdt=[ 2.5-x(1)
       -x(2)
       -0.5*x(3) ];

脉冲时滞微分方程matlab方程相关推荐

  1. 一阶时滞微分方程三种求解方法的MATLAB实现及稳定性分析

    前言: 大学期间只学习过<常微分方程>,没想到有些学校竟然还学<时滞微分方程>,于是找到一本由内藤敏机(日本)等著,马万彪等译的<时滞微分方程--泛函数微分方程引论> ...

  2. Matlab求解中性类型的时滞微分方程组-中性类型的时滞微分方程

    (1)中性类型的时滞微分方程: 满足上面形式的微分方程,也就是说微分方程的右边还要包含"时滞部分的导数". (2)使用ddensd函数求解:函数形式 函数说明:ddefun是微分方 ...

  3. matlab用dde23求解带有固定时滞的时滞微分方程

    dde23函数调用方法 sol = dde23(ddefun,lags,history,tspan,options) dde23 跟踪不连续性并使用显式 Runge-Kutta (2,3) 对和插值对 ...

  4. MATLAB 数学应用 微分方程 时滞微分方程 具有常时滞的DDE

    本文讲述了如何使用 dde23 对具有常时滞的DDE(时滞微分方程)方程组求解. 方程组为: y 1 ′ ( t ) = y 1 ( t − 1 ) y'_1(t)=y_1(t−1) y1′​(t)= ...

  5. MATLAB 数学应用 微分方程 时滞微分方程 中立型DDE

    本文讲述了如何使用 ddensd 求解中立型DDE(时滞微分方程),其中时滞出现在导数项中. 方程是: y ′ ( t ) = 1 + y ( t ) − 2 y ( t 2 ) 2 − y ′ ( ...

  6. MATLAB 数学应用 微分方程 时滞微分方程 具有不连续性的心血管模型DDE

    本文讲述了如何使用 dde23 对具有不连续导数的心血管模型求解. 方程组为: P ˙ a ( t ) = − 1 c a R P a ( t ) + 1 c a R P v ( t ) + 1 c ...

  7. matlab求解时滞微分方程

    matlab求解时滞微分方程,dde23调用格式: sol = dde23(ddefun,lags,history,tspan); –ddefun函数句柄,求解微分方程y'=f(t,y(t),y(t- ...

  8. MATLAB 数学应用 微分方程 时滞微分方程 中立型的初始值DDE

    本文讲述了如何使用 ddensd 求解具有时间相关时滞的初始值 DDE(时滞微分方程)方程组. 方程是: y ′ ( t ) = 2 c o s ( 2 t ) y ( t 2 ) 2 c o s ( ...

  9. MATLAB 数学应用 微分方程 时滞微分方程 解算时滞微分方程

    时滞微分方程 (DDE) 是当前时间的解与过去时间的解相关的常微分方程.该时滞可以固定不变.与时间相关.与状态相关或与导数相关.要开始积分,通常必须提供历史解,以便求解器可以获取初始积分点之前的时间的 ...

最新文章

  1. Android 控件学习--自定义SeekBar
  2. 源码解读腾讯 GT 的性能测试方案
  3. 作为程序猿,一定要知道的电脑快捷键和Eclipse快捷键
  4. 关于数据仓库 — 总体工具介绍
  5. css3 选择器_10-CSS3选择器详解
  6. 60-179-024-使用-TypeInfo-Flink类型系统TypeIinformation
  7. JqueryUI-1
  8. celery cluser redis_celery结合redis 使用
  9. 通过真实项目截图讲解MDT 2010部署windows 7的具体过程(3)
  10. 电商购物网站 - 需求与设计
  11. 恭喜流氓360vb100再次爆零
  12. 把计算机网络关闭啦怎么打开,网络发现已关闭怎么办?Win7系统启用/关闭网络发现方法(图文)...
  13. MATLAB -plotyy函数
  14. 第1章Activity的生命周期和启动模式
  15. 大专计算机知识,大专计算机应用基础试题及答案
  16. Frida—HOOK 学习笔记2
  17. 社群发现算法--强连通和连通在关联图谱中的应用
  18. cython编译python_Cython编译python为so 代码加密示例
  19. 笔记-项目干系人管理-识别干系人
  20. maven中archetype(原型)的使用及创建

热门文章

  1. LABVIEW_课堂笔记 随机(十二)变量
  2. Linux系统Shell脚本第五章:shell数组、正则表达式及文件三剑客之AWK
  3. 【JAVA】MyEclipse使用 - 相关技术和快捷键(转自:CSDN - lgx06)
  4. 爱剪辑怎么制作淘宝视频?详细的制作技巧,教你快速搞定淘宝主图视频
  5. OnMeasure()
  6. 数据结构之树从入门到如土(一)----大话二叉树 及GO实现
  7. 中国计算机科技前沿网,专委动态科技前沿-中国计算机学会专委.PDF
  8. Qt超强绘图QCustomplot 动态图静态图时间坐标轴
  9. 电气专业出来如何月入过万?
  10. Mac系统如何开启任何来源