How to create a sine wave with linear increasing amplitude transition

10 visualizaciones (últimos 30 días)
Hello everybody,
I would like to create a sine wave with linear increasing amplitude (Amp1 to Amp2), characteristics mentioned above:
Total duration: 9sec
Amplitude1: 0.3
Transition start time: 4th sec
Transition duration: 300ms
Amplitude2: 0.6
Thnx :)

Respuesta aceptada

Russel Burgess
Russel Burgess el 14 de Mzo. de 2021
One way:
t = linspace(0, 9, 10000); % s
f = 10; % Hz
A = 0.3.*(t<4) + (0.3 + (0.6 - 0.3)/0.3*(t-4)).*(t>=4 & t<4.3) + 0.6*(t>=4.3);
x = A.*sin(2.*pi.*f.*t);
plot(t, x);

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by