because I have the error ¡Subscript indices must either be real positive integers or logicals!
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Gianmarco Vega
 el 2 de Jun. de 2016
  
    
    
    
    
    Respondida: Walter Roberson
      
      
 el 3 de Jun. de 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 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 3 de Jun. de 2016
        fori = 1:1:tam
is not a for loop: it is an assignment to a variable named fori
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

