• 大小: 23KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: 其他
  • 标签: 质心算法  

资源简介

代码很齐全,是我买的一本书附带的,在别的地没有的。

资源截图

代码片段和文件信息


function main

Length=100; 
Width=100;  
d=50;      
Node_number=6;
for i=1:Node_number 
    Node(i).x=Width*rand; 
    Node(i).y=Length*rand;
end

Target.x=Width*rand;
Target.y=Length*rand;

X=[]; 
for i=1:Node_number
    if DIST(Node(i)Target)<=d
        X=[X;Node(i).xNode(i).y];
    end
end
N=size(X1);  
Est_Target.x=sum(X(:1))/N;
Est_Target.y=sum(X(:2))/N; 
Error_Dist=DIST(Est_TargetTarget)

figure
hold on;box on;axis([0 100 0 100]); 
for i=1:Node_number
    h1=plot(Node(i).xNode(i).y‘ko‘‘MarkerFace‘‘g‘‘MarkerSize‘10);
    text(Node(i).x+2Node(i).y[‘Node ‘num2str(i)]);
end
h2=plot(Target.xTarget.y‘k^‘‘MarkerFace‘‘b‘‘MarkerSize‘10);
h3=plot(Est_Target.xEst_Target.y‘ks‘‘MarkerFace‘‘r‘‘MarkerSize‘10);
line([Target.xEst_Target.x][Target.yEst_Target.y]‘Color‘‘k‘);
circle(Target.xTarget.yd);
legend([h1h2h3]‘Observation Station‘‘Target Postion‘‘Estimate Postion‘);
xlabel([‘error=‘num2str(Error_Dist)‘m‘]);

function dist=DIST(AB)
dist=sqrt( (A.x-B.x)^2+(A.y-B.y)^2 );

function circle(x0y0r)
sita=0:pi/20:2*pi;
plot(x0+r*cos(sita)y0+r*sin(sita));

    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1154  2012-12-23 13:41  postion&tracking程序\chap2\2.1\main.m

     文件       1277  2012-12-23 13:43  postion&tracking程序\chap2\2.2\main.m

     文件       1557  2012-12-23 13:44  postion&tracking程序\chap2\2.3\main.m

     文件       1815  2012-12-23 13:46  postion&tracking程序\chap2\2.4\main.m

     文件       1076  2012-12-23 13:47  postion&tracking程序\chap2\2.5\main.m

     文件       1250  2012-12-23 13:50  postion&tracking程序\chap2\2.6\2.6.2\main.m

     文件       1382  2012-12-23 13:51  postion&tracking程序\chap2\2.6\2.6.3\main.m

     文件       1345  2012-12-23 13:52  postion&tracking程序\chap2\2.6\2.6.4\main.m

     文件       1258  2012-12-23 13:53  postion&tracking程序\chap2\2.6\2.6.5\main.m

     文件       1070  2012-12-23 13:55  postion&tracking程序\chap3\3.1\main.m

     文件       1044  2012-12-23 13:56  postion&tracking程序\chap3\3.2\3.2.1\main.m

     文件       1814  2012-12-23 13:58  postion&tracking程序\chap3\3.2\3.2.2\main.m

     文件       2599  2012-12-23 13:59  postion&tracking程序\chap3\3.3\main.m

     文件       4437  2012-12-23 14:00  postion&tracking程序\chap3\3.4\main.m

     文件        298  2012-12-23 13:01  postion&tracking程序\chap4\buffon_test.m

     文件        229  2012-12-23 13:02  postion&tracking程序\chap4\cion_throw_test1.m

     文件        234  2012-12-23 13:02  postion&tracking程序\chap4\cion_throw_test2.m

     文件        278  2012-12-23 13:03  postion&tracking程序\chap4\classic_gudian_test.m

     文件        494  2012-12-23 13:03  postion&tracking程序\chap4\fuza_gailv_moni.m

     文件        305  2012-12-23 13:05  postion&tracking程序\chap4\jifen_jisuan_test.m

     文件        206  2012-12-23 13:04  postion&tracking程序\chap4\jifen_jisuan_test2.m

     文件        275  2012-12-23 13:04  postion&tracking程序\chap4\jifen_jisuan_test3.m

     文件        277  2012-12-23 13:05  postion&tracking程序\chap4\jihe_gailv_moni.m

     文件        312  2012-12-23 14:02  postion&tracking程序\chap5\5.2\main.m

     文件        505  2009-12-19 10:55  postion&tracking程序\chap5\5.2\multinomialR.m

     文件        304  2009-12-19 10:55  postion&tracking程序\chap5\5.2\randomR.m

     文件        653  2009-12-19 10:54  postion&tracking程序\chap5\5.2\residualR.m

     文件        724  2011-11-01 22:23  postion&tracking程序\chap5\5.2\systematicR.m

     文件       2910  2012-12-23 14:04  postion&tracking程序\chap5\5.3\5.3.1\main.m

     文件       5995  2012-12-23 14:09  postion&tracking程序\chap5\5.3\5.3.2\main.m

............此处省略30个文件信息

评论

共有 条评论