How to fix array indices must be positive integers or logical values
3 次查看（过去 30 天）
Walter Roberson 2021-12-25
编辑：Walter Roberson 2021-12-25
[y,fs] = audioread('Samuel_Pappalardo.wav')
t = (0:size(y,1)-1)/fs;
The above repairs a boundary condition in your time calculation.
It does not, however, repair any index problem. If you encountered an index problem it implies that you had an existing variable named plot or linspace or length