玖叶教程网

前端编程开发入门

周一分享(一百零七):Matlab精读复刻论文之代码复刻14

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, I will introduce how to calculate the sum of of - in addition to the diagonal part from the three panels of mind map, intensive reading content, and knowledge supplement.

01

思维导图

02

精读内容

上周,我们计算-,并将得到的储存至上周生成的U中。

Last week, we calculated for - and stored the obtained into the U generated last week.

接下来按照的计算流程,计算每一个节点的sigmaj1j2除了对角线部分的和。由于U的元胞数组中包含19*19矩阵,且对角线全部为1,因此将矩阵中的值全部求和再减去对角线的值,也就是19,即可得到结果。

Next, follow the calculation process of and calculate the sum of sigmaj1j2 for each node except for the diagonal part. Since the tuple array of U contains a 19*19 matrix and the diagonals are all 1, the result is obtained by summing all the values in the matrix and subtracting the value of the diagonal, which is 19.

代码如下图所示:

The code is shown in the following figure:

结果如下图所示:

The result is shown in the following figure:

查看第一个数据可以看到与之前单独计算的的值相同。

Looking at the first data you can see the same value of as previously calculated separately.

03

知识补充

对整个矩阵按列求和:a=sum(A)。

对矩阵前1到t行按列求和:sum(A(1:t,:),1)。

对整个矩阵按行求和:b=sum(A,2)。

对矩阵前1到3列按行求和:d=sum(A(:,1:3),2) 。

整个矩阵整体求和:c=sum(A(:))。

Sum the entire matrix by column: a=sum(A).

Sum the first 1 to t rows of the matrix by column: sum(A(1:t,:),1).

Sum the entire matrix by row: b=sum(A,2).

Sum the first 1 to 3 columns of the matrix by row: d=sum(A(:,1:3),2).

Sum the entire matrix as a whole: c=sum(A(:)).

今天的分享就到这里了。

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

欢迎给我们留言,

让我们相约明天。

祝您今天过得开心快乐!

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!

参考资料:Deepl、百度、CSDN

参考文献:

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

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

文字|Zheng

排版|Zheng

审核|任务达人

发表评论:

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