Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

clc clear all EEG = pop _ loadbv ( ' / Users / onurerdemkorkmaz / Desktop / Akademi / ERDEM / CALISMALARIM / gokhan _

clc
clear all
EEG = pop_loadbv('/Users/onurerdemkorkmaz/Desktop/Akademi/ERDEM/CALISMALARIM/gokhan_aydin_logo/Data','E_V_ramazan_taha_eskici.vhdr');
filt_EEG = pop_eegfiltnew(EEG,0.1,10);
data = filt_EEG.data;
fs = EEG.srate;
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hyper parameter %
uyaran_oncesi =0.2; % s
uyaran_sonrasi =1; % s
ortalama_alinacak_tekrar_sayisi =15;
ch=16;
%%%%%%%%%%%%%%%%%%%%%%%%%%%
event = squeeze(struct2cell(EEG.event));
event_type = event(6,:)';
Index = find(contains(event_type,{'boundary', 'Active Shielding: On'}));
event_type(Index,:)=[];
for i =1:length(event_type)
B{i,1}= regexp(event_type{i},'\d*','Match');
event_type_2(i,1)=str2double(B{i,1});
end
event_timepoint=[EEG.event.latency]';
event_timepoint(Index)=[];
blok_baslangics = find(event_type_2==5);
blok_bitiss = find(event_type_2==6);
%%%%%%%%%%%%% takm1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
takim1_event_type = event_type_2(blok_baslangics(1)+1:blok_bitiss(1)-1);
takim1_event_timepoint = event_timepoint(blok_baslangics(1)+1:blok_bitiss(1)-1);
logo1_indis = find(takim1_event_type==1);
logo1_timepoint = takim1_event_timepoint(logo1_indis);
logo2_indis = find(takim1_event_type==2);
logo2_timepoint = takim1_event_timepoint(logo2_indis);
logo3_indis = find(takim1_event_type==3);
logo3_timepoint = takim1_event_timepoint(logo3_indis);
logo4_indis = find(takim1_event_type==4);
logo4_timepoint = takim1_event_timepoint(logo4_indis);
takim1_logo1_data = dataayir(data,logo1_timepoint,uyaran_oncesi,uyaran_sonrasi,fs);
takim1_logo2_data = dataayir(data,logo2_timepoint,uyaran_oncesi,uyaran_sonrasi,fs);
takim1_logo3_data = dataayir(data,logo3_timepoint,uyaran_oncesi,uyaran_sonrasi,fs);
takim1_logo4_data = dataayir(data,logo4_timepoint,uyaran_oncesi,uyaran_sonrasi,fs);
uyaran_uzunlugu =(uyaran_oncesi+uyaran_sonrasi)*fs+1;
baseline_uzunluk =(uyaran_oncesi*fs); % remove baseline correction icin kullanlacak
takim1_logo1_data_ortalama = myortalama(takim1_logo1_data,uyaran_uzunlugu,baseline_uzunluk,ortalama_alinacak_tekrar_sayisi);
takim1_logo2_data_ortalama = myortalama(takim1_logo2_data,uyaran_uzunlugu,baseline_uzunluk,ortalama_alinacak_tekrar_sayisi);
takim1_logo3_data_ortalama = myortalama(takim1_logo3_data,uyaran_uzunlugu,baseline_uzunluk,ortalama_alinacak_tekrar_sayisi);
takim1_logo4_data_ortalama = myortalama(takim1_logo4_data,uyaran_uzunlugu,baseline_uzunluk,ortalama_alinacak_tekrar_sayisi);
figure, plot(-0.2:1/EEG.srate:1,takim1_logo1_data_ortalama(ch,:),'LineWidth',2), hold on, grid on
plot(-0.2:1/EEG.srate:1,takim1_logo2_data_ortalama(ch,:),'LineWidth',2), hold on, grid on
plot(-0.2:1/EEG.srate:1,takim1_logo3_data_ortalama(ch,:),'LineWidth',2), hold on, grid on
plot(-0.2:1/EEG.srate:1,takim1_logo4_data_ortalama(ch,:),'LineWidth',2)
legend('Logo1','Logo2','Logo3','Logo4')
title(ch)
xlabel('Zaman')
ylabel('Genlik(V)')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

Students also viewed these Databases questions