周一分享(一百一十三):Matlab精读复刻论文之代码复刻16
分享兴趣,传播快乐,
增长见闻,留下美好。
亲爱的您,
这里是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 the inverse of in addition to the diagonal in three sections: mind map, intensive reading content, and knowledge supplement.
01思维导图
02精读内容
上周我们计算出了的倒数,本周进行下一步操作,计算-除了对角线的倒数的和,并储存到D中。由于对角线都是1,其倒数也是1,因此求除了对角线的倒数的和,可以先求元胞数组B中每一个矩阵的和,再减去19,因为矩阵为19*19,所以对角线的和为19。
Last week we calculated the inverse of , and this week we perform the next operation, calculating the sum of the inverse of for - except for the diagonal and storing it in D. Since the diagonals are all 1 and their reciprocals are also 1, to find the sum of the reciprocals of except for the diagonals, you can first find the sum of each matrix in the tuple array B and subtract 19, since the matrix is 19*19, the sum of the diagonals is 19.
代码如下图所示:
The code is shown in the following figure.
结果如下图所示:
The results are shown in the following figure.
与之前单独计算的的除了对角线的倒数的和d1相比,可以发现结果相同。
Compared with the previous separate calculation of 's except for the diagonal inverse of and d1, the same result can be found.
03知识补充
A(:)——按线性索引返回矩阵A的所有元素(向量)。
celldisp(a)——显示元胞数组a中各元胞的内容。
如果A是元胞数组,则tf=iscell(A)返回1 (true)。否则,将返回0(false)。
A(:) - returns all elements (vectors) of matrix A by linear index.
celldisp(a) - displays the contents of each element of the tuple array A.
If A is a tuple array, then tf=iscell(A) returns 1 (true). Otherwise, 0 (false) is returned.
今天的分享就到这里了。
如果您对今天的文章有独特的想法,
欢迎给我们留言,
让我们相约明天。
祝您今天过得开心快乐!
That's all for today's sharing.
If you have a unique idea for today’s article,
please leave us a message,
and let us meet tomorrow.
I wish you a nice day !
参考资料:Deepl、CSDN、百度
参考文献:
[1]王伟明, 徐海燕, 朱建军. 复杂网络视角下的大规模群体DEMATEL决策方法 [J]. 系统工程理论与实践, 2021, 41(1): 200-212.
本文由LearningYard学苑原创,如有侵权请在后台留言!
文字|Zheng
排版|Zheng
审核|任务达人