玖叶教程网

前端编程开发入门

周一分享(九十二):Matlab精读复刻论文之代码复刻9

Matlab精读复刻论文

Matlab reads the reproduction paper

分享兴趣,传播快乐,

增长见闻,留下美好。

亲爱的您,

这里是LearingYard学苑!

今天小编为大家带来Matlab精读复刻论文。

欢迎您的用心访问!

本期推文阅读时长大约5分钟,请您耐心阅读。

Share interests, spread happiness,

increase knowledge, and leave beauty behind.

Dear you,

this is LearningYard Academy!

Today,the editor brings you Matlab intensive reading reproduction paper.

Welcome your visit!

The reading time of this tweet is about 5 minutes, please read it with patience.

本周小编将从思维导图、精读内容、知识补充三个板块介绍最后一组复杂网络划分以及加权网络凝聚度的代码。

This week, the editor will introduce the last set of complex network division and weighted network cohesion code from three sections: mind map, intensive reading content, and knowledge supplementation.

01

思维导图

02

精读内容

上周可得1、6、9、12、14、19为一组。5、7、11、13、17为一组。使用节点替代行元素得到D1、D6、 D9、D12、D14、D19为一组。D5、 D7、D11、 D13、D17为一组。D2、 D10、D15、D16为一组。D3、D4、D8、D18、 D20为一组。

Last week, we obtained D1, D6, D9, D12, D14, D19 as a group. D5, D7, D11, D13, D17are a group. D2, D10, D15, D16 as a group. D3, D4, D8, D18, D20are a group.

根据文章中的结果,D5、 D7、D11、 D13、D17还需要再次分组。

According to the results in the article, D5, D7, D11, D13, D17 need to be grouped again.

代码如下图所示:

The code is shown in the following figure:

结果如下图所示:

The result is shown in the following figure:

5、7、11、13、17中的第1、4、5个数是一组,2、3个数是一组。也就是5、11、13一组,7、11一组。使用节点替代行元素得到D5、D13、D17为一组, D7、D11为一组。

The 1st, 4th, and 5th numbers in 5, 7, 11, 13, and 17 are a group, and the numbers 2 and 3 are a group. That is, a group of 5, 11, 13, a group of 7, 11. Use nodes instead of row elements to get D5, D13, D17 as a group, D7, D11as a group.

接着求加权网络凝聚度。

Then find the weighted network cohesion.

m指决策者的人数,本文的决策者有20人。由前几周的结果可知,sigmaj1j2的值储存在U中,且对角线的值全部为1。所以使用sum求sigmaj1j2的和,再减去j1=j2的情况,即减去对角线的值。再求sigmaj1j2的倒数,用sum求和,再减去j1=j2的情况,即减去对角线的值。

m refers to the number of decision makers, and there are 20 decision makers in this article. As can be seen from the results of previous weeks, the value of sigmaj1j2 is stored in U, and the diagonal value is all 1. So use sum to find the sum of sigmaj1j2, and then subtract the case where j1=j2, that is, subtract the value of the diagonal. Then find the reciprocal of sigmaj1j2, sum with sum, and subtract the case where j1=j2, that is, subtract the value of the diagonal.

代码如下图所示:

The code is shown in the following figure:

结果如下图所示:

The result is shown in the following figure:

03

知识补充

Sum

S=sum(A)返回A沿大小不等于1的第一个数组维度的元素之和。如果A是向量,则sum(A)返回元素之和。如果A是矩阵,则sum(A)将返回包含每列总和的行向量。如果A是多维数组,则 sum(A) 沿大小不等于1的第一个数组维度计算,并将这些元素视为向量。此维度会变为1,而所有其他维度的大小保持不变。

S=sum(A) returns the sum of elements of A along the first array dimension whose size is not equal to 1. If A is a vector, sum(A) returns the sum of elements. If A is a matrix, sum(A) returns a vector of rows containing the sum of each column. If A is a multidimensional array, sum(A) is calculated along the first array dimension whose size is not equal to 1 and treats these elements as vectors. This dimension becomes 1, while all other dimensions remain the same size.

S=sum(A,'all')计算A的所有元素的总和。

S=sum(A,'all') calculates the sum of all elements of A.

S=sum(A,dim)沿维度dim返回总和。例如,如果 A 为矩阵,则 sum(A,2) 是包含每一行总和的列向量。

S=sum(A,dim) returns the sum along the dimension dim. For example, if A is a matrix, then sum(A,2) is a column vector containing the sum of each row.

S=sum(A,vecdim)根据向量vecdim中指定的维度对A的元素求和。例如,如果A是矩阵,则sum(A,[1 2]) 是A中所有元素的总和,因为矩阵的每个元素包含在由维度1和2定义的数组切片中。

S=sum(A,vecdim) summes the elements of A based on the dimension specified in the vector vecdim. For example, if A is a matrix, then sum(A,[1 2]) is the sum of all elements in A, because each element of the matrix is contained in an array slice defined by dimensions 1 and 2.

今天的分享就到这里了。

如果您对今天的文章有独特的想法,

欢迎给我们留言,

让我们相约明天。

祝您今天过得开心快乐!

That's it for today's sharing.

If you have a unique idea about today’s article,

welcome to leave us a message,

let us meet tomorrow.

I wish you a nice day today!

参考资料:Bing Microsoft Translator、百度、CSDN

参考文献:

[1]王伟明, 徐海燕, 朱建军. 复杂网络视角下的大规模群体DEMATEL决策方法 [J]. 系统工程理论与实践, 2021, 41(1): 200-212.

本文由LearningYard学苑原创,如有侵权请在后台留言!

文字|Zheng

排版|Zheng

审核|任务达人

发表评论:

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言