Skip to content

Instantly share code, notes, and snippets.

@akshaybabloo
Last active November 18, 2015 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akshaybabloo/711e8abf9d3452ca20ac to your computer and use it in GitHub Desktop.
Save akshaybabloo/711e8abf9d3452ca20ac to your computer and use it in GitHub Desktop.
sample_rate = 500;
number_of_channels = 32;
file_number = 1;
looper = 1;
eeg = transpose(EEG.data);
while looper == 1
var = eeg(1:sample_rate,1:number_of_channels);
k = sprintf('sam%d',file_number);
% assignin('base',k,var); % if you wan to save it to your work space.
eeg(1:sample_rate,:) = [];
csvwrite(strcat(k,'.csv'),var);
file_number=file_number+1;
[c,d] = size(eeg);
if c < 10
looper=0;
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment