MATLAB智能算法30个案例分析 源代码

上传者: xuyin1204 | 上传时间: 2019-12-21 22:06:46 | 文件大小: 1.45MB | 文件类型: zip
MATLAB智能算法的源代码%% 清空环境 clc;clear %% 障碍物数据 position = load('barrier.txt'); plot([0,200],[0,200],'.'); hold on B = load('barrier.txt'); xlabel('km','fontsize',12) ylabel('km','fontsize',12) title('二维规划空间','fontsize',12) %% 描述起点和终点 S = [20,180]; T = [160,90]; plot([S(1),T(1)],[S(2),T(2)],'.'); % 图形标注 text(S(1)+2,S(2),'S'); text(T(1)+2,T(2),'T'); %% 描绘障碍物图形 fill(position(1:4,1),position(1:4,2),[0,0,0]); fill(position(5:8,1),position(5:8,2),[0,0,0]); fill(position(9:12,1),position(9:12,2),[0,0,0]); fill(position(13:15,1),position(13:15,2),[0,0,0]); % 下载链路端点数据 L = load('lines.txt'); %% 描绘线及中点 v = zeros(size(L)); for i=1:20 plot([position(L(i,1),1),position(L(i,2),1)],[position(L(i,1),2)... ,position(L(i,2),2)],'color','black','LineStyle','--'); v(i,:) = (position(L(i,1),:)+position(L(i,2),:))/2; plot(v(i,1),v(i,2),'*'); text(v(i,1)+2,v(i,2),strcat('v',num2str(i))); end %% 描绘可行路径 sign = load('matrix.txt'); [n,m]=size(sign); for i=1:n if i == 1 for k=1:m-1 if sign(i,k) == 1 plot([S(1),v(k-1,1)],[S(2),v(k-1,2)],'color',... 'black','Linewidth',2,'LineStyle','-'); end end continue; end for j=2:i if i == m if sign(i,j) == 1 plot([T(1),v(j-1,1)],[T(2),v(j-1,2)],'color',... 'black','Linewidth',2,'LineStyle','-'); end else if sign(i,j) == 1 plot([v(i-1,1),v(j-1,1)],[v(i-1,2),v(j-1,2)],... 'color','black','Linewidth',2,'LineStyle','-'); end end end end path = DijkstraPlan(position,sign); j = path(22); plot([T(1),v(j-1,1)],[T(2),v(j-1,2)],'color','yellow','LineWidth',3,'LineStyle','-.'); i = path(22); j = path(i); count = 0; while true plot([v(i-1,1),v(j-1,1)],[v(i-1,2),v(j-1,2)],'color','yellow','LineWidth',3,'LineStyle','-.'); count = count + 1; i = j; j = path(i); if i == 1 ||

文件下载

资源详情

[{"title":"( 54 个子文件 1.45MB ) MATLAB智能算法30个案例分析 源代码","children":[{"title":"MATLAB智能算法30个案例分析 源代码","children":[{"title":"chapter16.rar <span style='color:#111;'> 18.15KB </span>","children":null,"spread":false},{"title":"chapter3.rar <span style='color:#111;'> 4.61KB </span>","children":null,"spread":false},{"title":"chapter10.rar <span style='color:#111;'> 2.52KB </span>","children":null,"spread":false},{"title":"chapter7.rar <span style='color:#111;'> 4.03KB </span>","children":null,"spread":false},{"title":"chapter1.rar <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false},{"title":"chapter4","children":[{"title":"test.m <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"Fitness.m <span style='color:#111;'> 125B </span>","children":null,"spread":false},{"title":"OutputPath.m <span style='color:#111;'> 158B </span>","children":null,"spread":false},{"title":"Sus.m <span style='color:#111;'> 455B </span>","children":null,"spread":false},{"title":"InitPop.m <span style='color:#111;'> 238B </span>","children":null,"spread":false},{"title":"Recombin.m <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false},{"title":"Mutate.m <span style='color:#111;'> 263B </span>","children":null,"spread":false},{"title":"Reins.m <span style='color:#111;'> 296B </span>","children":null,"spread":false},{"title":"dsxy2figxy.m <span style='color:#111;'> 960B </span>","children":null,"spread":false},{"title":"Reverse.m <span style='color:#111;'> 530B </span>","children":null,"spread":false},{"title":"DrawPath.m <span style='color:#111;'> 614B </span>","children":null,"spread":false},{"title":"CityPosition3.mat <span style='color:#111;'> 570B </span>","children":null,"spread":false},{"title":"GA_TSP.m <span style='color:#111;'> 1.96KB </span>","children":null,"spread":false},{"title":"CityPosition1.mat <span style='color:#111;'> 324B </span>","children":null,"spread":false},{"title":"Select.m <span style='color:#111;'> 233B </span>","children":null,"spread":false},{"title":"PathLength.m <span style='color:#111;'> 304B </span>","children":null,"spread":false},{"title":"Distanse.m <span style='color:#111;'> 271B </span>","children":null,"spread":false},{"title":"CityPosition2.mat <span style='color:#111;'> 447B </span>","children":null,"spread":false}],"spread":false},{"title":"chapter15.rar <span style='color:#111;'> 12.14KB </span>","children":null,"spread":false},{"title":"chapter26.rar <span style='color:#111;'> 2.89KB </span>","children":null,"spread":false},{"title":"chapter19.rar <span style='color:#111;'> 4.88KB </span>","children":null,"spread":false},{"title":"chapter9.rar <span style='color:#111;'> 705B </span>","children":null,"spread":false},{"title":"chapter20.rar <span style='color:#111;'> 11.29KB </span>","children":null,"spread":false},{"title":"chapter25.rar <span style='color:#111;'> 169.09KB </span>","children":null,"spread":false},{"title":"chapter23","children":[{"title":"main.m <span style='color:#111;'> 5.47KB </span>","children":null,"spread":false},{"title":"barrier.txt <span style='color:#111;'> 190B </span>","children":null,"spread":false},{"title":"matrix.txt <span style='color:#111;'> 989B </span>","children":null,"spread":false},{"title":"DijkstraPlan.m <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"DijstraPlan.m <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"lines.txt <span style='color:#111;'> 122B </span>","children":null,"spread":false}],"spread":true},{"title":"chapter27.rar <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"chapter17.rar <span style='color:#111;'> 31.90KB </span>","children":null,"spread":false},{"title":"chapter21.rar <span style='color:#111;'> 713B </span>","children":null,"spread":false},{"title":"chapter29.rar <span style='color:#111;'> 4.29KB </span>","children":null,"spread":false},{"title":"chapter2.rar <span style='color:#111;'> 26.05KB </span>","children":null,"spread":false},{"title":"chapter4.rar <span style='color:#111;'> 7.09KB </span>","children":null,"spread":false},{"title":"chapter5.rar <span style='color:#111;'> 92.15KB </span>","children":null,"spread":false},{"title":"chapter8.rar <span style='color:#111;'> 3.10KB </span>","children":null,"spread":false},{"title":"chapter30.rar <span style='color:#111;'> 172.09KB </span>","children":null,"spread":false},{"title":"chapter22.rar <span style='color:#111;'> 2.63KB </span>","children":null,"spread":false},{"title":"chapter28.rar <span style='color:#111;'> 8.37KB </span>","children":null,"spread":false},{"title":"chapter11.rar <span style='color:#111;'> 10.71KB </span>","children":null,"spread":false},{"title":"chapter6.rar <span style='color:#111;'> 628B </span>","children":null,"spread":false},{"title":"chapter12.rar <span style='color:#111;'> 28.00KB </span>","children":null,"spread":false},{"title":"chapter18.rar <span style='color:#111;'> 7.47KB </span>","children":null,"spread":false},{"title":"chapter13.rar <span style='color:#111;'> 717.65KB </span>","children":null,"spread":false},{"title":"chapter23.rar <span style='color:#111;'> 3.08KB </span>","children":null,"spread":false},{"title":"chapter14.rar <span style='color:#111;'> 141.36KB </span>","children":null,"spread":false},{"title":"chapter24.rar <span style='color:#111;'> 5.55KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • minglez :
    这个与教材一致,方便
    2020-09-13
  • wsbdxm11 :
    真的是个好东西
    2018-10-18
  • hellolidandan :
    非常好,感谢楼主分享
    2018-05-23
  • zhangzhutou3 :
    好评 程序可以用只不过不同版本需要进行一些修改
    2017-02-15
  • 专属超超 :
    不错,很好。谢谢
    2016-11-14

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明