Anteprima
Vedrai una selezione di 13 pagine su 130
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 1 Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 2
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 6
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 11
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 16
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 21
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 26
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 31
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 36
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 41
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 46
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 51
Anteprima di 13 pagg. su 130.
Scarica il documento per vederlo tutto.
Tesi - Algoritmi per l'acquisizione e l'elaborazione di segnali EEG Pag. 56
1 su 130
D/illustrazione/soddisfatti o rimborsati
Disdici quando
vuoi
Acquista con carta
o PayPal
Scarica i documenti
tutte le volte che vuoi
Estratto del documento

GUIDATA)

% varargin command line arguments to EEG (see VARARGIN)

% Choose default command line output for EEG

handles.output = hObject;

% Update handles structure

guidata(hObject, handles);

% UIWAIT makes EEG wait for user response (see UIRESUME)

% uiwait(handles.figure1);

% --- Outputs from this function are returned to the

command line.

function varargout = EEG_OutputFcn(hObject, eventdata,

handles) 80

% varargout cell array for returning output args (see

VARARGOUT);

% hObject handle to figure

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% Get default command line output from handles structure

varargout{1} = handles.output;

% --- Executes on button press in pushbutton1.

function pushbutton1_Callback(hObject, eventdata, handles)

[nomefile1] = uigetfile('*.txt','Selezionare file txt...');

nomefile=nomefile1(1:end-4);

fid = fopen(nomefile1);

fidw=fopen(strcat(nomefile,'_v2.txt'),'w');

for i_=1:9

line=fgets(fid);

fprintf(fidw,line);

end

fs=prendi_fs(nomefile1);

assignin('base','fs',fs)

while ~feof(fid)

line=fgets(fid);

line(1:15)=[' '];

i_=i_+1;

fprintf(fidw,'%s',line);

end

fprintf('Creato nuovo file: %s

\r',strcat(nomefile,'_v2.txt'));

fclose(fid);fclose(fidw);

nomefile2=strcat(nomefile,'_v2.txt');

[pathstr, name, ext] = fileparts(nomefile1)

if strcmp(ext,'txt')==1 81

set(handles.checkbox1, 'Value',1)

set(handles.checkbox2, 'Value',0)

else set(handles.checkbox1, 'Value',0)

set(handles.checkbox2, 'Value',1)

end

[data, no_el] = importdata_FLF(fs, nomefile2);

assignin('base','fs',fs)

assignin('base','data',data)

% --- Executes on button press in pushbutton2.

function pushbutton2_Callback(hObject, eventdata, handles)

variabile_gui = evalin('base','data');

dim_var=size(variabile_gui);

dim_var_str=num2str(dim_var);

%e a questo punto lo passi allo static text con il campo

'String' della funzione set:

set(handles.pushbutton2,'String',dim_var_str);

% --- Executes on button press in pushbutton3.

function pushbutton3_Callback(hObject, eventdata, handles)

variabile2_gui = evalin('base','fs');

variabile2_gui_str=num2str(variabile2_gui);

%e a questo punto lo passi allo static text con il campo

'String' della funzione set:

set(handles.pushbutton3,'String',variabile2_gui_str);

% --- Executes on button press in pushbutton4.

function pushbutton4_Callback(hObject, eventdata, handles)

variabile_gui = evalin('base','data');

dim_var=size(variabile_gui,1);

dim_var_str=num2str(dim_var);

set(handles.pushbutton4,'String',dim_var_str);

82

switch dim_var

case 8

immagine=imread('8ch.jpg')

case 19

immagine=imread('19ch.jpg')

imshow (immagine);

case 32

immagine=imread('32ch.jpg')

imshow (immagine);

case 64

immagine=imread('64ch.jpg')

imshow (immagine);

case 128

immagine=imread('128ch.jpg')

imshow (immagine);

otherwise

disp('errore');

end

% --- Executes on button press in checkbox1.

function checkbox1_Callback(hObject, eventdata, handles)

% hObject handle to checkbox1 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of

checkbox1

% --- Executes on button press in checkbox2.

function checkbox2_Callback(hObject, eventdata, handles)

% hObject handle to checkbox2 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of

checkbox2

% --- Executes on button press in pushbutton5.

function pushbutton5_Callback(hObject, eventdata, handles)

83

data=evalin('base','data');

fs=evalin('base','fs');

[outvar1] = eegplot(data,fs)

% hObject handle to pushbutton5 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% --- Executes on selection change in popupmenu5.

function popupmenu5_Callback(hObject, eventdata, handles)

ordine=get(handles.popupmenu5,'Value');

ordine=ordine-1;

assignin('base','ordine',ordine)

% hObject handle to popupmenu5 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns

popupmenu5 contents as cell array

% contents{get(hObject,'Value')} returns selected

item from popupmenu5

% --- Executes during object creation, after setting all

properties.

function popupmenu5_CreateFcn(hObject, eventdata, handles)

% hObject handle to popupmenu5 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles empty - handles not created until after all

CreateFcns called

% Hint: popupmenu controls usually have a white background

on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in popupmenu6.

function popupmenu6_Callback(hObject, eventdata, handles)

tipo=get(handles.popupmenu6,'Value');

84

assignin('base','tipo',tipo)

% hObject handle to popupmenu6 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns

popupmenu6 contents as cell array

% contents{get(hObject,'Value')} returns selected

item from popupmenu6

% --- Executes during object creation, after setting all

properties.

function popupmenu6_CreateFcn(hObject, eventdata, handles)

% hObject handle to popupmenu6 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles empty - handles not created until after all

CreateFcns called

% Hint: popupmenu controls usually have a white background

on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in popupmenu7.

function popupmenu7_Callback(hObject, eventdata, handles)

x=get(handles.popupmenu7,'Value');

switch x

case 2

ft=0.08;

case 3

ft=0.16;

case 4

ft=0.3;

case 5

ft=0.53;

case 6

ft=1;

case 7

ft=1.6; 85

case 8

ft=5.3;

case 10

ft=30;

case 11

ft=150;

case 12

ft=175;

case 13

ft=200;

case 14

ft=250;

case 15

ft=400;

case 16

ft=500;

otherwise

disp('errore');

end

assignin('base','ft',ft)

% hObject handle to popupmenu7 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns

popupmenu7 contents as cell array

% contents{get(hObject,'Value')} returns selected

item from popupmenu7

% --- Executes during object creation, after setting all

properties.

function popupmenu7_CreateFcn(hObject, eventdata, handles)

% hObject handle to popupmenu7 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles empty - handles not created until after all

CreateFcns called

% Hint: popupmenu controls usually have a white background

on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

86

set(hObject,'BackgroundColor','white');

end

% --- Executes on button press in pushbutton9.

function pushbutton9_Callback(hObject, eventdata, handles)

ft = evalin('base','ft');

fs = evalin('base','fs');

ordine= evalin('base','ordine');

tipo = evalin('base','tipo');

data = evalin('base','data');

Wn = (2*ft)/fs;

switch tipo

case 2

[B,A] = butter(ordine,Wn,'low'); % il primo numero (n)

indica l'ordine del filtro, quello in viola se è passa

alto,basso o banda

case 3

[B,A] = butter(ordine,Wn,'high');

otherwise

disp('errore');

end

y = filter(B,A,data);

assignin('base','y',y)

% hObject handle to pushbutton9 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% --- Executes on button press in pushbutton10.

function pushbutton10_Callback(hObject, eventdata, handles)

y=evalin('base','y');

fs=evalin('base','fs');

eegplot(y,fs)

% hObject handle to pushbutton10 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% --- Executes on selection change in popupmenu8.

function popupmenu8_Callback(hObject, eventdata, handles)

87

u=get(handles.popupmenu8,'Value');

switch u

case 2

fn=50;

case 3

fn=60;

otherwise

disp('errore');

end

assignin('base','fn',fn)

% hObject handle to popupmenu8 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

% handles structure with handles and user data (see

GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns

popupmenu8 contents as cell array

% contents{get(hObject,'Value')} returns selected

item from popupmenu8

% --- Executes during object creation, after setting all

properties.

function popupmenu8_CreateFcn(hObject, eventdata, handles)

% hObject handle to popupmenu8 (see GCBO)

% eventdata reserved - to be defined in a future version

of MATLAB

Dettagli
Publisher
A.A. 2013-2014
130 pagine
1 download
SSD Scienze politiche e sociali SPS/08 Sociologia dei processi culturali e comunicativi

I contenuti di questa pagina costituiscono rielaborazioni personali del Publisher andrea080690 di informazioni apprese con la frequenza delle lezioni di Laboratorio di tesi di laurea e studio autonomo di eventuali libri di riferimento in preparazione dell'esame finale o della tesi. Non devono intendersi come materiale ufficiale dell'università Università degli studi Mediterranea di Reggio Calabria o del prof La Foresta Fabio.