i get this error "Index exceeds matrix dimensions."
Error in Untitled (line 293)
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];
because i have list program for make a pilot and guard ofdm symbol. and then i got that problem. 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..
thank you.
No products are associated with this question.
Solve this by checking the size of pilots and data before this statement is run:
size(data) size(pilots)
If data is not at least 192 elements then
data(181:192)
is going to fail with this error, because it is looking for 192nd element.
Similar for pilots.
so i must type that statement before the equation a pilot and guard ofdm symbol for checking long data and pilots?
i'm really confused sir. can you help me?
thank you.
Before the assignment to fx, add this:
if numel(pilots) < 8 || numel(data) < 192
error(sprintf('pilots needs to be at least 8 long but is %d; data needs to be at least 192 long but is %d', numel(pilots), numel(data));
end
Once that is in place, then instead of crashing with the error message about exceeding matrix dimension, you will get a controlled error message telling you what the problem was. The statement will not in itself solve the problem, but it will give you information about what you should be looking for in the code above that.
if i still get error, so it means my pilots and data aren't 8 and 192, what should i do? cause i use pilots and guard subcarrier (data) is standard from ofdm. i'm not modified, cause i don't know how to modified that equation.
please help me sir, what should i do for solve this error?
As I wrote, the statement will not solve the problem, but it will give you information about what you should be looking for. What does it print out as the length for pilots and for data ?
0 Comments