필터 지우기
필터 지우기

Array indices must be positive integers or logical values.

조회 수: 1 (최근 30일)
P Walter
P Walter 2020년 3월 31일
답변: Peng Li 2020년 3월 31일
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

답변 (1개)

Peng Li
Peng Li 2020년 3월 31일
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.

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by