clear all
clc
tspan=[0,40];
y0=[7 6 2 1 0.5 -0.3 -0.5 -3.5 -5 -7.2]';
lags=[0.268 0.134 0.188 0.3];
sol=dde23('System_timedelays',lags,y0,tspan);
%yy1=yy.^2; %将矩阵的每一个元素平方
%kase=sum(yy1,2);%对每行元素求和
L=[3 -1 0 0 0 0 0 0 -1 -1;
-1 3 -1 0 0 0 0 0 -1 0;
0 -1 3 -1 0 0 0 -1 0 0;
0 0 -1 3 -1 0 -1 0 0 0;
0 0 0 -1 3 -1 -1 0 0 0;
0 0 0 0 -1 2 -1 0 0 0;
0 0 0 -1 -1 -1 4 -1 0 0;
0 0 -1 0 0 0 -1 3 -1 0;
-1 -1 0 0 0 0 0 -1 4 -1;
-1 0 0 0 0 0 0 0 -1 2] %计算第二小特征值是注意要改变系统的状态方程
landa=eig(L);
landa2=real(landa(2));
%subplot(2,1,1);
figure(1);
plot(sol.x,sol.y(1,:));
hold on;
plot(sol.x,sol.y(2,:));
hold on;
plot(sol.x,sol.y(3,:));
hold on;
plot(sol.x,sol.y(4,:));
hold on;
plot(sol.x,sol.y(5,:));
hold on;
plot(sol.x,sol.y(6,:));
hold on;
plot(sol.x,sol.y(7,:));
hold on;
plot(sol.x,sol.y(8,:));
hold on;
plot(sol.x,sol.y(9,:));
hold on;
plot(sol.x,sol.y(10,:));
axis([0 50 -10 10]);
xlabel('Time(sec)');
ylabel('State');
grid;
title('Time-Delay=0.268');
% subplot(2,1,2);
% plot(tt,kase);
% axis([0 40 0 200]);
% xlabel('time(sec)');
% ylabel('disagreement');
% grid;
多智能体一致性 matlab 仿真.zip
3星 · 超过75%的资源 需积分: 46 199 浏览量
2019-08-13
21:15:24
上传
评论 26
收藏 117KB ZIP 举报
tao-top
- 粉丝: 10
- 资源: 15
最新资源
- 《认识计算机桌面》教案.doc
- 《软件工程》期末考试参考题及答案.doc
- 《软件工程》期末考试及答案.doc
- 《软件工程》经典考试例题复习试题-重点知识点(含答案)(良心出品必属精品).doc
- 《软件工程》经典考试例题复习题-重点知识点(含答案)(良心出品必属精品).docx
- 《软件工程》考试及答案A卷B卷.doc
- python-ldap-3.4.4-cp311-cp311-win-amd64.whl
- 【推荐】logistic分析(可编辑修改).ppt
- 基于opencv的dnn模块实现Yolo-Fastest的目标检测python源码+模型+说明(高分项目).zip
- 使用Python调用微信本地ocr服务.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈