小言_互联网的博客

【数学模型】基于SEIRS传染病模型matlab源码

381人阅读  评论(0)

 目的 研究一类具有饱和接触率且潜伏期、染病期均传染的非线性SEIRS流行病传播数学模型动力学性质。方法 利用Lasalle不变集原理和Routh Hurwitz判据探讨系统的渐近性态。结果 得到了疾病绝灭与持续的阈值———基本再生数,证明了无病平衡点的全局渐近稳定性和地方病平衡点的局部渐近稳定性,揭示了潜伏期传染的影响。结论 潜伏期有传染的疾病,不但要注意控制染病期的病人,还要注意控制潜伏期的病人。只有这样,才能有效地控制疾病的蔓延。


  
  1. clear all; clc;
  2. close all;
  3. load('Infectious_data', 'T', 'X'); % load data generated by ODE45
  4. load('prediction'); % Data from NN
  5. X = X';
  6. % Generate training data
  7. train_size = 20; % size of trainning data
  8. x_idx = randperm(1000);
  9. T_train = T(x_idx(1:train_size));
  10. X_train = X(:,x_idx(1:train_size));
  11. Y_train = X(:,x_idx(1:train_size)+1);
  12. %% DMD Main
  13. % Dynamic mode decomposition: Classic
  14. Ad = Y_train * pinv(X_train);
  15. [U,S,~] = svd(X_train,'econ');
  16. eig_tru = sum(diag(S)>=0.01*max(diag(S))); % Truncate eigenvalues to reduce noise
  17. U = U(:,1:eig_tru);
  18. Ad_til = U'*Ad*U;
  19. [W,D] = eig(Ad_til);
  20. Omega = diag(log(diag(D)));
  21. Phi = U*W;
  22. c = W \ U' * X(:,1);
  23. X_DMD = zeros(size(X,1),length(T));
  24. for t = 0:length(T)-1
  25. X_DMD(: ,t+1) = Phi*expm(Omega*t)*c;
  26. end
  27. %% Koopman Main
  28. % Define feature according to Brusselator
  29. Psi = @(x) [x(1); x(2); x(3); x(4); x(5); x(6); x(7); x(1)*x(3); x(1)*x(4); x(1)*x(5)];
  30. Psi_X = [];
  31. Psi_Y = [];
  32. for i = 1:train_size
  33. Psi_X = [Psi_X,Psi(X_train(:,i))];
  34. Psi_Y = [Psi_Y,Psi(Y_train(:,i))];
  35. end

完整代码添加QQ1575304183

 

 


转载:https://blog.csdn.net/qq_34763204/article/details/109900852
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场