Borrar filtros
Borrar filtros

Array indices must be positive integers or logical values.

1 visualización (últimos 30 días)
P Walter
P Walter el 31 de Mzo. de 2020
Respondida: Peng Li el 31 de Mzo. de 2020
Does anybody know why i am getting that error. Sorry i'm very new to Matlab...
for a =1:204800
step = 0;
for b = 1:512
T1(a) = b(sound6_);
end
step = step+ 20480;
end

Respuestas (1)

Peng Li
Peng Li el 31 de Mzo. de 2020
What are you trying to do? In inner loop, b is your loop index. It is seen as a scalar. There aren't any b(sounds6_) if sounds6_ is larger than 1.
For your upper loop, step isn't involved in any of these calculation.

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by