I'm plotting an eeg signal with 23 channels (matrix 23X921600); when I plot it, Matlab says that I don't have enough memory... I try to separate each channel putting: Channel1 = record(1,:);... Channel23= record(23,:) in this case I don't have any error, so I'd like to know if there's another way to plot the whole signla without having the memory "error"...
So, I assume this is 30 min of continously sampled EEG at 512Hz? Why do you want to plot the whole 30 min epoch at once? Maybe it ist useful to split the data in several epochs, for example each 10min? It really depends on your research question. Sometimes it can be useful to create 2sec epochs, analyze and average across them or whatever. More information would be useful, to give a good advise.
Additionally, you can also check your matlab options in case of memory problems. It ist possible to use HD space (as far as I remember) to improve memory. For an overview have a look here:
Thank you Rainer, the singal is sampled with 256 Hz and the duration is 60 min. For is the same if I plot each 10 or 20 min. How do i split the data? Undersampling the signal?!
You can do the same thing as with the electrodes, epoch1=data(:,1:30720), for a two minute epoch.
I can not say if a further downsampling is advisable, since this really depends on your goal. But please tell us more about the research question. Maybe there are already articles available to recommend a strategy for your specific data/problem and how to approach it.
In my opinion, if you are just interested in displaying EEG data, you should read from the EDF file only the section of samples to be displayed, starting the reading procedure from the data record corresponding to the starting time you want to show, and putting these data into a temporary matrix. In this way you will save a lot of memory. When you want to display another section of data, you simply move the pointer within the EDF file in order to read another section of EEG data. In my experience, displaying 1 to 2 minutes of EEG in a screen is enough. Too much compressed data would be difficult to interpret.
However, iIf you want to display the whole hour of EEG data contained in your file, you should consider the idea of amplitude-integrate them, such as in the Cerebral Function Monitoring (CFM) representation, instead of performing a downsampling.