wavwrite- wave file must be a string?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Walter Roberson
2011년 9월 14일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!