I want to simulate different UEs with different SNR in MU-MIMO. However, the code in LTE_sim_main_process_SNR_vector.m SNR_vec = SNR_vec(ones(LTE_params.nBS,LTE_params.nUE),:); will assign same SNR to all UEs even though I assign different SNR to UEs at first. I think the code should be commented.
Does anyone have any idea?
Thank you.
no that’s not the case; the “ones(…)” command is actually converted here to logical indexing. To convince yourself, just take a look at the output of SNR_vec after this command; it will contain different SNRs in different rows (provided you set different SNRs to begin with).
Dear Stefan,
Thanks for your reply. The following is the output of SNR_vec.
However, SNRs in different rows are the same even though I set SNR_vec = [1;2;3;4;5] at first.
What is the problem?
Hi, Dr.Schwarz
The following is the output of SNR_vec. However, SNRs in different rows are the same even though I set SNR_vec = [3;4;5;6;7] at first.
What is the problem?
sorry for answering late. I guess that happens in your case since SNR_vec is only one-dimensional; I think with a matrix (i.e., multiple simulation runs with different SNRs, it would work). Nevertheless, as far as I see the problem should be resolved by replacing the “ones(…)” indexing the SNR_vec with “true(…)” to make sure that logical indexing is used.