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?
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).
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.