Want to generate a sine wave with linear sweeping in amplitude and output as sound in audio jack

4 次查看(过去 30 天)
I am trying to make amplitude sweeping of a sine wave and want the output of this wave in the system audio jack.
I have this code working to some extent.
It will make me happy if somebody helps me in this regard.
%%%%%%% Amplitude sweeping %%%%%%%%%%%
clear all;
clc;
Fc = 1000;
Fs = 44100;
dt = 1/Fs;
StopTime = 2;
t = (0:dt:StopTime-dt)';
A = linspace(0, 1, numel(t))';
y = A.*sin(2*pi*Fc*t);
plot(t,y)
grid on
player = audioplayer(y,192000);
play(player);
  5 个评论

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Audio Processing Algorithm Design 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by