How can I lower to 0 the base of a window signal?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Roxana Maria DRAGHICI
el 26 de Mayo de 2022
Comentada: Walter Roberson
el 12 de Jun. de 2022
L.E.: signal.*abs(signal)/max(abs(signal)) worked for me if anyone else comes across this issue
Hi! I have this signal, obtained by smoothing the absolute an ECG signal.
I need to create these windows. For that, I have to set the base to 0. Can anyone help me, please?
1 comentario
Walter Roberson
el 12 de Jun. de 2022
signal.*abs(signal)/max(abs(signal))
is not going to solve the problem you asked about. In the below, notice that your formula leaves negative values (instead of changing the base to zero), and your formula distorts values near 0.
x = linspace(0, 4);
signal1 = 10 * exp(-(x-1).^2*5) - 2;
signal2 = 7 * exp(-(x-3).^2*5) - 3;
signal = signal1 + signal2;
figure
plot(x, signal1, x, signal2, x, signal);
legend({'pulse1', 'pulse2', 'sum'});
title('original');
signal2 = signal.*abs(signal)/max(abs(signal));
figure
plot(x, signal2); title('scaled')
Respuestas (1)
Ver también
Categorías
Más información sobre Multirate Signal Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!