error when i make pilots and guard of OFDM Symbol "Index exceeds matrix dimensions."

Asked by natasha about 9 hours ago
Latest activity Closed by Walter Roberson about 6 hours ago
This question is closed and may reopen in the future if edited.

i got this error at symbol ofdm "Index exceeds matrix dimensions." from list program for make a pilot and guard ofdm symbol.

the list program like this:

% making odfm symbol and taking IFFT
% function  symbol_ofdm = createsymbol (pilots,data)
%now first generate the pilot
A=complex(-1,0);
B=complex(1,0);
pilots = [A B A B B B A A];  %%% here we direct making the pilot,detail procedure given below
% n_symbol = 1;  % At the time of generating the pilots, I need to know what symbol i am simulating
% because the seed to do it depends on it.
% The values of the pilots are to be modulated are defined in the standard as such(pp 443) :
% Before beginning, it is necessary to consider that the value to calculate depends on 2 factors :
% the number of symbols and whether we are in the uplink or dwnlink. We will consider that we are in
% the downlink and we are transmitting the symbol "1".
% If we want to consider the other uplink connection, the seed would be "10101010101".
% seed = [1 1 1 1 1 1 1 1 1 1 1];
% for i=1:n_symbol+2 
% wk(i) = seed (11); 
% next = xor(seed(9),seed(11));
% seed = [next seed(1,1:10)];
% end
% Once the value of wk is found(that depends on the number of symbol with wihich it is working),
% the values of the subcarriers must be found and of the mapping of them with BPSK constellation.
% wk = wk(n_symbol+2)
% A = 1 - 2*wk                           % Values defined in the standard.
% B = 1 - 2*(~wk)
% value_carrier = [A B A B B B A A]
% For uplink, the values should be [A B A B A A A A]
% pilot_mapping = 2*mapping(value_carrier,1,Tx);      
% The factor of "2" is due to the fact that the pilots are transmitted to a
% double power of the information bits.
% NOW The guard bands are prepared.
guard1 = complex (0,0) * ones (1,28);
DC = complex (0,0);
guard2 = complex (0,0) * ones (1,27);
% The pilot and guard subcarriers are placed according to the standard.
fx = [guard1 data(1:12) pilots(1) data(13:36) pilots(2)... 
    data(37:60) pilots(3) data(61:84) pilots(4) data(85:96) DC... 
    data(97:108) pilots(5) data(109:132) pilots(6) data(133:156)... 
    pilots(7) data(157:180) pilots(8) data(181:192) guard2];
% here the ofdm symbol is completed
%Now taking IFFT
symbol_ofdm = ifft(fx,Nfft);
%Now adding cyclic prefix
%we generate the cyclic prefix so that the multipaths do not affect our data so much.
margin = length(symbol_ofdm)*G;
data_tx = [symbol_ofdm((end-margin+1):end) symbol_ofdm];
data_transmitter=data_tx; 

and then i got that problem especially at line:

   % The pilot and guard subcarriers are placed according to the standard.
    fx = [guard1 data(1:12) pilots(1) data(13:36) pilots(2)... 
        data(37:60) pilots(3) data(61:84) pilots(4) data(85:96) DC... 
        data(97:108) pilots(5) data(109:132) pilots(6) data(133:156)... 
        pilots(7) data(157:180) pilots(8) data(181:192) guard2];

so how do i solve this error?

please help me.. i don't know what i do for solve that error. i finish browse at google and mathwork's help but i can't solve that problem.

can somebody help me and give advise for me? thank you before..

thank you.

0 Comments

natasha

Products

No products are associated with this question.

0 Answers

Contact us