FUNCTION REFERENCE

sound

Play an audio signal and return immediately.

Play an audio signal and return immediately.

Syntax

sound(y)

Syntax

sound(y, Fs)

Syntax

sound(y, Fs, nBits)

A row or column vector plays in mono. An N-by-2 matrix plays in stereo, with the left channel first. Fs defaults to 8192 Hz and nBits defaults to 16. Values outside [-1, 1] are clipped. Requires an audio-enabled build.

Example

sound(zeros(64,1), 8000);

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.