[Eeglablist] Aural ERP

BBR2 at pitt.edu BBR2 at pitt.edu
Fri Apr 13 14:42:30 PDT 2012


For all interested, here is a way to listen to your voltage/time data in
Matlab.
*(not sure if this sent the first time, if this is repeated I apologize)!
-Ben

*************

function []=EEGtosound(EEG,X)

%X is a specific channel
%plays grandaverage as sounds!
%requires epochs structured in EEG.data
%Alter N to change duration of each tone



gave=mean((EEG.data(X,:,:)),3);

num_cols = length(gave(1,:));

newlo=min(gave(1,:));

posnewlo=sqrt(min(gave(1,:)).^2);

newhi=max(gave(1,:));

spred=(newhi-newlo);



N=500;

t=0:N;

Q=zeros(1,N+1);

j=0;

i=0;

for i=1:1:num_cols;

    j = [sin(3*pi*t*(1/(100*((gave(1,i)+posnewlo)/spred))))];

    B=[double(j)];

    Q=[Q B];

end



[w,c]=size(Q);

for n=1:1:w;

    sound(Q(n,:));

end




More information about the eeglablist mailing list