Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - English


writes .wav sound file


wavwrite(y, wavfile)
wavwrite(y, Fs, wavfile)
wavwrite(y, Fs, nbits, wavfile)



row vector or matrix: Sound amplitudes = real values in [-1,1]. One row per channel. Values out of [-1,+1] are ignored.


string (The .wav extension is appended if no extension is given)


integer: Sampling frequency, in Hz. 22500 is the default value.


bit-depth 8, 16, 24, 32 bits. it describes the number of bits of information recorded for each sample. 16 is the default value.


Utility function to save .wav sound file. wavwrite(y,wavfile) writes a sound file specified by the string wavfile.

wavwrite(y,Fs,wavfile) specifies in Fs the sampling rate of the data in Hertz.


A = matrix(1:6,2,3);
B = wavread(TMPDIR+'/foo.wav');

See also

  • auread — load .au sound file
  • wavread — reads sound data or querries data info from a .wav audio file
  • savewave — save data into a sound wav file.
  • analyze — frequency plot of a sound signal
  • mapsound — Computes and displays an Amplitude(time, frequency) spectrogram of a sound record
Report an issue
<< wavread Sound file handling Time and Date >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Mar 27 11:52:45 GMT 2023