Can i use matlab to generate audio signals.

 Respuesta aceptada

Star Strider
Star Strider el 25 de Nov. de 2015
This is the easiest way:
Fs = 14400; % Sampling Frequency
t = linspace(0, 1, Fs); % One Second Time Vector
w = 2*pi*1000; % Radian Value To Create 1kHz Tone
s = sin(w*t); % Create Tone
sound(s, Fs) % Produce Tone As Sound
For a detailed description of the functions in the most recent MATLAB releases, see the documentation for Audio Recording and Playback.

4 comentarios

BIRKAN OZSEVEN
BIRKAN OZSEVEN el 3 de Mayo de 2020
Sir , in order to hear it longer I am trying to increase 1 sec to 10 sec or more but it does not affect. What should I do for that?
Fs = 14400; % Sampling Frequency
secs = 10;
t = linspace(0, secs, Fs*secs+1); % Time Vector + 1 sample
t(end) = []; % remove extra sample
w = 2*pi*1000; % Radian Value To Create 1kHz Tone
s = sin(w*t); % Create Tone
sound(s, Fs) % Produce Tone As Sound
Prajwal Khairnar
Prajwal Khairnar el 12 de Nov. de 2020
Editada: Prajwal Khairnar el 12 de Nov. de 2020
how to listen to 2 synthetic signals one after one
Fs = 14400; % Sampling Frequency
secs = 10;
t = linspace(0, secs, Fs*secs+1); % Time Vector + 1 sample
t(end) = []; % remove extra sample
w = 2*pi*1000; % Radian Value To Create 1kHz Tone
w2 = 2*pi*1440; % Radian Value To Create 1440 Hz Tone
s = sin(w*t); % Create Tone
s2 = sin(w2*t); % Create second Tone
sound([s, s2], Fs) % Produce Tone then second Tone As Sound

Iniciar sesión para comentar.

Categorías

Más información sobre Audio Processing Algorithm Design en Centro de ayuda y File Exchange.

Preguntada:

el 25 de Nov. de 2015

Comentada:

el 12 de Nov. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by