wavwrite- wave file must be a string?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am a newbie to matlab. I am trying to create a simple sound using matlab, just as practice for a project. I first created a vector(y) and made that a sound using:
sound(y,96000)
Now i am trying to convert this sound to .wav using
wavwrite(y,Fs,filename)
wavwrite(y,96000,f).
I created the a the function f to be the "filename".
but when i comman wavwrite(y,96000,f), it keeps giving me an error of: "wave file must be a string".
I believe f is the wavefile. I am not really sure what kind of file or function that needs and what does it mean for a wave file to be a string. I have been googling for a little while now and no luck.
If any of you could help, that would be greatly appreciated.
Thanks
0 Commenti
Risposte (1)
Walter Roberson
il 14 Set 2011
I do not understand your sentence, "I created the a the function f to be the "filename"."
Example of use:
f = 'mysound.wav';
wavwrite(y,96000,f);
0 Commenti
Vedere anche
Categorie
Scopri di più su Audio I/O and Waveform Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!