how to generate path matrix?

2 次查看(过去 30 天)
ankanna
ankanna 2021-4-22
n=3;ri=0.9;lamda=0.7;
config = dec2bin(0:2.^L-1)-'0';
12 13 23
0 0 0
0 0 1 .r2
0 1 0
0 1 1 r1. .r3
1 0 0
1 0 1
1 1 0
1 1 1
consider 3 nodes (i.e., 1,2,3),this is fixed network. 1 is source node,3 is destination node and 2 is intermediate node. the shortest path is 1 to 3, because fixed network 1 is source and 3 is destination.
but i need this
12 13 23 path
0 0 0 0.00
0 0 1 0.00 % there is no connection with source node (that means 1 to 3 there is no path)
0 1 0 r1r3
0 1 1 r1r3
1 0 0 0.00 % there is no connection with destination node(that means 1 to 3 not connected)
1 0 1 r1r2r3
1 1 0 r1r3
1 1 1 r1r3
please to generate above table. please help me.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Networks 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by