Hello everyone,
So,I have this one signal of 100s seconds long. It is an EEG signal which looks very much like a random signal. I want to inject a sine wave tACS data (5s long sine wave) into it at 30s. But when I say injection, I didn't mean putting sine signal over another EEG signal. At the time 30-35 seconds, I wanted to combine the two signals via addition. Lastly, displaying the full 100s EEG signal with 30-35s: sine wave data (tACS)+EEG. I have attached few image to pictorially what I meant. Here is the current code, that I am working on:
load('Test_Sham_Alpha.mat');
Fs = 500;
dt = 1/Fs;
StopTime = 5;
t = (0:dt:StopTime-dt)';
Fc = 5;
A= 0.001;
x = A*sin(2*pi*Fc*t);
time= EEG.Time(1,1:46600)
for EEG.Time(1,15000:17500)
y1= EEG.Data(1,1:46600);
y2= x
y= y1+y2
end
figure ('Name','Combined EEG+ tACS');
plot(t,y);
xlabel('time (in seconds)');
I have also attached the EEG data that I extracted into an excel file (but only from 25s -40s because 100s is too big but it can easily be plot onto Matlab (fast too), but it is data that requires permission before posting it on public), if you have an idea on how to do it. There are other things that I want to add it on data: ramp-up features, and implementing envelope onto the signals etc. But before I go on to those things, I'd like to settle the basic issues. Note: I can do this on Excel but it couldn't handle that too much data, so I wanted to use maltab but I am not very good at the coding part. I am pretty sure it should be simple. I thought of cutting the datas and then concatenate them but I don't think that is efficient.
Please asisst me. I reallyyyy need help on this. I feel losst :'(
Regards,
Anis