代码拉取完成,页面将自动刷新
同步操作将从 连享会/nwcommands 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
{smcl}
{* *! version 1.0.1 24aug2014 author: Thomas Grund}{...}
{marker topic}
{helpb nw_topical##utilities:[NW-2.7] Utilities}
{title:Title}
{p2colset 9 18 22 2}{...}
{p2col :nwtomata {hline 2} Return adjacency matrix of network}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmdab: nwtomata}
[{it:{help netname}}]
{cmd:, }
{opt mat(matamatrix)}
{p_end}
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt mat(matamatrix)}}name of the new Mata matrix{p_end}
{synoptline}
{p2colreset}{...}
{title:Description}
{pstd}
This creates a Mata matrix with name {it:matatamatrix} holding a copy of the adjacency matrix of a network.
{pstd}
You do not need to know Mata to use any of the nwcommands, but sometimes you might want to obtain the
adjacency matrix, for example, when programming your own network commands.
{pstd}
When you make alterations to a Mata matrix derived from {bf:nwtomata} you do not change the
underlying network. It simply gives you a copy of the underlying matrix used to store the
network. To make changes to this network use {help nwreplace} or {help nwreplacemat}.
{pstd}
The adjacency matrix of a network can also be displayed with:
{cmd:. nwsummarize, mat}
{pstd}
Advanced programmers who might want to directly interact with the adjacency matrix of a network
and not with a copy of it, see {help nwinternal:advanced network programming}.
{title:Example}
{cmd:. nwrandom 5, density(.2) name(net)}
{cmd:. nwtomata net, mat(mymat)}
{cmd:. mata: mymat}
{res}{txt} 1 2 3 4 5
{c TLC}{hline 21}{c TRC}
1 {c |} {res}0 0 0 0 0{txt} {c |}
2 {c |} {res}0 0 1 0 0{txt} {c |}
3 {c |} {res}0 0 0 1 0{txt} {c |}
4 {c |} {res}0 1 0 0 0{txt} {c |}
5 {c |} {res}1 0 0 0 0{txt} {c |}
{c BLC}{hline 21}{c BRC}
{title:See also}
{help nwtomatafast}, {help nwload}, {help nwsummarize}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。