[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wavwrite error

From: Bagus Tris Atmaja
Subject: Re: wavwrite error
Date: Wed, 12 Sep 2018 03:21:32 +0900

H i,

If you used Octave prior to 4.4.0, take a look into `help(wavread)`. The argument should be the signal, fs, bits and filename in the last.
So, change the order of your last line like the following:
>>> wavwrite(,xx', fs, 16, "sound.wav")


On Mon, Sep 10, 2018 at 4:18 PM harish3679 <address@hidden> wrote:
Hello guys,

I have problem executing this piece of code, as it throws an error for
sampling frequency. Please, do share your suggestions

dur = 1.0;
fs = 8000;
tt = 0 : (1/fs) : dur;
xx = sin( 2*pi*2000*tt );
wavwrite("sound.wav",xx', fs, 16)

>> wavwrite("sound.wav",xx', fs, 16)
error: wavwrite: sample rate FS must be a positive number
error: called from
    wavwrite at line 91 column 5

Thanks and Regards!!

Sent from:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]