The logical indices contain a true value outside of the array bounds
Answers
Answer:
The logical indices outside the array bound do not contain the true value. When there are many numbers of the same data type, then the use of array is made, where a single of the same data type can be used to store multiple data using an index position value.
Explanation:
When the array is created, it needs a length to be mentioned while it is made. Once the length of the array is provided, it cannot be altered anymore in the whole program.
Answer:
problem might be caused by the way you assign s1,s2 and s3
s1=sound{ii};
s2=sound(jj);
s3=sound(kk);
s1 becomes a character array and the other two scalar cell arrays
.
while (true)
is asking for an infinite loop
.
jj=randi(n);
if (jj~=ii)
s2=sound{jj};
where n is 10 will most of the times throw
Index exceeds array bounds
since length(sound) is 3
.
and this is a better way to create the string, question
question = sprintf( 'A %s goes(%s/%s/%s)', a, sound{OP} );