Can i use matlab to generate audio signals.
17 views (last 30 days)
Show older comments
Ralf Prof. Dr. Otte
on 25 Nov 2015
Commented: Walter Roberson
on 12 Nov 2020
That means, i don't want to plot sin(wt), i want to make it audible in a easy way.
0 Comments
Accepted Answer
Star Strider
on 25 Nov 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 Comments
Prajwal Khairnar
on 12 Nov 2020
Edited: Prajwal Khairnar
on 12 Nov 2020
how to listen to 2 synthetic signals one after one
Walter Roberson
on 12 Nov 2020
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
More Answers (1)
See Also
Categories
Find more on Audio Processing Algorithm Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!