% Sample using rasterized array % Atificial data set B % Raster, PSTH, ISIH figure; colormap([1 1 1; 0 0 0]); % black on white background [ras1,ps1,is1] = rasterize( artB1, artTrials); subplot(3,2,1); imagesc( ras1'); subplot(3,2,3); plot(ps1); subplot(3,2,5); plot(is1); drawnow; [ras2,ps2,is2] = rasterize( artB2, artTrials); subplot(3,2,2); imagesc(ras2'); subplot(3,2,4); plot(ps2); subplot(3,2,6); plot(is2); drawnow; % Correlograms figure; ts = 100; % time span [cov11,cor11,rcor11]= correl( ras1, ras1, ts); subplot(2,2,1); plot( -ts:ts, [cor11,rcor11,cov11]); drawnow; [cov12,cor12,rcor12]= correl( ras1, ras2, ts); subplot(2,2,2); plot( -ts:ts, [cor12,rcor12,cov12]); drawnow; [cov22,cor22,rcor22]= correl( ras2, ras2, ts); subplot(2,2,4); plot( -ts:ts, [cor22,rcor22,cov22]); drawnow; % Joint PSTH: %jpsth = ras1*ras2'; % big matrix %figure; imagesc( jpsth); axis('xy'); axis('equal');