I want to calculate SIR for a Tran in the center of a circle for each interferer distributed randomly in the circle
2 ビュー (過去 30 日間)
古いコメントを表示
I'm defining SIR_V2V_S as an open 1xn matrix but not getting SIR_V2V_S for each interferer rather getting value of SIR for last interferer only.
SIR_V2V_S=[]
m=0;
for n=1:length(I_dis_v2v)
m=I_dis_v2v(n);
SIR_V2V_S= (P_V.*(r_v.^(-Eta_V)).*Ch_Fading)./((sum((P_V.*hx.*(m.^(-Eta_V)))))+N0);
end
0 件のコメント
回答 (1 件)
Vedant Shah
2025 年 6 月 20 日
The Signal-to-Interference Ratio (SIR) needs to be computed for a transmitter (Tx) located at the centre of a circle, with multiple interferers randomly distributed within the circle.
In the provided code, a loop is used to iterate over each interferer, but the variable ‘SIR_V2V_S’ is overwritten in each iteration instead of storing the result for each interferer.
To fix this, the SIR value for each interferer needs to be appended to the ‘SIR_V2V_S’ array. So, the following line of code
SIR_V2V_S= (P_V.*(r_v.^(-Eta_V)).*Ch_Fading)./((sum((P_V.*hx.*(m.^(-Eta_V)))))+N0);
Should be replaced by:
SIR_V2V_S (end+1) = (P_V.*(r_v.^(-Eta_V)).*Ch_Fading)./((sum((P_V.*hx.*(m.^(-Eta_V)))))+N0);
For more information, please refer to the documentation using the following commands in the MATLAB command line:
web(fullfile(docroot, " /matlab/ref/end.html"));
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!