function M=visualize(data) %data is the Nx64 matrix of time x channel %M is a Matlab movie (movie(M) will playback M) time=size(data,1); data=data'; clow=min(min(data)); chigh=max(max(data)); data=reshape(data,[8 8 time]); h = figure(1); for iter=250:time imagesc(data(:,:,iter)',[clow chigh]) colormap('default') colorbar('horiz') axis image off title(sprintf('time=%d ms, image number=%d',iter*.05,iter)); set(gcf,'color','white'); M(iter)=getframe(h); end