if (~exist('delays')) load('delays01'); end if (~exist('fdelays')) load('fdelays01'); end if (~exist('pos')) load('pos'); end %figure(101);clf; %for i=1:40 % for j=1:40 % subplot(40,40,(i-1)*8+j); % plot(-100:100, squeeze(xcn(i,j,:))); % end %end m2_delaysn=m_delaysn-diag(diag(m_delaysn)); m2_fdelaysn=m_fdelaysn-diag(diag(m_fdelaysn)); m2_fd1=m_fd1-diag(diag(m_fd1)); figure(201);clf; m=max(max(m2_delaysn)); ds=cell(5,8); for i=1:5 for j=1:8 subplot(5,8,(i-1)*8+j); x=pos(i,j); q=m2_delaysn(x,:); ds{i,j}=q(pos); imagesc(ds{i,j});colorbar; end end colorbar; figure(202);clf; m=max(max(m2_fdelaysn)); fds=cell(5,8); for i=1:5 for j=1:8 subplot(5,8,(i-1)*8+j); x=pos(i,j); q=m2_fdelaysn(x,:); fds{i,j}=q(pos); imagesc(fds{i,j});colorbar; end end colorbar; figure(203);clf; m=max(max(m2_fd1)); fds=cell(5,8); for i=1:5 for j=1:8 subplot(5,8,(i-1)*8+j); x=pos(i,j); q=m2_fd1(x,:); fds{i,j}=q(pos); imagesc(fd1s{i,j});colorbar; end end colorbar; figure(401);clf; for i=1:5 for j=1:8 subplot(5,8,(i-1)*8+j); [x y]=find(ds{i,j}==max(max(ds{i,j}))); plot(delaysn(:,pos(i,j),pos(x,y))); st=std(delaysn(:,pos(i,j),pos(x,y))); line([0 5000], [4*st 4*st]); title(sprintf('%d vs. %d',pos(i,j),pos(x,y))); end end figure(402);clf; for i=1:5 for j=1:8 subplot(5,8,(i-1)*8+j); [x y]=find(fds{i,j}==max(max(fds{i,j}))); plot(fdelaysn(:,pos(i,j),pos(x,y))); st=median(fdelaysn(:,pos(i,j),pos(x,y))); %std(fdelaysn(:,pos(i,j),pos(x,y))); line([0 5000], [4*st 4*st]); title(sprintf('%d vs. %d',pos(i,j),pos(x,y))); end end f=10; fd1=zeros(floor(length(fdelaysn)./f)+1,40,40); for i=1:floor(length(fdelaysn)./f) fd1(i,:,:)=sum(fdelaysn((i-1)*f+1:i*f, :, :),1); end if i=0.1); if (not(isempty(q))) conn(i,j)=fd1_100n(q(1),i,j); conn_cum(i,j)=sum(fd1_100n(q,i,j)); conn_time(i,j)=q(1); end end end figure(405);clf; imagesc(conn); colorbar; title('connection strengths'); figure(406);clf; imagesc(conn_cum); colorbar title('cumulative connection strengths'); figure(407);clf; imagesc(conn_time); colorbar title('connection times');