I did not get your question…can you please elaborate?

YA

]]>Why is t=90-phi ?? to calculate the HPBW with this formula

HPBW=(0.886*lambda)/(N*d*cos(t))

]]>1. Generate a uniform random variable (RV) between 0 and 1

2. Generate the in-phase values (-3, -1, +1, +3) according to the following look-up table

RV = 0 to 0.25, I = -3

RV = 0.25 to 0.50, I = -1

RV = 0.50 to 0.75, I = +1

RV = 0.75 to 1.00, I = +3

3. Generate another uniform random variable between 0 and 1

4. Repeat the above process for the quadrature value (Q)

5. Once I and Q are generated, I+j*Q gives you the required 16-QAM symbol

Please remember the following while using the code:

1. Comment out N=20 (put % before the line) from the main code since this new file is going to provide values of N

2. Comment out “clear all” and “close all” from the main code since this is taken care of in this new wrapper file

3. Save the main file as Massive_MIMO1.m

4. Save the wrapper file as BER_Wrapper1.m

Hope it works!

]]>close all %Close all figures

N_vector=20:20:100; %Rx array length range

for j=1:length(N_vector)%Varying the length of the receive array

N=N_vector(j); %Selecting a value of N

for k=1:50000 %This number may be increased

Massive_MIMO1; %This should be the same as the name of main file

BER_array(k)=ber; %Storing the BER in the array

end

BER_total(j)=mean(BER_array) %Calculating the mean BER for each N

end

semilogy(N_vector, BER_total,’ro-‘) %Plot on log scale

xlabel(‘Receive Array Size(N)’) %X-label

ylabel(‘BER’) %Y-label

hold on %Hold on

grid on %Grid on

plotting (N,ber) doesn’t fetch me anything, could you please provide the plot commands?

]]>I get the following error at line

H=exp(-i*(n-1)*2*pi*d*cos(theta)/l);

Error using *

Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use ‘.*’.

I get an error when i run the first code with probabailistic channel H=exp(-i*(n-1)*2*pi*d*cos(theta)/l);

could you please tell me what could be wrong .

the code stops at this line ‘H’ and says

H=exp(-i*(n-1)*2*pi*d*cos(theta)/l);

Error using *

Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use ‘.*’.

i used the exact code to check what i can see.

]]>