Index in position 2 exceeds array bounds. Index must not exceed 1.

% To fetch unknown voice
%Change the file for different unknown voice
this also shows that error at U = Unknown (x,fs);
[x,fs] = audioread ('Nurul6.wav');
U = Unknown (x,fs);
%Voice comparison with others 5 data
% Change the file for different 5 training vocies
[x,fs] = audioread ('Nurul1.wav');
T1 = VoiceDetection (x,fs, U);
[x,fs] = audioread ('Nurul2.wav');
T2 = VoiceDetection (x,fs, U);
[x,fs] = audioread ('Nurul3.wav');
T3 = VoiceDetection (x,fs, U);
[x,fs] = audioread ('Nurul4.wav');
T4 = VoiceDetection (x,fs, U);
[x,fs] = audioread ('Nurul5.wav');
T5 = VoiceDetection (x,fs, U);
%Total score of eclideon distance
PI = T1+T2+T3+T4+T5;

Antworten (1)

Please share the full error message (all the red text).
This error typically occurs when your vector is not the size you expected. Position 2 is your column index. Consider this example.
A=(1:3)';
% This works
A(3,1)
ans = 3
% This generates an error since there is not second column in this dataset
A(3,2)
Index in position 2 exceeds array bounds. Index must not exceed 1.

Kategorien

Produkte

Gefragt:

am 24 Jun. 2023

Bearbeitet:

am 24 Jun. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by