Hello all, I have the following Graph:
sr = [1,2,2,2,3,3,3,4,5];
ta = [2,3,6,8,6,4,7,6,6];
G = graph(sr,ta);
plot(G)
Here node 'i', 'node j' denotes the neighbors of each other. For e.g., if node 'i' = 2 then 'j' can be 1,3,6,8. Similarly if 'i' = 5 then 'j' is 6.
And Siganl to Noise ratio (SNR) of the link from 'i' to 'j' is Gaussian random variable.
My query is I am not getting how to compute SNR of the link from node 'i' to node 'j'.
Any help in this regard will be highly appreciated.

답변 (1개)

Chunru
Chunru 2023년 5월 4일

0 개 추천

sr = [1,2,2,2,3,3,3,4,5];
ta = [2,3,6,8,6,4,7,6,6];
% Use graph weight for SNR
snr = randn(size(sr)); % gaussian distribution (adjust this)
G = graph(sr,ta, snr);
% Show graph and SNR
plot(G, 'EdgeLabel', G.Edges.Weight)

댓글 수: 4

charu shree
charu shree 2023년 5월 5일
@Chunru Thanks for ur answer....you are just randomly generating and storing in SNR, while I am looking for a way where we can express snr with respect to node 'i' and 'j'.
For e.g., suppose there is for loop controlling node i and node j and snr is generated..
Chunru
Chunru 2023년 5월 5일
You must specify the way SNR is generated as a function of node i and node j. Provide more details of the problem.
charu shree
charu shree 2023년 5월 5일
Basically i want to move from node in 'sr' to node in 'ta' and then generate the SNR between these nodes.
Torsten
Torsten 2023년 5월 5일
If your graph is directed (direction source to target) and you generate snr(i) = 20, e.g., you can interprete this as 20 packages being sent from sr(i) to ta(i). You don't need to "move from node i to node j" (whatever this may mean).

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Networks에 대해 자세히 알아보기

질문:

2023년 5월 4일

댓글:

2023년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by