plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | adelbibi/Tensor_CSC-master | region_zca.m | .m | Tensor_CSC-master/Training/image_helpers/contrast_normalization/region_zca.m | 5,318 | utf_8 | c24cbfa1f961dc41ec067dc7f4aa7bf2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%>
% This functin is used to whiten an image with patch based ZCA whitening that is applied
% convolutionally to the image.
%
% @file
% @author Matthew Zeiler
% @date Jun 28, 2010
%
% @image_file @copybrief region_zca.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | adelbibi/Tensor_CSC-master | inv_f_dewhiten.m | .m | Tensor_CSC-master/Training/image_helpers/contrast_normalization/inv_f_dewhiten.m | 1,601 | utf_8 | 6083f4eb9343995c663452f48e0e7475 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%>
% The function to dewhiten an image with 1/f whitening.
%
% @file
% @author Matthew Zeiler
% @date Jun 28, 2010
%
% @image_file @copybrief inv_f_dewhiten.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%... |
github | adelbibi/Tensor_CSC-master | inv_f_whiten.m | .m | Tensor_CSC-master/Training/image_helpers/contrast_normalization/inv_f_whiten.m | 2,510 | utf_8 | 7b586cde91c557cf3a3faaf992eeaf2b | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%>
% The function to whiten an image with 1/f whitening.
%
% @file
% @author Matthew Zeiler
% @date Jun 28, 2010
%
% @image_file @copybrief inv_f_whiten.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%... |
github | zhuwei378287521/px4-master | ellipsoid_fit.m | .m | px4-master/Tools/Matlab/ellipsoid_fit.m | 6,102 | utf_8 | b8fff7152313707a347ab528f7fbce9b | % Copyright (c) 2009, Yury Petrov
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are
% met:
%
% * Redistributions of source code must retain the above copyright
% notice, this list of conditions... |
github | wf8/IB290-master | afunc.m | .m | IB290-master/lecture_slides/Mtg05_Carl_misc/bugs_in_a_box/bugsinbox.app/Contents/Resources/lib/python2.6/scipy/io/matlab/tests/afunc.m | 198 | utf_8 | 001c8b39c33bf4f7513b2e87a13478f2 | function [a, b] = afunc(c, d)
% A function
a = c + 1;
b = d + 10;
function [a, b] = afunc(c, d)
% A function
a = c + 1;
b = d + 10;
function [a, b] = afunc(c, d)
% A function
a = c + 1;
b = d + 10;
|
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_333.m | .m | CorticoHippocampal-master/plot_inter_conditions_333.m | 12,130 | utf_8 | e61ed84f6d5a52d1bdb7e3797793bc5d | %This one requires running data from Non Learning condition
function [h]=plot_inter_conditions_33(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM)
% % % % % % % % % % % % % % % % % % % % % % ... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_278.m | .m | CorticoHippocampal-master/plot_inter_conditions_278.m | 10,948 | utf_8 | de2d5417349d8d733e64ae186ce3e625 | %This one requires running data from Non Learning condition
function plot_inter_conditions_278(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM)
% % % % % % % % % % % % % % % % % % % % % % % %... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_FIXED.m | .m | CorticoHippocampal-master/plot_inter_FIXED.m | 16,482 | utf_8 | 8827d94eadd29318f7f74e9458d35119 | %This one requires running data from Non Learning condition
function plot_inter_FIXED(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,selectripples,acer,P1_nl,P2_nl,p_nl,q_nl,freq1,freq3,freq2,freq4)
%function plot_inter_conditions_27(Rat,nFF,l... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_FIXED_10.m | .m | CorticoHippocampal-master/plot_inter_FIXED_10.m | 16,729 | utf_8 | 62909012b3f4cd2fb0b77e6c4eb54755 | %This one requires running data from Non Learning condition
function plot_inter_FIXED_10(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,selectripples,acer,P1_nl,P2_nl,p_nl,q_nl,freq1,freq3,freq2,freq4)
%function plot_inter_conditions_27(Rat,nF... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_3.m | .m | CorticoHippocampal-master/plot_inter_conditions_3.m | 10,938 | utf_8 | 52cf9545fea32ab18d7e4cc300ec5d29 | %This one requires running data from Non Learning condition
function plot_inter_conditions_3(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM)
% % % % % % % % % % % % % % % % % % % % % % % % %... |
github | Aleman-Z/CorticoHippocampal-master | psi_paper.m | .m | CorticoHippocampal-master/HFOs/psi_paper.m | 900 | utf_8 | 05f374b0c680c596604100ddab1e03e6 |
function [freq,freq2]=psi_paper(q,timecell,freqrange,fn)
%fn=1000;
data1.trial=q;
data1.time= timecell; %Might have to change this one
data1.fsample=fn;
data1.label=cell(3,1);
% data1.label{1}='Hippocampus';
% data1.label{2}='Parietal';
% data1.label{3}='PFC';
data1.label{1}='PAR';
data1.label{2}='PFC';
data1.label{... |
github | Aleman-Z/CorticoHippocampal-master | gui_table.m | .m | CorticoHippocampal-master/GUI/gui_table.m | 2,823 | utf_8 | 4f9a203664bc006a67ec7260f427590e | function varargout = gui_table(varargin)
% GUI_TABLE MATLAB code for gui_table.fig
% GUI_TABLE, by itself, creates a new GUI_TABLE or raises the existing
% singleton*.
%
% H = GUI_TABLE returns the handle to a new GUI_TABLE or the handle to
% the existing singleton*.
%
% GUI_TABLE('CALLBACK',hO... |
github | Aleman-Z/CorticoHippocampal-master | gui_spectral.m | .m | CorticoHippocampal-master/GUI/gui_spectral.m | 18,734 | utf_8 | 7ee7efd8bbdcd52c1c4025dcdc5c57d1 | function varargout = gui_spectral(varargin)
% GUI_SPECTRAL MATLAB code for gui_spectral.fig
% GUI_SPECTRAL, by itself, creates a new GUI_SPECTRAL or raises the existing
% singleton*.
%
% H = GUI_SPECTRAL returns the handle to a new GUI_SPECTRAL or the handle to
% the existing singleton*.
%
% GU... |
github | Aleman-Z/CorticoHippocampal-master | gui_main.m | .m | CorticoHippocampal-master/GUI/gui_main.m | 19,659 | utf_8 | 8a29a785d1558a3774e623ba15e00786 | function varargout = gui_main(varargin)
% MAR M-file for mar.fig
% MAR, by itself, creates a new MAR or raises the existing
% singleton*.
%
% H = MAR returns the handle to a new MAR or the handle to
% the existing singleton*.
%
% MAR('CALLBACK',hObject,eventData,handles,...) calls the local
% ... |
github | Aleman-Z/CorticoHippocampal-master | gui_new_experiment.m | .m | CorticoHippocampal-master/GUI/gui_new_experiment.m | 8,488 | utf_8 | 27b4d457a5ad8c4722899fc41d98d0b0 | function varargout = gui_new_experiment(varargin)
% GUI_NEW_EXPERIMENT MATLAB code for gui_new_experiment.fig
% GUI_NEW_EXPERIMENT, by itself, creates a new GUI_NEW_EXPERIMENT or raises the existing
% singleton*.
%
% H = GUI_NEW_EXPERIMENT returns the handle to a new GUI_NEW_EXPERIMENT or the handle to
%... |
github | Aleman-Z/CorticoHippocampal-master | baseline_norm.m | .m | CorticoHippocampal-master/Spectral_Normalization/baseline_norm.m | 393 | utf_8 | 2ce407f3cf9d5ad7bdce9da53b179f67 |
function [achis]=baseline_norm(freq1,w)
%%Average trials
TF=freq1.powspctrm;
TF=squeeze(mean(TF,1));
TF=squeeze(TF(w,:,:));
TFt=freq1.time;
tind=([-1 -0.5]);
% ind1=find(TFt==tind(1));
% ind2=find(TFt==tind(2));
ind1=find((ismembertol(TFt,tind(1))));
ind2=find((ismembertol(TFt,tind(2))));
FF=mean(squeeze(TF(:,ind... |
github | Aleman-Z/CorticoHippocampal-master | select_trial.m | .m | CorticoHippocampal-master/Object space task/select_trial.m | 775 | utf_8 | 4a10d338bc79493b2fc6f0dcbd1a2d56 |
function [A,str2]=select_trial(str,Rat)
% A = dir(cd);
% A={A.name};
A=getfolder;
aver=cellfun(@(x) strfind(x,str),A,'UniformOutput',false);
aver=cellfun(@(x) length(x),aver,'UniformOutput',false);
aver=cell2mat(aver);
A=A(find(aver));
A=A.';
% %% Removes the PNG files.
% str='PNG';
% % B = dir(cd);
% % B={B.na... |
github | Aleman-Z/CorticoHippocampal-master | data_lisa.m | .m | CorticoHippocampal-master/Object space task/data_lisa.m | 4,059 | utf_8 | ff89275104728a49771271c18cfab5b9 | %%
function data_lisa(num,acer)
str1=cell(5,1);
if acer==0
str1{1,1}='/media/raleman/My Book/ObjectSpace/rat_1/study_day_2_OR/post_trial1_2017-09-25_11-26-43';
str1{2,1}='/media/raleman/My Book/ObjectSpace/rat_1/study_day_2_OR/post_trial2_2017-09-25_12-17-49';
str1{3,1}='/media/raleman/My Book/ObjectSpace/... |
github | Aleman-Z/CorticoHippocampal-master | meth_selection.m | .m | CorticoHippocampal-master/Ripple_selection/meth_selection.m | 4,073 | utf_8 | 713c17f3c898ce7006eb2d73d7527aae | %Methods of ripples selection
function [sig1,sig2,ripple,cara,veamos,RipFreq2,timeasleep,ti,vec_nrem, vec_trans ,vec_rem,vec_wake,labels,transitions,transitions2,ripples_times,riptable,chtm,CHTM]=meth_selection(meth,level,notch,Rat,datapath,nFF,acer,iii,w,rat26session3,base,rat27session3)
switch meth
case 1... |
github | Aleman-Z/CorticoHippocampal-master | stats_between_cfc.m | .m | CorticoHippocampal-master/Cross_Frequency/stats_between_cfc.m | 1,242 | utf_8 | f0e7c07e9634a2f0fb7324193ed00590 | %%
function [stats]=stats_between_cfc(freq1,freq2,label1,w)
cfg = [];
cfg.latency = [30 100]; % time of interest (exclude baseline: it doesn't make sense to compute statistics on a region we expect to be zero)
cfg.method = 'montecarlo';
cfg.statistic = 'ft_statfun_indepsamplesT';
cfg.correct... |
github | Aleman-Z/CorticoHippocampal-master | ft_crossfrequencyanalysis.m | .m | CorticoHippocampal-master/Cross_Frequency/ft_crossfrequencyanalysis.m | 12,538 | utf_8 | a1943ecc311520e5d729a7ae47f380db | function crossfreq = ft_crossfrequencyanalysis(cfg, freqlow, freqhigh)
% FT_CROSSFREQUENCYANALYSIS performs cross-frequency analysis
%
% Use as
% crossfreq = ft_crossfrequencyanalysis(cfg, freq)
% crossfreq = ft_crossfrequencyanalysis(cfg, freqlo, freqhi)
%
% The input data should be organised in a structure as ob... |
github | Aleman-Z/CorticoHippocampal-master | pac.m | .m | CorticoHippocampal-master/Cross_Frequency/pac.m | 14,805 | utf_8 | 28fe5502609bbcb542fc4e92c8d503a1 | % pac() - compute phase-amplitude coupling (power of first input
% correlation with phase of second). There is no graphical output
% to this function.
%
% Usage:
% >> pac(x,y,srate);
% >> [coh,timesout,freqsout1,freqsout2,cohboot] ...
% = pac(x,y,srate,'key1', 'val1', 'key2', val... |
github | Aleman-Z/CorticoHippocampal-master | load_open_ephys_data_faster.m | .m | CorticoHippocampal-master/Load_ephys/load_open_ephys_data_faster.m | 7,995 | utf_8 | 753aa8b365dfc6fced7ad632290b0f24 | function [data, timestamps, info] = load_open_ephys_data_faster(filename, varargin)
%
% [data, timestamps, info] = load_open_ephys_data(filename, [outputFormat])
%
% Loads continuous, event, or spike data files into Matlab.
%
% Inputs:
%
% filename: path to file
% outputFormat: (optional) If omitted, contin... |
github | Aleman-Z/CorticoHippocampal-master | load_open_ephys_data.m | .m | CorticoHippocampal-master/Load_ephys/load_open_ephys_data.m | 20,184 | utf_8 | 9344c2dcff444974b5cb51cf8356c985 | function [data, timestamps, info] = load_open_ephys_data(filename,varargin)
%
% [data, timestamps, info] = load_open_ephys_data(filename)
% [data, timestamps, info] = load_open_ephys_data(filename,'Indices',ind)
%
% Loads continuous, event, or spike data files into Matlab.
%
% Inputs:
%
% filename: path to file... |
github | Aleman-Z/CorticoHippocampal-master | stats_between_trials10.m | .m | CorticoHippocampal-master/Stats/stats_between_trials10.m | 1,247 | utf_8 | 5aa44f08f7f316efa8190a22d87ab7db | %%
function [stats]=stats_between_trials10(freq1,freq2,label1,w)
cfg = [];
cfg.latency = [-10 10]; % time of interest (exclude baseline: it doesn't make sense to compute statistics on a region we expect to be zero)
cfg.method = 'montecarlo';
cfg.statistic = 'ft_statfun_indepsamplesT';
cfg.co... |
github | Aleman-Z/CorticoHippocampal-master | stats_high2.m | .m | CorticoHippocampal-master/Stats/stats_high2.m | 3,642 | utf_8 | d2be4e040001bca14c70324f87fbe664 | %%
function [zmap]=stats_high2(freq3,freq4)
%ntrials=size(freq3.powspctrm,1);
ntrials=1;
%Requires turning NaN into zeros.
% no1=freq3.powspctrm;
% no2=freq4.powspctrm;
no1=freq3;
no2=freq4;
no1(isnan(no1))=0;
no2(isnan(no2))=0;
%%
% freq3.powspctrm=no1;
% freq4.powspctrm=no2;
freq3=no1;
freq4=no2;
%% statistics via... |
github | Aleman-Z/CorticoHippocampal-master | stats_between_trials.m | .m | CorticoHippocampal-master/Stats/stats_between_trials.m | 1,243 | utf_8 | 003a2db080bbf2d57506abac11b32600 | %%
function [stats]=stats_between_trials(freq1,freq2,label1,w)
cfg = [];
cfg.latency = [-1 1]; % time of interest (exclude baseline: it doesn't make sense to compute statistics on a region we expect to be zero)
cfg.method = 'montecarlo';
cfg.statistic = 'ft_statfun_indepsamplesT';
cfg.correc... |
github | Aleman-Z/CorticoHippocampal-master | permutationTest.m | .m | CorticoHippocampal-master/Stats/permutationTest.m | 6,594 | utf_8 | 6226faa947aba893c5b470c128f9fc48 | % [p, observeddifference, effectsize] = permutationTest(sample1, sample2, permutations [, varargin])
%
% In:
% sample1 - vector of measurements representing one condition
% sample2 - vector of measurements representing a second condition
% permutations - the number of permutations
%
% Optional (name-v... |
github | Aleman-Z/CorticoHippocampal-master | stats_gc.m | .m | CorticoHippocampal-master/Stats/stats_gc.m | 3,553 | utf_8 | 7076361fc3aa8a22c55d34a5ad9714ac | %% Seems useless. Check carefully.
function [zmap]=stats_gc(gr1,gr2)
ntrials=373;
%Requires turning NaN into zeros.
no1=gr1(:,1:ntrials);
no2=gr2(:,1:ntrials);
no1(isnan(no1))=0;
no2(isnan(no2))=0;
%%
gr1=no1;
gr2=no2;
%% statistics via permutation testing
% p-value
pval = 0.05;
% convert p-value to Z value
zval = ... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_27.m | .m | CorticoHippocampal-master/Pre_midterm/plot_inter_conditions_27.m | 14,748 | utf_8 | 8702a487891868e6a1975f49958835e0 | %This one requires running data from Non Learning condition
function plot_inter_conditions_27(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,selectripples,acer,timecell_nl,P1_nl,P2_nl,p_nl,q_nl)
%function plot_inter_conditions_27(Rat,nFF,level... |
github | Aleman-Z/CorticoHippocampal-master | generate500.m | .m | CorticoHippocampal-master/Old_files/generate500.m | 585 | utf_8 | ce8f06e9aba63819e4ed9e55b86cb622 |
function [p3,p5,cellx,cellr,cfs,f]=generate500(carajo,veamos, Bip17,S17,label1,label2)
fn=1000;
figure('units','normalized','outerposition',[0 0 1 1])
[TI,TN, cellx,cellr,to,tu]=win500(carajo,veamos,Bip17,S17);
[cellx,cellr]=clean(cellx,cellr);
% cellx{37}=cellx{36};
% cellr{37}=cellr{36};
[p3 p4]=eta500(cellx,cellr);... |
github | Aleman-Z/CorticoHippocampal-master | getenvel.m | .m | CorticoHippocampal-master/Old_files/getenvel.m | 598 | utf_8 | b9a3fe3fd94de4e13ad949491967bede | %% Envelope of q.
function [ww]=getenvel(q)
ww=cell(1,length(q));
for i=1:length(q)
w=q{i};
for j=1:4
envel=w(j,:);
ev(j,:)=envelope1(envel);
end
ww{i}=ev;
end
end
% %
% % %%
% % t=linspace(-2,2,length(checa));
% % plot(t,envelope1(checa,1000)); hold on;
% % plot(t,checa)
% % title('Envelope of ri... |
github | Aleman-Z/CorticoHippocampal-master | getenvelbipolar.m | .m | CorticoHippocampal-master/Old_files/getenvelbipolar.m | 192 | utf_8 | 6cc37bcbdc2bbe39e6748c464ed65241 | %% Envelope of q.
function [ww]=getenvelbipolar(q)
ww=cell(1,length(q));
for i=1:length(q)
w=q{i};
for j=1:3
envel=w(j,:);
ev(j,:)=envelope1(envel);
end
ww{i}=ev;
end
end
|
github | Aleman-Z/CorticoHippocampal-master | generate1000.m | .m | CorticoHippocampal-master/Old_files/generate1000.m | 575 | utf_8 | 4af37776c0e735ffed7cb1d5a881afdc |
function [p3, p5,cellx,cellr]=generate1000(carajo,veamos, Bip17,S17,label1,label2)
fn=1000;
figure('units','normalized','outerposition',[0 0 1 1])
[TI,TN, cellx,cellr,to,tu]=win1000(carajo,veamos,Bip17,S17);
[cellx,cellr]=clean(cellx,cellr);
% cellx{37}=cellx{36};
% cellr{37}=cellr{36};
[p3 p4]=eta1000(cellx,cellr);
m... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_prueba.m | .m | CorticoHippocampal-master/Figures/plot_inter_prueba.m | 18,485 | utf_8 | b3f5ad90e17b03fa05b58b616251da68 | %This one requires running data from Non Learning condition
function [h]=plot_inter_prueba(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline,FiveHun,meth,rat26... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_33_cluster.m | .m | CorticoHippocampal-master/Figures/plot_inter_conditions_33_cluster.m | 20,613 | utf_8 | 53b3206829f4144aa17fb17cd8c682e1 | %This one requires running data from Non Learning condition
function [h]=plot_inter_conditions_33_cluster(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline,Fiv... |
github | Aleman-Z/CorticoHippocampal-master | plot_traces.m | .m | CorticoHippocampal-master/Figures/Figure2/plot_traces.m | 2,071 | utf_8 | 3564511915722ae505d5f2c0bb199583 | % sig2 %63x1 Raw signal
% ti % 63x1 times
%
% veamos %Epochs where ripples were detected wrt sig2. 58x1
% cara %58x3; sample where they occur
% cara_times %58x3; times where they occur
%%
function plot_traces(sig2,veamos,cara,ti,amp_vec,iii,labelconditions,chtm,include_hpc,cara_hpc,veamos_hpc,chtm_hpc)
% amp_vec=[... |
github | Aleman-Z/CorticoHippocampal-master | merge_blocks.m | .m | CorticoHippocampal-master/Figures/Figure2/merge_blocks.m | 2,442 | utf_8 | 0380e2b910b01756e7b8b97721a9b2d3 |
function merge_blocks(rat,fq_range)
%Inputs:
%rat number
%frequency range
if fq_range==30
% Load saved figures
a=hgload('30Hz_block1_Hippocampus.fig');
b=hgload('30Hz_block2_Hippocampus.fig');
c=hgload('30Hz_block3_Hippocampus.fig');
end
if fq_range==300
% Load saved figures
a=hgload('30... |
github | Aleman-Z/CorticoHippocampal-master | stats_vs_nl.m | .m | CorticoHippocampal-master/Figures/Figure3/stats_vs_nl.m | 19,438 | utf_8 | 1c93b28f7726688a3a45a36aa422441e | %This one requires running data from Non Learning condition
function [h]=stats_vs_nl(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,cara_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline,FiveHun,meth,rat26session3... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_high_improve.m | .m | CorticoHippocampal-master/Figures/Figure3/plot_inter_high_improve.m | 11,372 | utf_8 | d9e296cf5061412e1653e566bf092543 | %This one requires running data from Non Learning condition
function plot_inter_high_improve(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline,FiveHun,meth,rat... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_33.m | .m | CorticoHippocampal-master/Figures/Figure3/plot_inter_conditions_33.m | 22,436 | utf_8 | 6625779897661565ba7447358c16edfc | %This one requires running data from Non Learning condition
function [h]=plot_inter_conditions_33(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,cara_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline,FiveHun,meth,... |
github | Aleman-Z/CorticoHippocampal-master | gui_parameters.m | .m | CorticoHippocampal-master/Figures/Figure3/gui_parameters.m | 16,398 | utf_8 | c68a674752851c6b9b949e563a721005 | function varargout = gui_parameters(varargin)
% GUI_PARAMETERS MATLAB code for gui_parameters.fig
% GUI_PARAMETERS, by itself, creates a new GUI_PARAMETERS or raises the existing
% singleton*.
%
% H = GUI_PARAMETERS returns the handle to a new GUI_PARAMETERS or the handle to
% the existing singleton... |
github | Aleman-Z/CorticoHippocampal-master | axis_among_conditions2.m | .m | CorticoHippocampal-master/Figures/Figure3/axis_among_conditions2.m | 10,860 | utf_8 | 6eaf2d44e582671f7f9dccb071525271 | % close all
% clear all
function axis_among_conditions2(Rat,selpath,ldura)
%acer=1;
labelconditions=[
{
'Baseline'}
'PlusMaze'
'Novelty'
'Foraging'
];
c = categorical(labelconditions);
labelconditions=[
{
'Baseline'}
'PlusMaze'
'Novelty'
'Foraging'
... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_33_high.m | .m | CorticoHippocampal-master/Figures/Figure3/plot_inter_conditions_33_high.m | 17,234 | utf_8 | e0938e176eb984180648f5ab5d37be8c | %This one requires running data from Non Learning condition
function [h]=plot_inter_conditions_33_high(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline,FiveHu... |
github | Aleman-Z/CorticoHippocampal-master | smaller_window.m | .m | CorticoHippocampal-master/Figures/Figure3/smaller_window.m | 362 | utf_8 | 6927e7b5f794fa2aab6cadd6035b43ef | %freq3
function [mdam, sdam]=smaller_window(freq3,w)
dam=((squeeze(mean(squeeze(freq3.powspctrm(:,w,:,1+50:end-50)),1)))); %Average all ripples.
mdam=mean(dam(:)); %Mean value
sdam=std(dam(:));
% FG3=freq3;
% FG3.time=[-.05:.001:.05];
% FG3.powspctrm=freq3.powspctrm(:,:,:,1+50:end-50);
%
% [ zmin100... |
github | Aleman-Z/CorticoHippocampal-master | findmultiplets.m | .m | CorticoHippocampal-master/Ripple_detection/findmultiplets.m | 2,643 | utf_8 | 718c85952a92bb65f24f04becbddca9b | %MULTIPLETS DETECTION (Consecutive ripples)
function [M_multiplets, Mx_multiplets]=findmultiplets(Mx)
%Input: Mx contains the timestamps of the detected ripples peak.
%This is output M of the findripples function.
% We take the timestamps of the ripple peaks and compute their difference.
% If the ripples are closer t... |
github | Aleman-Z/CorticoHippocampal-master | clean.m | .m | CorticoHippocampal-master/Ripple_detection/clean.m | 194 | utf_8 | 80e38d95eaaea683902bf4d93a4c0b38 |
function [ncellx,ncellr]=clean(cellx,cellr)
clear ncellx
notnan=cellfun('length',cellx);
estos=(notnan~=1);
ncellx=cellx(estos,1);
ncellr=cellr(estos,1);
ncellx=ncellx.';
ncellr=ncellr.';
end |
github | Aleman-Z/CorticoHippocampal-master | generate2.m | .m | CorticoHippocampal-master/Ripple_detection/generate2.m | 330 | utf_8 | ca599d116e59579a4b1bad29d7c7cc65 | %Hippocampus Bipolar
%Hippocampus Monopolar
%function [p3, p5,cellx,cellr]=generate2(cara,veamos, Bip17,S17,ro)
function [cellx,cellr]=generate2(cara,veamos, Bip17,S17,ro)
%Generates windows
[cellx,cellr]=win(cara,veamos,Bip17,S17,ro);
%Clears nans
[cellx,cellr]=clean(cellx,cellr);
% [p3 ,p5]=eta2(cellx,cellr,ro,100... |
github | Aleman-Z/CorticoHippocampal-master | getwin2.m | .m | CorticoHippocampal-master/Ripple_detection/getwin2.m | 2,235 | utf_8 | b9a624aab5c5b2cd8bb0a4bd64e044ac | %function [p,q,timecell,Q,P1,P2]=getwin2(cara,veamos,sig1,sig2,ro)
function [p,q,Q,sos]=getwin2(cara,veamos,sig1,sig2,ro)
%,ripple,thr
% fn=1000;
% isempty(sig2{2})
i=1;
%allscreen()
%[p1, p4, z1, z4]=generate2(cara,veamos, sig1{i},sig2{i},ro);
[z1, z4]=generate2(cara,veamos, sig1{i},sig2{i},ro);
i=3;
%allscreen()
... |
github | Aleman-Z/CorticoHippocampal-master | gc_paper_single.m | .m | CorticoHippocampal-master/Ideas_testing/gc_paper_single.m | 11,420 | utf_8 | 6e210c10b4cb1f2f288b1754ce9c6754 |
function [granger,granger1]=gc_paper_single(q,timecell,label,ro,ord,freqrange,nu)
fn=1000;
data1.trial=q(nu);
data1.time= timecell; %Might have to change this one
data1.fsample=fn;
data1.label=cell(3,1);
data1.label{1}='Hippocampus';
data1.label{2}='Parietal';
data1.label{3}='PFC';
%data1.label{4}='Reference';
%Para... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_filtering.m | .m | CorticoHippocampal-master/Ideas_testing/plot_inter_conditions_filtering.m | 12,699 | utf_8 | 30447fb28e34ab95fad3ce0e601dbe17 | %This one requires running data from Non Learning condition
function [h]=plot_inter_conditions_filtering(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer)
% % % % % % % % % % % % % % % % ... |
github | Aleman-Z/CorticoHippocampal-master | ripples_per_stage.m | .m | CorticoHippocampal-master/Ideas_testing/ripples_per_stage.m | 470 | utf_8 | e388e3fbf0bd6d4b7e26951812c32687 | % [tr2]=sort_scoring(transitions,3);
% tr2=tr2(:,2:3);
%%
% x=tr2;
function ripples_per_stage(x,stage,plotting)
%ripples_per_stage(x)
%For plotting, plotting=1. Else use plotting=0.
nrow = size(x,1);
nline = repmat((stage.*ones(1,length(x)))',1,2);
% plot(x',nline','o-')
if plotting==1
plot(x'/60/60,nline... |
github | Aleman-Z/CorticoHippocampal-master | plot_test_spindles.m | .m | CorticoHippocampal-master/Ideas_testing/plot_test_spindles.m | 22,626 | utf_8 | 0c024e56455fe8d665e2b4c4cfe36d1d | %This one requires running data from Non Learning condition
function [h]=plot_test_spindles(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline,FiveHun,meth,rat2... |
github | Aleman-Z/CorticoHippocampal-master | ft_getminmax_OUTDATED.m | .m | CorticoHippocampal-master/Ideas_testing/ft_getminmax_OUTDATED.m | 22,617 | utf_8 | 6b51df1b7dcd4f59f90e88458cce313c | function [ zmin] = ft_getminmax_OUTDATED(cfg, data)
%function [cfg] = ft_singleplotTFR(cfg, data)
% FT_SINGLEPLOTTFR plots the time-frequency representation of power of a
% single channel or the average over multiple channels.
%
% Use as
% ft_singleplotTFR(cfg,data)
%
% The input freq structure should be a a time-fr... |
github | Aleman-Z/CorticoHippocampal-master | generate2_new.m | .m | CorticoHippocampal-master/Ideas_testing/generate2_new.m | 354 | utf_8 | 8cfbff66a7bba6d8e89a6b7ef2ba1515 | %Hippocampus Bipolar
%Hippocampus Monopolar
%function [p3, p5,cellx,cellr,cfs,f]=generate2(carajo,veamos, Bip17,S17,label1,label2,Num)
function [cellx,cellr]=generate2_new(carajo,veamos, Bip17,S17,label1,label2,Num)
fn=1000;
%Generates windows
[cellx,cellr]=win_new(carajo,veamos,Bip17,S17,Num);
%Clears nans
% [cellx... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_33_TEST.m | .m | CorticoHippocampal-master/Ideas_testing/plot_inter_conditions_33_TEST.m | 12,603 | utf_8 | b3ba74de00c7c083ee226c557dc1cede | %This one requires running data from Non Learning condition
function [h]=plot_inter_conditions_33_TEST(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer)
% % % % % % % % % % % % % % % % % ... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_cohen.m | .m | CorticoHippocampal-master/Ideas_testing/plot_inter_cohen.m | 18,429 | utf_8 | f2214a1523c0875c527f9279b2153fa5 | %This one requires running data from Non Learning condition
function [h]=plot_inter_cohen(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline,FiveHun,meth,rat26s... |
github | Aleman-Z/CorticoHippocampal-master | plot_inter_conditions_mergebaselines.m | .m | CorticoHippocampal-master/Ideas_testing/plot_inter_conditions_mergebaselines.m | 14,731 | utf_8 | 6d8536abe8287dcd4fc58286df64dbd5 | %This one requires running data from Non Learning condition
function [h]=plot_inter_conditions_mergebaselines(Rat,nFF,level,ro,w,labelconditions,label1,label2,iii,P1,P2,p,timecell,sig1_nl,sig2_nl,ripple_nl,carajo_nl,veamos_nl,CHTM2,q,timeasleep2,RipFreq3,RipFreq2,timeasleep,ripple,CHTM,acer,block_time,NFF,mergebaseline... |
github | Aleman-Z/CorticoHippocampal-master | no_ripples.m | .m | CorticoHippocampal-master/Ideas_testing/no_ripples/no_ripples.m | 2,338 | utf_8 | 53b7298d606de347b9569189461701c4 |
%Vector with times
% for k=1:length(ti)-1
% caco=ti(1,k);
%
% if max(caco>S{1})&& (caco<E{1});
% end
% end
function [chec,chec2,checQ]=no_ripples(ti,S,E,ro,signal_array,signal_array2,signal_arrayQ)
% Find times with no ripples
caco=ti;
cao=signal_array;
cao2=signal_array2;
caoQ=signal_arrayQ;
for L=1:len... |
github | Aleman-Z/CorticoHippocampal-master | ps_rip2.m | .m | CorticoHippocampal-master/Ideas_testing/scatter_plots/ps_rip2.m | 358 | utf_8 | fbbeb09aa26b51f4c4ac122f01e0d83c |
function [vecpow,vecpow2]=ps_rip2(p,w)
[ran]=rip_select(p);
p=p(ran);
for j=1:length(p)
%Hippocampus
F = fft(p{j}(1,:));
pow = F.*conj(F);
vecpow(1,j)=sum(pow);
%Other brain area
F2 = fft(p{j}(w,:)); % w is either 2 or 3
pow2 = F2.*conj(F2);
vecpo... |
github | Aleman-Z/CorticoHippocampal-master | ps_rip.m | .m | CorticoHippocampal-master/Ideas_testing/scatter_plots/ps_rip.m | 180 | utf_8 | 3a4098a567980faa53c1efe1aa24b010 |
function [vecpow]=ps_rip(p,w)
[ran]=rip_select(p);
p=p(ran);
for j=1:length(p)
F = fft(p{j}(w,:));
pow = F.*conj(F);
vecpow(1,j)=sum(pow);
end
end |
github | Aleman-Z/CorticoHippocampal-master | getsignal.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/getsignal.m | 227 | utf_8 | b45d7863f88d22dd5f1b6c0b2d047669 |
function [sig]=getsignal(Sx,Ex,ti,V,k)
if ~isempty(Sx{k})
for j=1:length(Sx{k})
[~,ts]=min(abs(ti{k}-Sx{k}(j)));
[~,tend]=min(abs(ti{k}-Ex{k}(j)));
sig{j}=V{k}(ts:tend);
end
else
sig=[];
end
end
|
github | Aleman-Z/CorticoHippocampal-master | granger_plot.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/granger_plot.m | 1,734 | utf_8 | 10330b848dff4f95d6fef765835898fe |
function granger_plot(g,g_f,labelconditions,freqrange)
%Plots granger values across frequencies
allscreen()
myColorMap=StandardColors;
F= [1 2; 1 3; 2 3] ;
%Labels
lab=cell(6,1);
lab{2}='PFC -> PAR';
lab{1}='PAR -> PFC';
lab{4}='HPC -> PAR';
lab{3}='PAR -> HPC';
lab{6}='HPC -> PFC';
lab{5}='PFC -> HPC';
%
for... |
github | Aleman-Z/CorticoHippocampal-master | gui_finddeltawavesZugaro.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/gui_finddeltawavesZugaro.m | 3,478 | utf_8 | 9fde62e74dbf0e1c1841aec353799d98 | % gui_finddeltawavesZugaro.m
function [deltaWave_count,deltaFreq,delta_duration,Mx,timeasleep,sig,Ex,Sx, DeltaWaves, ti_cont,duration_epoch_cumsum]=gui_finddeltawavesZugaro(CORTEX,states,xx,multiplets,fn, thresholds)
%Band pass filter design:
Wn1=[0.3/(fn/2) 300/(fn/2)];
[b2,a2] = butter(3,Wn1); %0.3 to 3... |
github | Aleman-Z/CorticoHippocampal-master | co_hfo.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/co_hfo.m | 367 | utf_8 | abe24b3c6e164e3ccc3b4ec1dbe931d4 |
function [co_vec1,co_vec2]=co_hfo(a,N)%HPC,Cortex
co_vec1=[];%HPC
co_vec2=[];%Cortex
for index_hfo=1:length(N);
n=N(index_hfo);
[val,idx]=min(abs(a-n));
minVal=a(idx);
%Diference
df=abs(minVal-n);
%Coocur if closer to 50ms
if df<=0.050
co_vec1=[co_vec1 minVal];
... |
github | Aleman-Z/CorticoHippocampal-master | getsignal_spec.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/getsignal_spec.m | 840 | utf_8 | 42cbb39c1c33c6a6b779ac15b2f611a4 |
function [sig,p,q,cont,sig_pq]=getsignal_spec(Sx,Ex,ti,Mono,k,Mx,V,Mono2,V2,Mono3,V3,ro)
cont=0;
if ~isempty(Sx{k})
for j=1:length(Sx{k})
ts=find(ti{k}==Sx{k}(j));
tend=find(ti{k}==Ex{k}(j));
sig{j}=Mono{k}(ts:tend);
if nargin>5
%Ripple-centered window.
tm=find(ti{k}==Mx{k}(j));
... |
github | Aleman-Z/CorticoHippocampal-master | getgranger.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/getgranger.m | 682 | utf_8 | a18e5e27efdb45f1d2401a6ae8194b6b |
function [granger,granger1,granger_cond,granger_cond_multi]=getgranger(q,timecell,label,ro,ord,freqrange,fn)
%Computes multiple types of granger causality.
%Mainly parametric and Non parametric.
data1.trial=q;
data1.time= timecell;
data1.fsample=fn;
data1.label=cell(3,1);
data1.label{1}='PAR';
data1.label{2}='PFC'... |
github | Aleman-Z/CorticoHippocampal-master | create_timecell.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/create_timecell.m | 193 | utf_8 | 7503e1d7a1cfc26c6b302762f594593b |
function [C]=create_timecell(ro,leng,fn)
%create_timecell(ro,leng)
%iNPUTS:
%ro:1200
%leng:length(p)
%fn=1000;
vec=-ro/fn:1/fn:ro/fn;
C = cell(1, leng);
C(:) = {vec};
end
|
github | Aleman-Z/CorticoHippocampal-master | stats_high.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/stats_high.m | 3,495 | utf_8 | 2daba78b7181f2ba7e0924361fbc822c |
function [zmap]=stats_high(freq1,freq2,w)
ntrials=size(freq1.powspctrm,1);
%Requires converting NaNs values into zeros.
no1=freq1.powspctrm;
no2=freq2.powspctrm;
no1(isnan(no1))=0;
no2(isnan(no2))=0;
%%
freq1.powspctrm=no1;
freq2.powspctrm=no2;
%% statistics via permutation testing
% p-value
pval = 0.05;
% convert ... |
github | Aleman-Z/CorticoHippocampal-master | single_hfos_mx.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/single_hfos_mx.m | 188 | utf_8 | fe47b76b8cde0084e8cd42f91e414cbe |
function [ach,ach2]=single_hfos_mx(cohfos1,ach,ach2)
for k=1:length(cohfos1)
ach2(find(ach==cohfos1(k)))=[];
ach(find(ach==cohfos1(k)))=[];
end
end |
github | Aleman-Z/CorticoHippocampal-master | co_hfo_delta_spindle.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/co_hfo_delta_spindle.m | 410 | utf_8 | fc7c576e1535dc2170ad872fd46f11eb |
function [co_vec1,co_vec2]=co_hfo_delta_spindle(a,N)%delta,spindle
co_vec1=[];%delta
co_vec2=[];%spindle
for index_hfo=1:length(N);
n=N(index_hfo);
[val,idx]=min(abs(a-n));
minVal=a(idx);
%Diference
df=(minVal-n);
%Coocur if within -0.5 to 1 sec difference
if df<=1 & df>=... |
github | Aleman-Z/CorticoHippocampal-master | small_window.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/small_window.m | 824 | utf_8 | b3d2f6add0bf4a29768d38b84f3a15cf |
function [mdam,mdam2,mdam3,mdam4]=small_window(freq2,w,win_size)
%Compute mean power value of window for different frequency bands
dam=((squeeze(mean(squeeze(freq2.powspctrm(:,w,:,1+win_size:end-win_size)),1)))); %Average all events.
mdam=mean(dam(:)); %Mean value
freqs=freq2.freq;
%100 to 150 Hz
n1=sum(freqs<=150... |
github | Aleman-Z/CorticoHippocampal-master | isivector.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/FMAtoolbox_functions/isivector.m | 2,130 | iso_8859_13 | fb6d2426defdb32c4121d3ed9e0d6ef8 | %isivector - Test if parameter is a vector of integers satisfying an optional list of tests.
%
% USAGE
%
% test = isivector(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests (see examples below)
%
% EXAMPLES
%
% % Test if x is a vector of doubles
% ... |
github | Aleman-Z/CorticoHippocampal-master | isiscalar.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/FMAtoolbox_functions/isiscalar.m | 1,624 | iso_8859_13 | cfd172b108f357be076ab239961c52c9 | %isiscalar - Test if parameter is a scalar (integer) satisfying an optional list of tests.
%
% USAGE
%
% test = isiscalar(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests
%
% EXAMPLES
%
% % Test if x is a scalar (double)
% isiscalar(x)
%
% % ... |
github | Aleman-Z/CorticoHippocampal-master | isdvector.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/FMAtoolbox_functions/isdvector.m | 2,083 | iso_8859_13 | b6c923bf5b7013b5ccdf39ab51441db1 | %isdvector - Test if parameter is a vector of doubles satisfying an optional list of tests.
%
% USAGE
%
% test = isdvector(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests (see examples below)
%
% EXAMPLES
%
% % Test if x is a vector of doubles
% ... |
github | Aleman-Z/CorticoHippocampal-master | isdscalar.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/FMAtoolbox_functions/isdscalar.m | 1,576 | iso_8859_13 | b57157fcad5380ccefe965b9d5f2cba0 | %isdscalar - Test if parameter is a scalar (double) satisfying an optional list of tests.
%
% USAGE
%
% test = isdscalar(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests
%
% EXAMPLES
%
% % Test if x is a scalar (double)
% isdscalar(x)
%
% % T... |
github | Aleman-Z/CorticoHippocampal-master | isastring.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/FMAtoolbox_functions/isastring.m | 1,042 | iso_8859_13 | ccf515e97f4f9f13a98dec5005717419 | %isastring - Test if parameter is an (admissible) character string.
%
% USAGE
%
% test = isastring(x,string1,string2,...)
%
% x item to test
% string1... optional list of admissible strings
%
% SEE ALSO
%
% See also isdmatrix, isdvector, isdscalar, isimatrix, isivector, isiscalar.
%
% Co... |
github | Aleman-Z/CorticoHippocampal-master | isdmatrix.m | .m | CorticoHippocampal-master/Fast_and_slow_hfos/subfunctions/FMAtoolbox_functions/isdmatrix.m | 1,958 | iso_8859_13 | c6cf39b50b44f697c7a9f642f6a7a2ab | %isdmatrix - Test if parameter is a matrix of doubles (>= 2 columns).
%
% USAGE
%
% test = isdmatrix(x,test1,test2,...)
%
% x parameter to test
% test1... optional list of additional tests
%
% EXAMPLES
%
% % Test if x is a matrix of doubles
% isdmatrix(x)
%
% % Test if x is a matr... |
github | Aleman-Z/CorticoHippocampal-master | granger_baseline_learning_stats.m | .m | CorticoHippocampal-master/Granger/granger_baseline_learning_stats.m | 3,292 | utf_8 | 3e0a4bb592280ada6757d4907aa46168 |
function granger_baseline_learning_stats(g,g_f,labelconditions,freqrange,GRGRNP,GRGRNP_base,AL)
allscreen()
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> PAR';
lab{2}='PAR -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='PAR -> PFC';
lab{6}='PFC -> PAR';
%
% k=1; %Condition 1.
for j=1:3
... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper3.m | .m | CorticoHippocampal-master/Granger/granger_paper3.m | 1,159 | utf_8 | 71aecb5716ee91350cb2c8b80e41c506 |
function granger_paper3(g,g_f,labelconditions,k)
%allscreen()
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> Parietal';
lab{2}='Parietal -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='Parietal -> PFC';
lab{6}='PFC -> Parietal';
%
% k=1; %Condition 1.
for j=1:3
f=F(j,:);
mmax1=[max(... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper4_stripes.m | .m | CorticoHippocampal-master/Granger/granger_paper4_stripes.m | 2,019 | utf_8 | a14d4d43e63990e4590572ca77bab12e |
function granger_paper4_stripes(g,g_f,labelconditions,freqrange,aver,Xaver)
allscreen()
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> Parietal';
lab{2}='Parietal -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='Parietal -> PFC';
lab{6}='PFC -> Parietal';
%
% k=1; %Condition 1.
for j=1:3
... |
github | Aleman-Z/CorticoHippocampal-master | plot_granger.m | .m | CorticoHippocampal-master/Granger/plot_granger.m | 2,162 | utf_8 | 6ce16c82d18c3e31f12a3620b8d4719f | %% plot_spw
%
% Plot spectral pairwise quantities on a grid
%
% <matlab:open('plot_spw.m') code>
%
%% Syntax
%
% plot_spw(P,fs)
%
%% Arguments
%
% _input_
%
% P matrix of spectral pairwise quantities
% fs sample rate in Hz (default: normalised freq as per routine 'sfreqs')
% frange ... |
github | Aleman-Z/CorticoHippocampal-master | PSI_Analysis.m | .m | CorticoHippocampal-master/Granger/PSI_Analysis.m | 2,417 | utf_8 | 5b85c1d9e1d4e5b065abdaace3827007 | %%
function psi_val=PSI_Analysis(cwt_sig_area_1,cwt_sig_area_2,F)
% Phase-slope index for two signals
%Initialize
% F is the vector of frequencies used to decompose the signal in the
% analytical signal
S_12=zeros(numel(F),1);
S_11=zeros(numel(F),1);
S_22=zeros(numel(F),1);
C_12=zeros(numel(F),1);
C_12_jk=zeros... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper4.m | .m | CorticoHippocampal-master/Granger/granger_paper4.m | 2,194 | utf_8 | 0b710bb53785f560c67158311d418222 |
function granger_paper4(g,g_f,labelconditions,freqrange)
allscreen()
myColorMap=StandardColors;
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
% lab{1}='HPC -> Parietal';
% lab{2}='Parietal -> HPC';
%
% lab{3}='HPC -> PFC';
% lab{4}='PFC -> HPC';
%
% lab{5}='Parietal -> PFC';
% lab{6}='PFC -> Parietal';
lab{2}='PFC -> PAR'... |
github | Aleman-Z/CorticoHippocampal-master | gc_paper.m | .m | CorticoHippocampal-master/Granger/gc_paper.m | 11,941 | utf_8 | 3d43d2a8647413fea38534fc4a1cdf70 |
function [granger,granger1,granger_cond,granger_cond_multi]=gc_paper(q,timecell,label,ro,ord,freqrange,fn)
%fn=1000;
data1.trial=q;
data1.time= timecell; %Might have to change this one
data1.fsample=fn;
data1.label=cell(3,1);
% data1.label{1}='Hippocampus';
% data1.label{2}='Parietal';
% data1.label{3}='PFC';
data1.... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper4_cond.m | .m | CorticoHippocampal-master/Granger/granger_paper4_cond.m | 2,069 | utf_8 | dc8ad22deb0845211b50759db2049b0c |
function granger_paper4_cond(g,g_f,labelconditions,freqrange)
allscreen()
myColorMap=StandardColors;
F= [1 3 5] ;
lab=cell(6,1);
% lab{1}='HPC -> Parietal';
% lab{2}='Parietal -> HPC';
%
% lab{3}='HPC -> PFC';
% lab{4}='PFC -> HPC';
%
% lab{5}='Parietal -> PFC';
% lab{6}='PFC -> Parietal';
%
lab{1}='PFC -> PAR';... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper.m | .m | CorticoHippocampal-master/Granger/granger_paper.m | 1,352 | utf_8 | 82387c68a7ce7186b35c32a25f7b520b |
function granger_paper(granger,granger1,condition)
allscreen()
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> Parietal';
lab{2}='Parietal -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='Parietal -> PFC';
lab{6}='PFC -> Parietal';
for j=1:3
f=F(j,:);
mmax1=[max(squeeze(granger1.grang... |
github | Aleman-Z/CorticoHippocampal-master | pal_test_ft_granger_cond.m | .m | CorticoHippocampal-master/Granger/pal_test_ft_granger_cond.m | 9,187 | utf_8 | becb3859245b08ec4138a92466bbef75 |
%
% This function performs spectrally resolved Granger causality using the
% non-parametric spectral matrix factorization of Wilson, as implemented
% by Dhahama & Rangarajan in sfactorization_wilson. Both standard and
% conditional Granger causality are attempted.
%
% FieldTrip code being used is a recent download zip... |
github | Aleman-Z/CorticoHippocampal-master | granger_baseline_learning.m | .m | CorticoHippocampal-master/Granger/granger_baseline_learning.m | 1,945 | utf_8 | 89faf0775c6a1e6b5bb51f3c8f12c66b |
function granger_baseline_learning(g,g_f,labelconditions,freqrange)
allscreen()
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> PAR';
lab{2}='PAR -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='PAR -> PFC';
lab{6}='PFC -> PAR';
%
% k=1; %Condition 1.
for j=1:3
f=F(j,:);
mmax1=max([ma... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper2.m | .m | CorticoHippocampal-master/Granger/granger_paper2.m | 1,198 | utf_8 | 9142d0b8d47cd3ea797e8e97b5e692c4 |
function granger_paper2(granger,condition)
%allscreen()
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> Parietal';
lab{2}='Parietal -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='Parietal -> PFC';
lab{6}='PFC -> Parietal';
for j=1:3
f=F(j,:);
mmax1=[max(squeeze(granger.grangerspctrm... |
github | Aleman-Z/CorticoHippocampal-master | plot_spw2.m | .m | CorticoHippocampal-master/Granger/plot_spw2.m | 2,132 | utf_8 | bd11dcc87a2a2fad8aa9017d43e1759c | %% plot_spw
%
% Plot spectral pairwise quantities on a grid
%
% <matlab:open('plot_spw.m') code>
%
%% Syntax
%
% plot_spw(P,fs)
%
%% Arguments
%
% _input_
%
% P matrix of spectral pairwise quantities
% fs sample rate in Hz (default: normalised freq as per routine 'sfreqs')
% frange ... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper4_row.m | .m | CorticoHippocampal-master/Granger/granger_paper4_row.m | 2,256 | utf_8 | d7591695a93ac6831958a4dcd1ed4678 |
function granger_paper4_row(g,g_f,labelconditions,freqrange,wd)
allscreen()
myColorMap=StandardColors;
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> Parietal';
lab{2}='Parietal -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='Parietal -> PFC';
lab{6}='PFC -> Parietal';
%
% k=1; %Condition 1.
... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper4_with_stripes.m | .m | CorticoHippocampal-master/Granger/granger_paper4_with_stripes.m | 2,376 | utf_8 | dae7509b8a54fb3066f76ef987717dfe |
function granger_paper4_with_stripes(g,g_f,labelconditions,freqrange)
allscreen()
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> Parietal';
lab{2}='Parietal -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='Parietal -> PFC';
lab{6}='PFC -> Parietal';
%
% k=1; %Condition 1.
for j=1:3
f=F... |
github | Aleman-Z/CorticoHippocampal-master | granger_paper4_with_stripes_dual.m | .m | CorticoHippocampal-master/Granger/granger_paper4_with_stripes_dual.m | 2,389 | utf_8 | cb5a5e0f0ad87c2edb4fe666c2c8b88d |
function granger_paper4_with_stripes_dual(g,g_f,labelconditions,freqrange)
allscreen()
F= [1 2; 1 3; 2 3] ;
lab=cell(6,1);
lab{1}='HPC -> Parietal';
lab{2}='Parietal -> HPC';
lab{3}='HPC -> PFC';
lab{4}='PFC -> HPC';
lab{5}='Parietal -> PFC';
lab{6}='PFC -> Parietal';
%
% k=1; %Condition 1.
for j=1:3
... |
github | Aleman-Z/CorticoHippocampal-master | matcorr.m | .m | CorticoHippocampal-master/ICA/matcorr.m | 5,853 | utf_8 | d0e3089eda2df7656eb20c1f476894f8 | % matcorr() - Find matching rows in two matrices and their corrs.
% Uses the Hungarian (default), VAM, or maxcorr assignment methods.
% (Follow with matperm() to permute and sign x -> y).
%
% Usage: >> [corr,indx,indy,corrs] = matcorr(x,y,rmmean,method,weighting);
%
% Inputs:
% x = first i... |
github | Aleman-Z/CorticoHippocampal-master | matperm.m | .m | CorticoHippocampal-master/ICA/matperm.m | 2,919 | utf_8 | 697c96bef1109a7011a0d4781bfbedc3 | % matperm() - transpose and sign rows of x to match y (run after matcorr() )
%
% Usage: >> [permx indperm] = matperm(x,y,indx,indy,corr);
%
% Inputs:
% x = first input matrix
% y = matrix with same number of columns as x
% indx = column containing row indices for x (from matcorr())
% indy = column co... |
github | minjiang/transferlearning-master | MyTJM.m | .m | transferlearning-master/code/MyTJM.m | 3,517 | utf_8 | ce3d34bcb6ed86fc570f1f4f818ff2aa | function [acc,acc_list,A] = MyTJM(X_src,Y_src,X_tar,Y_tar,options)
% Inputs:
%%% X_src :source feature matrix, ns * m
%%% Y_src :source label vector, ns * 1
%%% X_tar :target feature matrix, nt * m
%%% Y_tar :target label vector, nt * 1
%%% options:option struct
% Outputs:
%%% acc :f... |
github | minjiang/transferlearning-master | MyJGSA.m | .m | transferlearning-master/code/MyJGSA.m | 6,642 | utf_8 | 09a8f009556a3e0b09d10483558976ec | function [acc,acc_list,A,B] = MyJGSA(X_src,Y_src,X_tar,Y_tar,options)
%% Joint Geometrical and Statistic Adaptation
% Inputs:
%%% X_src :source feature matrix, ns * m
%%% Y_src :source label vector, ns * 1
%%% X_tar :target feature matrix, nt * m
%%% Y_tar :target label vector, nt * 1
%%% options:option struct
% Ou... |
github | minjiang/transferlearning-master | MyJDA.m | .m | transferlearning-master/code/MyJDA.m | 4,118 | utf_8 | 54f4173e19b0dbf7b2572a964a6a3277 | function [acc,acc_ite,A] = MyJDA(X_src,Y_src,X_tar,Y_tar,options)
% Inputs:
%%% X_src :source feature matrix, ns * m
%%% Y_src :source label vector, ns * 1
%%% X_tar :target feature matrix, nt * m
%%% Y_tar :target label vector, nt * 1
%%% options:option struct
% Outputs:
%%% acc ... |
github | minjiang/transferlearning-master | MyGFK.m | .m | transferlearning-master/code/MyGFK.m | 2,152 | utf_8 | a01af2b801cc7b96695684ce8e803547 | function [acc,G] = MyGFK(X_src,Y_src,X_tar,Y_tar,dim)
% Inputs:
%%% X_src :source feature matrix, ns * m
%%% Y_src :source label vector, ns * 1
%%% X_tar :target feature matrix, nt * m
%%% Y_tar :target label vector, nt * 1
% Outputs:
%%% acc :accuracy after GFK and 1NN
%%% G ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.