where is the the porblem in audiowrite?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
where is the the porblem in audiowrite?
srate=11025;
t=0:1/srate:1;
s=sin(2*pi*500*t)
sound(s,srate);
AUDIOWRITE('test.wav',s,srate)
5 comentarios
Guillaume
el 9 de Jul. de 2019
The code you show:
audiowrite('test.wav',s,srate)
The error you get says that it comes from:
audiowrite('test.wav',s,t)
How can we tell you what the problem is if you don't even show us the same code as the one that produces the error.
In any case, the error couldn't be more clear. You're passing a negative sampling rate which of course makes no sense.
Respuestas (2)
Jan
el 9 de Jul. de 2019
In the original question you write:
AUDIOWRITE('test.wav',s,srate)
In the comment you mention:
audiowrite('test.wav',s,t)
The error message tells you clearly, that the 3rd input is not a positive scalar value.
0 comentarios
Ver también
Categorías
Más información sobre Signal Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!