How to apply one signal's envelope to another signal?

조회 수: 10 (최근 30일)
Anis Fatini Abdul Aziz
Anis Fatini Abdul Aziz 2021년 4월 18일
댓글: Anis Fatini Abdul Aziz 2021년 4월 21일
I extract a signal's envelope (Figure 1) and I am trying to apply onto another signal but the modulated output signal (Figure 2) looks really weird. Figure 3 is the signal that I want to modulate, i.e. the one that I want to apply extracted envelope. Here is the snippet of the code:
figure(4)
[env_upper,env_lower] = envelope(env_window)
plot(t_window , env_window) % Plot the entire signal
hold on
plot(t_window, env_upper, t_window, env_lower) % Overlay the envelope on the above plot. Use line spec to change the line colors
hold off
title('Envelope of Referred Signal from Phantom Head')
xlabel ('Time,s');
ylabel ('Voltage, V');
%possible idea
%B_extract = B(30:90)
%Modulate Signal B with A ie. B_extract+A.*B_extract (Amplitude modulation)
load('Test_Sham_Alpha.mat');
EEG.Data = scalingFactor*EEG.Data;
am_mod = envelope(env_window) + y_to_be_modified.*envelope(env_window);
EEG.Data(1,15001:45000) = am_mod;
figure (5)
plot(EEG.Time(1,1:46600) , EEG.Data(1,1:46600))
title('Amplitude Modulated EEG+tACS Signal')
xlabel ('Time,s');
ylabel ('Voltage, V');
Anyone knows how to fix so I the output would be a proper amplitude modulated signal? Thanks in advance.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Modulation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by