because I have the error ¡Subscript indices must either be real positive integers or logicals!
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Gianmarco Vega
le 2 Juin 2016
Réponse apportée : Walter Roberson
le 3 Juin 2016
Hi I am making a program to get the average of voices stored in a database.
clear all;
clc;
Fs = 22050; % Frecuencia de Muestreo
[rec1] = wavread('F1b.wav');
[rec2] = wavread('F2b.wav');
[rec3] = wavread('F3b.wav');
[rec4] = wavread('F4b.wav');
[rec5] = wavread('F5b.wav');
prom=rec1;
tam = length(rec5);
fori = 1:1:tam
prom(i) = ((rec1(i)+rec2(i)+rec3(i)+rec4(i)+rec5(i))/5);
end;
lon = length(prom);
d = max(abs(prom));
prom = prom/d;
wavwrite(prom,Fs,16,'FProm.wav')
plot(prom)
sound(prom,Fs)
but when I compile throws the aforementioned mistake
thank you very much.
0 commentaires
Réponse acceptée
Walter Roberson
le 3 Juin 2016
fori = 1:1:tam
is not a for loop: it is an assignment to a variable named fori
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!