matlab代码 无标度网络 生成图,标准无标度网络matlab

【实例简介】用matlab编程实现无标度度网络算法

【实例截图】

【核心代码】

% This is the BA_Scale Model by Fan Jin.

% At first there are only m nodes and no edge, then the m 1st node is

% connected with the above m nodes

% usage: Nodes = BA(N,m)

% the parameter:N----network size

% m----a new node with m new edges

% can randomly initialize the N and the m by yourself

% the diagonal elements of the matrix also equal to -degree

% Nodes----the final coupling matrix

% The following message(s) may not be displayed correctly for they contain Chinese charactors.

% list----生成的一个辅助向量,该向量中的元素为每条边端点的节点。for example, 假设网络中节点4的度为7,则在list向量中会存在7个4,而这7个4的位置不一定是连续在一起的。

% preferential attachment体现在随机的从list向量中选取元素,选中哪个元素,该元素表示的节点即被选中。由于list向量中每个节点的个数与它的度有关,因此,度越大的点被选中的概率越大。

function [Nodes,Cii]=BA(N,m)

% N&#

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值