Considere pré-alocar velocidade [duplicado]
Esta pergunta já tem uma resposta aqui:
Pré-alocando matrizes no Matlab? 1 respostaEu estava fazendo o seguinte
for i = 1:m,
index = 0;
for j = 1:n,
index = index+values(i,j)*2^(j-1);
if (j==1)
symbol_chip = chip_values(index+1,:);
else
symbol_chip = [symbol_chip chip_values(index+1,:)];
end
end
end
diz-me o seguinte:
symbol_chip
pode estar crescendo dentro do loop. Considere pré-alocar velocidade.
Alguma ideia?