error at symbol ofdm "Index exceeds matrix dimensions."
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
mawaranninditya
el 31 de Jul. de 2013
0 votos
3 comentarios
Walter Roberson
el 31 de Jul. de 2013
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.
mawaranninditya
el 1 de Ag. de 2013
Walter Roberson
el 1 de Ag. de 2013
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 ?
Categorías
Más información sobre Downlink Channels en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!