全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
5708 6
2014-05-21
已知有13个地区,它们的人均GDP为A=[26998;30840;34892;41099;45444;50467;58204;64491;66940;73856;81658;87475;19141;]

临界矩阵为
W=[0,1,0,0,1,0,1,0,1;1,0,0,1,1,0,0,1,0;0,0,0,0,0,0,1,0,0;0,1,0,0,0,1,0,0,0;1,1,0,0,0,0,1,1,0;0,0,0,1,0,0,0,0,0;1,0,1,0,1,0,0,1,1;0,1,0,0,1,0,1,0,0;1,0,0,0,0,0,1,0,0;1,0,0,1,0,1,0,0,0;0,0,0,0,0,0,0,0,0;0,0,1,0,0,0,0,0,0;0,0,1,0,0,0,1,1,0;]

然后我找到了Moran_I指数的函数
HELP morans_I
  PURPOSE: calculate global Moran's I for an input grid (matrix) by calculating all
           local Moran's I for a given moving windows size using a weight matrix.
  -------------------------------------------------------------------
  USAGE: M = moransI(grid, W, s);
  where: [grid] is the matrix to analyse
         [W] is the normalized weight matrix of the size the local Moran's
             I will be calculated for (uneven sized!)
         [s] is an optional flag to use zscores of input values for
         calculation. Set to 'true' if zscores of local grid should be
         calculated. Leave blank if not desired or input values are already
         standardized.
  -------------------------------------------------------------------------
  OUTPUTS:
         [M] matrix of all local Moran's I
  -------------------------------------------------------------------
  NOTES: Weight matrix needs to be 'moving window' style, not contiguity
         matrix: Moran's I is calculated and weighted for neighbours to center cell.
         Matrix needs to be normalized (weights sum to 1) and center cell weight
         will be set to 0 if not already. Uses localmoran.m
         -> Use nanmean(M(:)) to get the average global Moran's I.

  See Anselin (1995, 'LISA.', Geogr. Analysis 27(2),p.93f) for details on
  standardized variables in calculation of local Moran's I.

  EXAMPLE:  M = moransI(rand(20,20),ones(5,5),'true')

  Felix Hebeler, Geography Dept.,de University Zurich, March 2006.



请问使用M=Morans_I(A,W,'ture')计算吗?为什么算出来都是NaN?
求大神帮助

附件列表

moransI.zip

大小:2.53 KB

 马上下载

指数计算

本附件包括:

  • moransI.m
  • morans_I.m

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-5-28 13:02:15
哈哈,以前完全不知道什么是moran指数的情况下,帮人家算过,不过不记得了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-5-30 15:37:55
24578901 发表于 2014-5-28 13:02
哈哈,以前完全不知道什么是moran指数的情况下,帮人家算过,不过不记得了
用其他软件算出来了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-7-5 20:49:55
请问楼主计算moran i的程序包是从哪里得到的啊?谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-7-7 00:12:14
葫芦娃大王 发表于 2014-7-5 20:49
请问楼主计算moran i的程序包是从哪里得到的啊?谢谢
百度下的。。我也不记得了。。建议你用geoda或者arcgis做~matlab我也不会做~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-9-21 10:35:10
wanghan2010 发表于 2014-7-7 00:12
百度下的。。我也不记得了。。建议你用geoda或者arcgis做~matlab我也不会做~
用geoda做数据要转化为shape文件,怎么转化呢?谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群