sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
b2423bac1e1e2af953726494a705cbed227bb9223ed470b62d6542fa98d05b95 | MATLAB | 7,939 | 173 | function [nms,lms,f_nms,d1_sel,d2_sel,f_del1,f_del2,size_RF_d2,size_RF_d1,cs] = TwoWayAnova(dataset,trials,session,bins)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function performs ANOVA on neural data in spike counts defined by the
% input variable bins to identify NMS, LMS and... |
25fc4637e71e8fe6d207456a153bed9d2767cb6db6715ea92799ce9a16562a3f | MATLAB | 7,943 | 239 | function RUNTIME = ep_TimerFcn_Start_SanesLab(CONFIG, RUNTIME, AX)
% RUNTIME = ep_TimerFcn_Start_SanesLab(CONFIG, RUNTIME, RP)
% RUNTIME = ep_TimerFcn_Start_SanesLab(CONFIG, RUNTIME, DA)
%
% Sanes Lab Start timer function
%
% Initialize parameters and take care of some other things just before
% beginning experiment
... |
9a31f949a681596215451768a0c27a81d6e075808027540f558cb7c0ebb89d6e | MATLAB | 7,946 | 228 | function RUNTIME = ep_TimerFcn_Start_SanesLab_aversive(CONFIG, RUNTIME, AX)
% RUNTIME = ep_TimerFcn_Start_SanesLab(CONFIG, RUNTIME, AX)
%
%Custom function for SanesLab epsych
%
%Initialize parameters and take care of some other things just before
%beginning experiment.
%
%Inputs:
% CONFIG: epsych CONFIG structure (g... |
7ad775951a3b5133933e55bab92da749d975ecf8fe20ca4f92857d92c3a8154b | MATLAB | 7,951 | 346 | clear all;
% Gives me: X (labels), Y (data), time
tmp = load('../data/testdata_2class.mat');
Y = tmp.Y; % Y: features x time x trials
X = tmp.X';
time = tmp.time;
label = tmp.label;
numF = size(Y, 1);
numT = size(Y, 2);
numN = size(Y, 3);
%% 1. No time dimension
sel_t = find(time >= .12, 1);
%% 1.1. S... |
77886d6034e29b9232ab99db6d6ae641ee5af9f4e1aa8fc6e4f48d5b49959e31 | MATLAB | 7,958 | 219 | % Runs the HMC algorithm for the GLM
% Computes PSISLOO and WAIC on the samples.
%
% NOTE: uses HMC_settings.samplesFile to store some partial results. This file can get big, but is deleted after running is complete.
%
% Inputs:
% params_init : the initial parameters for sample = 1
% HMC_settings : HMC sett... |
b76c6687f817f9d6c237d297589deda021f0c9b324f77eb5d7445e3988010d43 | MATLAB | 7,960 | 210 | function [rGamma, rAlpha, rBeta, JumpPost, Trans] = ForwardBackward_BernoulliJump(s, pJ, pgrid, Alpha0, Pass)
% Forward-Backward algorithm to solve a hidden markov model, in which the
% hidden state is a Bernoulli parameter x controlling the observed outcome s.
%
% Usage
% [rGamma, rAlpha, rBeta, JumpPost] = ...
% ... |
8d933cda0634ff8e9df8e17bc8cfd96a608cc53ab5847d430668c7f7ba4e0678 | MATLAB | 7,962 | 215 | function RUNTIME = ep_TimerFcn_RunTime_AMTempIntegration_SanesLab(RUNTIME, AX)
% RUNTIME = ep_TimerFcn_RunTime_SanesLab(RUNTIME, RP)
% RUNTIME = ep_TimerFcn_RunTime_SanesLab(RUNTIME, DA)
%
% SanesLab RunTime timer function
%
% Daniel.Stolzberg@gmail.com 2014. Updated by ML Caras 2015
global GUI_HANDLES CONSEC_NOGOS ... |
1a77d396e065351280ff1fb6649e00da3c33f05b70892ba226f679f307ea427b | MATLAB | 7,974 | 175 | function [newtimes,frame2dirnum] = tpcorrecttptimes(params, dirname)
% TPCORRECTTPTIMES - Corrects time for 2P frames
% This is the Generic version, simply reports 2P frame times
%
% [FRAMETIMES,FRAME2DIRNUM] = ...
% TPCORRECTTPTIMES({PARAMSTRUCT}, DIRNAME)
%
%
% PARAMSTRUCT should be a cell list of parameter ... |
1fb4a7965a3f2d1d14b2d8229640c5db849a11b2adcd4244456f624f452281e6 | MATLAB | 7,979 | 222 | % PURPOSE : import the data to be ".CSV" file
%
% FORMAT :
%
% serror = export2csv_spectranl_analysis(ERP, filename, binArray, time, timeunit, electrodes, transpose, precision)
%
%
% INPUTS :
%
% ERP - ERPset (ERPLAB structure)
% filename - filename of outputted file
% binArray - bins to expo... |
2ce8db4e807255084b4bfb31eb1c14bcdc467cfa30e4552de3e2650834b7d6f8 | MATLAB | 7,981 | 217 | function DecodingDuringDelayCrossTemporalBatchConstantKernel(iFile)
if isstr(iFile)
iFile = str2num(iFile);
end
%% %%%%%% PREAMBLE %%%%%%
Delays_ = {'Short','Medium','Long'};
Delays__ = {'4s','8s','16s'};
Target = 'LONG';
RunErrors = false;
tlimsShort=[0 4];
tlimsMedium=[0 8];
tlimsLong=[0 16];
tlimsShort=[-5 9];... |
7f87ed01764409501e4a4c7872a9d101ddb2bc59bf9b94e6883db00a3814c7eb | MATLAB | 8,003 | 237 | function RUNTIME = ep_TimerFcn_Start_AMTempIntegration_SanesLab(CONFIG, RUNTIME, AX)
% RUNTIME = ep_TimerFcn_Start_SanesLab(CONFIG, RUNTIME, RP)
% RUNTIME = ep_TimerFcn_Start_SanesLab(CONFIG, RUNTIME, DA)
%
% Sanes Lab Start timer function
%
% Initialize parameters and take care of some other things just before
% beg... |
dc18f3e3181b758d509fc4b5c58873f8fa9010204f40f43e44d7972dd3be4d03 | MATLAB | 8,003 | 220 | function DecodingDuringDelayCrossTemporalBatch2(iFile)
if isstr(iFile)
iFile = str2num(iFile);
end
%% %%%%%% PREAMBLE %%%%%%
Delays_ = {'Short','Medium','Long'};
Delays__ = {'4s','8s','16s'};
Target = 'LONG';
RunErrors = false;
tlimsShort=[0 4];
tlimsMedium=[0 8];
tlimsLong=[0 16];
tlimsShort=[-5 9];
tlimsMedium=... |
008f085705fc05f863289984c9b28a7dc4b4cfff05e4af87be2cc2f2c50c1fb9 | MATLAB | 8,014 | 237 | close all
%% Load preprocessed data
% Choose what dataset to use
% what2Load = 'Normal';
what2Load = 'Transec';
preprocFolder = 'D:\ephys_results\processedData\audioVis\';
preprocAllFile = fullfile(preprocFolder,sprintf('all_ephys%s.mat',what2Load));
if exist(preprocAllFile,'file')
load(preprocAllFile, 'db_bu',... |
3d3df72fa0cdebb8741b8f22e3bfc7e9ff65829cf4f897b4f543a98bda74dd86 | MATLAB | 8,016 | 242 | %this is a program that generates trial averages and forms clusters based
%on that/Select folder TwoEyeAnalysis/ISI20/LXLXCXCX. Created by Haleh Fotowat.
close all
clearvars
path=uigetdir;
cd(path)
%read the pooled clustering data
load('LXLXCXCX_HA.mat')
clear IDX
load('Peaks_EXPFits_LXLXCXCX_v2.mat')
stim_type_cnt=... |
ef44eaf56a2ceb746ccd6d982dcf1716580edf41bd018a3a2404cab81f4b36f4 | MATLAB | 8,018 | 221 | function DecodingDuringDelayCrossTemporalBatch3(iFile)
if isstr(iFile)
iFile = str2num(iFile);
end
%% %%%%%% PREAMBLE %%%%%%
Delays_ = {'Short','Medium','Long'};
Delays__ = {'4s','8s','16s'};
Target = 'AM251';
RunErrors = true;
tlimsShort=[0 4];
tlimsMedium=[0 8];
tlimsLong=[0 16];
tlimsShort=[-5 9];
tlimsMedium=... |
faf88dd0bd556b11a397ca0624ed6ccbdc7dc203e6f59723450aa815fc345268 | MATLAB | 8,028 | 267 | function varargout = splinefileGUI(varargin)
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @splinefileGUI_OpeningFcn, ...
'gui_OutputFcn', @splinefileGUI_OutputFcn, ...
'gui_Layout... |
f4fa3c22ad98bdf45ae15688aee83744665febae23c6fb6fe60f8df0eb3ebeb0 | MATLAB | 8,032 | 198 | function [mydata, myt, myavg, bins]=tpquickpsthsliding(dirname, channel, stimcodes, pixels, plotit, names,windowsize,stepsize,basemeth,blst)
% TPQUICKPSTH - Gives a peristimulus time histogram for one stimcode
%
% [DATA, T, AVG, WINDOWTIMES]=TPQUICKPSTHSLIDING(DIRNAME, CHANNEL,
% STIMCODES, PIXELS_OR_DATA, PLOT... |
66a4d7a6abeaa779dbebe2bd4b13b2fb769d3b0e5d298faee16bcee339ccdbc4 | MATLAB | 8,044 | 206 | clear all;
close all;
Out_Stages=1; % {1,2,3,4,5,...}
DatasetNum=1;
FileRun = ['Run',num2str(DatasetNum)]; %Run1, Run2, Run3, Run4, Run5, Run6,...
genesCompressed = 'no'; % 'no', 'yes'
Directory = ['Models/',FileRun,'/Stage1'];
FILES = {'PDX_Paclitaxel','PDX_Gemcitabine','PDX_Cetuximab','PDX_Erlotinib','TCGA_Docetaxe... |
fa3bdae6f764fcaaef6d583e0325de715538c633a775bef6bd8f7cb553de2e16 | MATLAB | 8,059 | 224 | function RUNTIME = ep_TimerFcn_Start_SanesLab_v2(CONFIG, RUNTIME, AX)
%RUNTIME = ep_TimerFcn_Start_SanesLab_v2(CONFIG, RUNTIME, AX)
%
%Custom function for SanesLab epsych
%
%Initialize parameters and take care of some other things just before
%beginning experiment. Currently supports aversive and appetitive go-nogo
%GU... |
f8e5b4a0f3e0531cf217f3e230a70ff36416372d83569b090ffa6b79c88763c3 | MATLAB | 8,061 | 277 | function Cooling_test_matched_sessions
% Start be defining the limits above and below which you consider cooled
% and control data (thresholds equal to or below/greater than)
options = struct('coolThreshold', 11,...
'warmThreshold', 35);
% Define colors
c = struct('ctrl',[0 0... |
53f7986e99f262c20d2fbda7bfc075a1c16bf398d7771008f08d54a2f5766747 | MATLAB | 8,069 | 215 | function DecodingDuringDelayCrossTemporalBatch(iFile)
if isstr(iFile)
iFile = str2num(iFile);
end
%% %%%%%% PREAMBLE %%%%%%
Delays_ = {'Short','Medium','Long'};
Delays__ = {'4s','8s','16s'};
Target = 'LONG';
RunErrors = false;
tlimsShort=[0 4];
tlimsMedium=[0 8];
tlimsLong=[0 16];
tlimsShort=[-5 9];... |
464148b07b3781229d00b4fb2e0e791efdf8611d629d61d5e92941065a3a1ff5 | MATLAB | 8,076 | 215 | % Some summary analyses for the MCMC output for the cosine-tuning model
% inputs:
% samples - the structure of sampels returned by the GMLM
% HMC_settings - the settings used for the samples (only needs to know how many burn-in samples)
% bases - the filter basis structure
% delta_t - the bin ... |
84dbf659ac76354de9b90b357c80315c8da70fe8292e974e5c4d489a7d087874 | MATLAB | 8,077 | 214 | %#ok<*MATCH3>
function dataOut = KINARM_add_hand_kinematics(dataIn)
%KINARM_ADD_HAND_KINEMATICS Calculate hand velocity and accelerations.
% DATA_OUT = KINARM_ADD_HAND_KINEMATICS(DATA_IN) calculates the hand
% velocities, accelerations and commanded hand forces from the joint
% velocities, accelerations and motor ... |
41868989d6082e8944c223a2354c4abeb8274cc5bf8c24f6ed793db66e19bb17 | MATLAB | 8,099 | 296 | function [lfp,lfpFs] = offlineExtractLFP(tank,block,sevName,lfpFs,Hd,delineF,plx,rectify)
% [lfp,lfpFs] = offlineExtractLFP(tank,block,sevName,lfpFs,Hd,delineF,plx,rectify)
%
% Filter for local field potential signal from raw streamed data and
% downsample. Uses acausal filter (filtfilt) to avoid phase distortions.
%
... |
dc2d041b643aee3ca7aa7cc6b574933b50b6345be3e13b58e9713b18f2057668 | MATLAB | 8,147 | 217 | function params = setNeuroPattParams(params, name, value, fs)
% SETNEUROPATTPARAMS Sets all parameters in the NeuroPatt toolbox
% PARAMS = SETPATTERNPARAMS(FS) sets all parameters in the PARAMS
% structure using parameter values listed below using sampling frequency
% FS (in Hz)
%
% PARAMS = SETPATTERNPARAMS(PA... |
d2ae4db14244ab2bea57864e7d5bfad6a9a9f7ea961e5dc92885e00902d2d698 | MATLAB | 8,154 | 272 | % PURPOSE: pop_rename2chan.m is to change the channel names
%
%
% FORMAT :
%
% pop_rename2chan(ALLEEG, CURRENTSET, parameters);
%
% ALLEEG - structure array of EEG structures
% CURRENTSET - Index for current EEGset
% The available parameters are as follows:
%
%ChanArray -index(es) for the selecte... |
df74dc617fca27e589a1c361268e1adc9b63085f1b3b01ea2e162514367f4ced | MATLAB | 8,163 | 231 | function twophotonbulkload(command, thefig)
% TWOPHOTONBULKLOAD - View/Manage a two-photon bulk loading experiment
%
% TWOPHOTONBULKLOAD([EXPERDIR])
%
% Opens a window for managing a
% two-photon bulk load experiment
%
% Optional argument EXPERDIR can be the directory of an
% experiment.
if nargin<2, %
i... |
8406d181baedc55cba348094ba4ac2e147816d5313ed28d093c9a1830dd9248e | MATLAB | 8,172 | 182 | function Assemblies = MakebestEnsembleAssems(UnitsReal,Ltrials_,Rtrials_,MaxSize,JointOnly,DestroyNoiseCorrs,noTrials,nReps)
%%
% Compared decoding performance from aggregated cell assemblies.
% Search is two step: first round is an all-to-all pairwise exhaustive
% search. Best pair is chosen, then remaining units ... |
9a8f8814e9d19d3c33662c0e016a4721674f377437daa562e8dd4c5d1c1bc00e | MATLAB | 8,175 | 211 | function solutions = simulation_boundariesCondition(model, radii)
% Script for potentials extraction in MPH files for boundaries condition
% The script cycle on the number of boundaries condition (number of saline
% cylinders) and the number of testing condition (points of stimulation);
% for each combination of th... |
30a3f19ce34e2f42006298e431f3d6ae9b226f32a3eb54cc9bcec1b931b3fc3e | MATLAB | 8,182 | 260 | function [bestLocalProjections, bestSigmaValues, bestDiffSigmaValues, localDistances, bestNeighborCounts, distanceRatios] = findBestAxes(dynamicsStream, calcIndex, meanDistanceMatrix, verbose)
bestSigmaValues = [];
bestNeighborCounts = [];
bestLocalProjections = [];
distanceRatios = [];
bestDi... |
cb79aaa5f347ec77926cd25f10936547f7ee7a562203a38fba53c626e0942af7 | MATLAB | 8,191 | 190 | function [numFibersAtPercepThreshold, placements, endo, percepThresholds, expAS, fascicle, sensation, center, ratio] = fascicle_for_perception(iSubject, multipleFasc, factor)
% returns numFibersAtPercepThreshold(iOrientedPlacement, iElectrode, iAS)
% num_fibers_for_perception(1, 'D:\');
nrnModel = 'MRG';
[modeLis... |
99fc3e7b8e13cc23986797955ebe7872d0147b43088b6f6d11a5bc989d3bcc5e | MATLAB | 8,199 | 343 | function varargout = Allman_TOJ_2AFC_Monitor(varargin)
% ALLMAN_TOJ_2AFC_MONITOR MATLAB code for Allman_TOJ_2AFC_Monitor.fig
%
% DJS 7/2015
% Last Modified by GUIDE v2.5 14-Jan-2016 17:16:15
% Begin initialization code - DO NOT EDIT
gui_Singleton = 0;
gui_State = struct('gui_Name', mfilename, ...
... |
b386ff596298324b8c9994ed09f038f4f97f73e5880a0190218ef99a7e04e5c4 | MATLAB | 8,220 | 215 | %% Feature cluster first-level ridge regression with nuisance-regressors (lambda is optimized for the whole model, one model for regression)
% 1. A fraction af voxels common to both population level grey matter mask and epi mask
% is chosen for ridge parameter optimisation (would be computationally prohib... |
3a73eb27e6e90bc545d8e79b5ac495040c51e4f49036e00708403a28321bcfe6 | MATLAB | 8,221 | 181 | function [newtimes,frame2dirnum] = fitzcorrecttp(params, dirname)
% FITZCORRECTTP - Corrects time for prairieview twophoton files
%
% [FRAMETIMES,FRAME2DIRNUM] = ...
% FITZCORRECTTP({PARAMSTRUCT}, TIMEFILENAME)
%
% Corrects the self-reported frame triggers of the PrairieView
% two-photon to be consistent with t... |
ea7a1d441c0fc7c5cf4cd3f8469a62bf4c99a11ff1dd3f8d300b046db1c9339b | MATLAB | 8,224 | 294 | function [stats,st] = SStat_mass_CoxPH(X,d,t,Y,maskvtx,prs,e)
% [stats,st] = SStat_mass_CoxPH(X,d,t,Y,maskvtx,prs,e)
%
% Vertex/voxel-wise parameter estimation for the Cox proportional hazards
% model. Survival time ties are handled using Efron's method.
%
% Input
% X: Design Matrix with the time-independent covariat... |
4c66f37ac8f4dd5bd62f8e792c6787af557affe6e3fa754fd4099c98cf6dfb42 | MATLAB | 8,232 | 217 | function DB_NewDatabase(name)
% DB_NewDatabase(name)
%
% Use to create all tables for a new database with the name of the input
% parameter NAME.
%
% DJS (c) 2013
dbs = dblist;
if any(strcmpi(dbs,name))
fprintf(['A database called "%s" already exists on the server ', ...
'... rebuildi... |
1523e65b43cb523207de93ff03a4b1413126f2d2d5e277a03be66114af3211ac | MATLAB | 8,233 | 206 | function varargout = NeuroPattGUI(varargin)
% NEUROPATTGUI MATLAB code for NeuroPattGUI.fig
% NEUROPATTGUI, by itself, creates a new NEUROPATTGUI or raises the existing
% singleton*.
%
% H = NEUROPATTGUI returns the handle to a new NEUROPATTGUI or the handle to
% the existing singleton*.
%
% NE... |
e3ae04f1fc0e21daae6325754fdd734e24465eb52b109049707dedfa71400522 | MATLAB | 8,240 | 210 | %
% This script produces supplementary figure 1 - relation between age (years) and latency (ms) at different stimulation currents
%
% Max van den Boom, Dorien van Blooijs, 2023
clear
close all
clc
warning('on');
warning('backtrace', 'off')
minDataPoints = 10; % minimum data-points to correlate and linear-fit
%%... |
53ad5a0f96849efb4cb5569cf2e92d4149a19f1e7dde17b334c8636e80b436c9 | MATLAB | 8,247 | 233 | function [reg_c,rho_c,eta_c] = l_corner_modified(rho,eta,reg_param,U,s,b,method,M)
%L_CORNER Locate the "corner" of the L-curve.
%
% [reg_c,rho_c,eta_c] =
% l_corner(rho,eta,reg_param)
% l_corner(rho,eta,reg_param,U,s,b,method,M)
% l_corner(rho,eta,reg_param,U,sm,b,method,M) , sm = [sigma,mu]
%
% ... |
477677087446777006a4c4e9df5cc735ac34edd577830cbe2b8428b3ca663e30 | MATLAB | 8,253 | 224 |
function data = collapse (data, factors2collapse, averageTrials)
% COLLAPSE Collapses factor in a multi-dimensional array of condition-average data or trial data.
%
% [data] = COLLAPSE(data,2) collapses second dimension of data
% [data] = COLLAPSE(data,[2 3]) collapses second and third dimensions of dat... |
dc2fa5fcfb6719450ba7d0df838325773c8a1c6e9b07df848a77c17b5aec7b35 | MATLAB | 8,281 | 234 | % PURPOSE : Export ERP eventlist to text file
%
% FORMAT :
%
% pop_exporterpeventlist( ERP, 1, elname );
%
%
% INPUTS :
%
% ERP - input dataset
% Elname - file output
%
% OUTPUTS :
%
% .txt - Text file 'elname.txt'
%
%
% EXAMPLE :
%
% pop_exporterpeventlist( ERP, 1, '/Users/etfoo/Documents/MATLAB/t... |
9f80ab2c6bf5fc4d3afdc7a075de171a28c01c325bc0a33d60557fc2015c6af7 | MATLAB | 8,282 | 230 | function RUNTIME = ep_TimerFcn_Start_SanesLab_v2(CONFIG, RUNTIME, AX)
%RUNTIME = ep_TimerFcn_Start_SanesLab_v2(CONFIG, RUNTIME, AX)
%
%Custom function for SanesLab epsych
%
%Initialize parameters and take care of some other things just before
%beginning experiment. Currently supports aversive and appetitive go-nogo
%GU... |
82e267cf56cec4ac7f2eb96b0f8cc1a3e9ea6e976d45ca960b9833e9c9b11a3b | MATLAB | 8,286 | 219 | function RUNTIME = ep_TimerFcn_RunTime_AMTempIntegration_SanesLab(RUNTIME, AX)
% RUNTIME = ep_TimerFcn_RunTime_SanesLab(RUNTIME, RP)
% RUNTIME = ep_TimerFcn_RunTime_SanesLab(RUNTIME, DA)
%
% SanesLab RunTime timer function
%
% Daniel.Stolzberg@gmail.com 2014. Updated by ML Caras 2015
global GUI_HANDLES CONSEC_NOGOS ... |
88c17731c9e9aaab2ebbb950624b4516beb778a1b72ba8f539997ef936e1b31c | MATLAB | 8,286 | 197 | function Model_Learning_f0(p1,p2)
%p1: seed for random number and p1=1:1:\mu. There are \mu independent simulations
%p2: Pattern frequency. Every f learning cycle, the embedded pattern is shown.
%p2=1: f_0 = 0.1 ; p2=2: f_0 = 0.01 ; p2=3: f_0 = 0.02
rng(10+(p1-1)*1e6);
Ntrials_1=2000;
%Ntrials_1: number ... |
a93eee95a27c8f1026c0fd9198d00ea8091765936aa763c786b62fbc553c55b2 | MATLAB | 8,294 | 160 | function celllist = draw_adaptivethreshold(parameters, inputs)
% DRAW_ADAPTIVETHRESHOLD- Import a cell list from drawing of centroids.
%
% CELLLIST = DRAW_ADAPTIVETHRESHOLD(PARAMETERS, INPUTS)
%
% PARAMETERS should be a structure with the following entries:
% localwindowsize Local window size [x y]
% p... |
c197459ca921f88fa9eede2271d7371300742f6c3c59bbc55a2c8095907939ff | MATLAB | 8,302 | 189 | function ret = gfigure(varargin)
% GFIGURE is...
% - A package to let figure windows appear automatically in grid style alignment
% - A command to batch resize and organize figures in grid style
% GFIGURE supports multiscreens. You can specify which screen to show figure windows on.
% Automatic alignment requires ... |
105f9127837e25ed0df435d49d0790b2c8e2e3840be1ff40917cd9238fad56c1 | MATLAB | 8,304 | 187 | function [newtimes,frame2dirnum] = tpcorrecttptimes(params, filename)
% TPCORRECTTPTIMES - Corrects time for prairieview twophoton files
%
% [FRAMETIMES,FRAME2DIRNUM] = ...
% TPCORRECTTPTIMES({PARAMSTRUCT}, TIMEFILENAME)
%
% Corrects the self-reported frame triggers of the PrairieView
% two-photon to be consist... |
98a5a97a85518798dda5f04d737e82b9ed325b4eb9ec6115aa4ed099370faab9 | MATLAB | 8,313 | 160 | %%%%%%%%%%this script produces masked images for hands only when hands
%%%%%%%%%%are annotated with details.%%%%%%%%%%%%%%%%%%%%
%%%%This script also visualizes the output
%%%%%%%% images written to the output directory.
%%%%%%%% Comment out all imshow() statements if you want to speedup the
%%%%%%%% execution ... |
be37a6c3a7ad055c1d3cc794c82d055964bce2894412762cc7ce24d9e45c026f | MATLAB | 8,315 | 322 | % PURPOSE : Loads MVPCset(s)
%
% FORMAT :
%
% MVPC = pop_loadmvpc(parameters);
%
% PARAMETERS :
%
% 'filename' - MVPCset filename
% 'filepath' - MVPCset's filepath
% 'Warning' - 'on'/'off' (def)
% 'UpdateMainGui' - 'on'/'off' (def)
%
%
% OUTPUTS :
%
% MVPC - output MVPCs... |
df32dfd582635be8f7d65c2ab428980b010a07be1b1f3c86d81841e93a259cdd | MATLAB | 8,315 | 248 | function RUNTIME = ep_TimerFcn_Start_TwoInterval_SanesLab(CONFIG, RUNTIME, AX)
% RUNTIME = ep_TimerFcn_Start_SanesLab(CONFIG, RUNTIME, RP)
% RUNTIME = ep_TimerFcn_Start_SanesLab(CONFIG, RUNTIME, DA)
%
% Sanes Lab Start timer function
%
% Initialize parameters and take care of some other things just before
% beginning... |
3e02bad0f72bd8e714f6be85dbacadd351c610e06b9681b440a3a509e97024d7 | MATLAB | 8,318 | 382 | clear all;
addpath('../');
% Gives me: X (labels), Y (data), time
tmp = load('../examples/testdata_2class.mat');
Y = tmp.Y; % Y: features x time x trials
X = tmp.X';
time = tmp.time;
label = tmp.label;
numF = size(Y, 1);
numT = size(Y, 2);
numN = size(Y, 3);
%% 1. Select time point of interest
sel_t =... |
cefb44d0ac1f10b90f2c0648370f4d99aaa02038ff8bdd611118951e6860de7c | MATLAB | 8,321 | 309 | function r = irepifitvol(varargin)
version = '$Id: irepifitvol.m,v 1.2 2016/04/11 03:19:06 greve Exp $';
r = 1;
cmdargs.involfile = '';
cmdargs.maskfile = '';
cmdargs.configfile = '';
cmdargs.outdir = '';
cmdargs.skip = 7;
cmdargs.nacqexclude = 0;
cmdargs.nminexclude = 0;
cmdargs.ndummies = 10;
cmdargs.ROFlip = 65; %... |
d57bec7ee2e0220f3ceb740b08d479a3e28e1012575a2120e2ae738b2cd42c2e | MATLAB | 8,330 | 146 | %NEED TO CHECK
%
% sourceSignal=PRODUCEEXPERIMENTSIGNALS_FLICKERFREQUENCY(experimentType,duty_cycle_LED,duty_cycle_sound,sound_frequency,type_of_burst,sample_rate)
%
% Produces a structure that provides information about trials of sensory
% flicker stimulation, to be eventually run on the NIDAQ. This is the
% data that... |
61fbdc32a663b06bbebd5f1ea602351d3a02a1cf062f67bd92447d5281f16690 | MATLAB | 8,348 | 276 | % PURPOSE: subroutine for pop_appenderp
% appends ERPsets
%
% FORMAT:
%
% [ERP serror] = appenderp(ALLERP,indx, prefixes)
%
% Inputs:
%
% ALLERP - structure containing more than 1 erpset (ERP structure)
% indx - erpset indices to append (from ALLERP)
% prefixes - prefixes to be added to the appe... |
a4dd0fd066f122ee5d7b3b3d2fb94c25b9fef1ab22a293bde1ddee828a3c393e | MATLAB | 8,359 | 232 | classdef ReviewClipTable
%UNTITLED Summary of this class goes here
% Detailed explanation goes here
properties
ClipTable
CurrentClipNumber
% CurrentClip
end
methods
function self = ReviewClipTable(clipTable)
if any(strcmp('Features', clipTable.Propert... |
9e59817a086adfbac0c8c02df053ee81aec85de1b31013cf657cd9986dd5f504 | MATLAB | 8,378 | 262 | function check_bedrosian
%
% function to check if the Bedrosian assumptions are violeted
% for band pass filtering 0.01-0.08 and 0.04-0.07
%
% Pachaud et al., (2014)
% Consequences of non-respect of the Bedrosian theorem when demodulating
%
% Useful bandwidth Bphase =2(modulation index +1)*freq of modulation signal
% ... |
de471db0dfd37e90709ec3286334b86e72d026bb62673747c96acbde7e4de8d4 | MATLAB | 8,385 | 277 | % PURPOSE : Create table of EEG artifact detection summary
%
% FORMAT :
%
% Pop_summary_AR_erp_detection(EEG, fname);
%
% EXAMPLE :
%
% Pop_summary_AR_erp_detection(EEG, 'C:\Users\Work\Documents\MATLAB\test.txt');
%
%
% INPUTS :
%
% Fname - File name and path
%
% OUTPUTS :
%
% -Text file with saved EEG a... |
e2dc162b640d626144ffcabece7d9ba0eea6b8c15361292cb9cac330fbec3e75 | MATLAB | 8,410 | 167 | clearvars
close all
clc
%load data
datafiles = {
'Rat Baseline Dataset/Rat_MEA2Baseline_DIV22_raster_3D_A2_trial1.mat',
'Rat Baseline Dataset/Rat_MEA2Baseline_DIV22_raster_3D_A3_trial2.mat',
'Rat Baseline Dataset/Rat_MEA2Baseline_DIV22_raster_3D_A4_trial3.mat',
'Rat Baseline Dataset/Rat_MEA2Baseline_D... |
493f887aaa8a7976469db8d235245339b2d21bd3021a359c3972928d39491d49 | MATLAB | 8,424 | 266 | function portName = crsFindSerialPort(deviceName)
% crsFindSerialPort
% Searches for a USB CDC virtual serial port connected to deviceName
%
% Usage:
% portName = crsFindSerialPort(deviceName)
%
% deviceName must be one: Bits#, BlueGain, BOLDscreen, ColorCAL,
% SpectroCAL, Display++ or LiveTrack
%
% Example:
% portName... |
bc6908c7dbf62e76ddba7694653eb2c14b06de0f0b6dc452fa502dd9911804df | MATLAB | 8,426 | 307 | function TRIALS = TrialFcn_StimDetect_LOMBER(TRIALS)
% TRIALS = TrialFcn_StimDetect_LOMBER(TRIALS)
%
% Custom trial selection function for time order judgement (TOJ) stimulus
% detection task.
%
% TrialTypes:
% Standard trial = 0
% Deviant trial = 1
%
% Parameters from protocol file used in this function
% Tri... |
9e8864ece508f1684d8aaa4c662344dfc076322abec2192bed7a84cfb4894ab2 | MATLAB | 8,432 | 257 | function varargout = Appetitive_Training_Menu(varargin)
% This GUI lanuches a menu that allows a user to select a
% appetitive training paradigm. Paradigms are as follows:
%
% Pure Tone Training Stage 1:
% A pure tone is generated by default. Water is available at the spout
% as long as the pure tone is on. The ... |
93edf7a0e7ae619685670e998558058d21464418755081488ca8235fac34d442 | MATLAB | 8,435 | 228 | function DecodingDuringDelayCrossTemporalBatch3JA(Target,iFile)
if isstr(iFile)
iFile = str2num(iFile);
end
%% %%%%%% PREAMBLE %%%%%%
Delays_ = {'Short','Medium','Long'};
Delays__ = {'4s','8s','16s'};
% Target = 'AM251';
% iFile =1
RunErrors = true;
tlimsShort=[0 4];
tlimsMedium=[0 8];
tlimsLong=[0 ... |
b3f5ce84f807315c69659fb54adf748fc2db33e794a1daa7d9c34b90501fc937 | MATLAB | 8,450 | 288 | clc; clear all; close all
subjects = [3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33];
%%
%%% subject 1-2 are pilot subjects using a slightly different paradigm, so
%%% we did not pay for the scans!
%%% and we did not analyse their data!
num_subjects = length(subjects);
mat2=[]... |
31147e54332c77afd5c4e70b6c174c196428a9b387f0b62f27fff0ca47460ef8 | MATLAB | 8,471 | 203 | function RunAnalysis(QUIQI,AnalType)
% Runs image analysis.
%
% INPUTS:
% - QUIQI: structure containing the information required for the analysis. Computed by PrepAnalysis.m
% - AnalType: analysis type. Initialized in RunQUIQI.m.
%
% OUTPUTS:
% none
%
% If paralell processing is prefered: uncom... |
c5ded130e30456d130694581633de9ce4095e6cd43042874612616b88a96320c | MATLAB | 8,472 | 196 | function [bhv, paperVal] = analyseBehavior(dataPath,animalID)
%%
%function analyseBehavior
paperVal.info = ...
'all values of the paper, first row is bird one, second row is bird 2';
%% set variables
%set to NaN to ensure that code works if only one bird is analyzed
bhv.perf{2,1}.averagePerformance(:,1:4) = ... |
3707775c8ceec6a90b95217033d0777f03a5aafacfdbb98fa8eb619e92e8572e | MATLAB | 8,480 | 219 | %% KStest for PCF Time Point Experiments
root = 'C:\Data\Daniela\ACV_Water\Data_Stats\';
dirAnaly = 'C:\Data\Daniela\ACV_Water\Data_Stats\KS_Test_Histograms_Last20Sec_PCF_TP\';
%% Within
% Cond 1
[h,p,ks2stat] = kstest2(HisBinProb_PCF_TP1_Cond1,HisBinProb_PCF_TP2_Cond1);
p_TP1vTP2_Cond1 = p; cl... |
3bf33f9ad7a958fb096125092b595da1d926d94509befba3315e7bda29935561 | MATLAB | 8,500 | 285 | function handles = updateIOPlot_SanesLab(handles,variables,HITind,GOind,REMINDind)
%handles = updateIOPlot_SanesLab(handles,variables,HITind,GOind,REMINDind)
%
%Custom function for SanesLab epsych
%
%This function creates an xy plot of either hit rates or d'
%values (y) as a function of the value of a user-specified va... |
1255522a7a5e431c56b2c76237d9f535c5b59e79fda6222b4b8ca25f747347e7 | MATLAB | 8,502 | 388 | function varargout = TOJ_Monitor(varargin)
% TOJ_MONITOR MATLAB code for TOJ_Monitor.fig
% TOJ_MONITOR, by itself, creates a new TOJ_MONITOR or raises the existing
% singleton*.
%
% H = TOJ_MONITOR returns the handle to a new TOJ_MONITOR or the handle to
% the existing singleton*.
%
% TOJ_MONIT... |
9584430c70e4b3c4501e989d702a22403753034a6c89e8cad41523781c23d98f | MATLAB | 8,513 | 232 | % PURPOSE: splits channel array into left and right channels
%
% FORMAT:
%
% varargout = splitbrain(ERP, varargin)
%
%
% INPUT :
% ERP - Event Related Potential structure
%
% OUTPUT :
% MatChan - Left and Right channels matched homotopically
% MatChan(:,1): Left channels
% ... |
c63ba172203f34f2606bc3da5a150af16f184a5ec8484e283df07677fac8d7c9 | MATLAB | 8,543 | 227 | % PURPOSE: splits channel array into left and right channels
%
% FORMAT:
%
% varargout = splitbrain(ERP, varargin)
%
%
% INPUT :
% ERP - Event Related Potential structure
%
% OUTPUT :
% MatChan - Left and Right channels matched homotopically
% MatChan(:,1): Left channels
% ... |
ffc7cde0ac2a81701fe57a5b7c9c6f7e5b8dae77ff84310667feec310893ab0b | MATLAB | 8,553 | 182 | sound_click_freq=input('Specify Number of Sound Clicks Per Second: ');
LED_blink_freq=input('Specify Number of LED Blinks Per Second: ');
%stimuli_duty_cycle_sound=input('Specify Duty Cycle For Sound Stimulus (ex. 50 means 50%): ');
click_on_duration_sound = input('Specify Sound Click Duration (ex. 1 means 1 ms): ');
%... |
66b3c6eb605f9c16f5c2e4fff9b36b7bcf4bc2a6af2275ba997d5feadb01f151 | MATLAB | 8,567 | 193 | function mesh = set_up_mesh(G)
%set_up_mesh(G) Set up vectors containing the indices of the different
%types of nodes
% Read geometry
Nx = G.Nx;
Ny = G.Ny;
Nz = G.Nz;
N = G.N;
% Set up indices for outer boundary
% Set up indices for outer boundary (corners)
mesh.e_lsw = 1;
mesh.e_lse = Nx;
mesh.e_lnw = (Ny-1)*Nx + ... |
f9776adfc55d6b3f6b49d15673e92d4b7de95dd3cc719e3dfaf1f18182b2f4f6 | MATLAB | 8,606 | 221 | function shifts_g = rigid_mcorre(Y,options,template)
% online motion correction through DFT subpixel registration
% Based on the dftregistration.m function from Manuel Guizar and Jim Fienup
% INPUTS
% Y: Input data, can be already loaded in memory as a 3D
% tensor, a memory mapped fil... |
ed8269d957b1129918a2af66ba408146609669ed68253b15b42f8c891da60b1e | MATLAB | 8,628 | 304 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright for this implementation:
% 2015 - Simona Cocco
% cocco@lps.ens.fr
%
% Permission is granted for anyone to copy, use, or modify this
% software and accompanying documents for any uncommercial
% purposes, provided this copyright notice... |
586eb04c4efee7869d1648c4364f6ea474209293f09acbc0e22f3583e388b945 | MATLAB | 8,642 | 271 | function [bestLocalProjections, bestSigmaValues, bestDiffSigmaValues, localDistances, bestNeighborCounts, distances] = findBestAxes(dynamicsStream, trialStream, calcIndex, meanDistanceMatrix, nearestNeighbors, useLocalDimensions, minReturnTime, verbose)
bestSigmaValues = [];
bestNeighborCounts = [];
bestL... |
20369da0021aaba4a17d2b9eab732a8bafce2a1e5ae2e9f0ac30965acaeec9bd | MATLAB | 8,649 | 341 | %% Procedure for retrieving LFP data from Tanks
cfg = [];
cfg.tank = char(TDT_TankSelect);
[cfg.TT,~,TDTfig] = TDT_SetupTT;
% cfg.block = cfg.TT.GetHotBlock;
cfg.block = 5;
cfg.usemym = false;
cfg.downfs = 600;
cfg.datatype = 'BlockInfo';
binfo = getTankData(cfg);
cfg.datatype = 'Waves';
data = getTankData(cfg)... |
4643df131db1b9a740ad10cd323b8c2e41eb24910c710e7bb58d82fce56bf590 | MATLAB | 8,656 | 216 | %% MAIN function to generate the Spike Time Histogram, STH (Figure 9)
clear all
clc
[filename, pathname, filterindex] = uigetfile('*.mat', 'Select NetworkBurst file');
if isempty(strfind(filename,'NetworkBurstDetection'))
errordlg('Selection Failed - End of Session', 'Error');
return
end
cd(pathname);
load(fil... |
fe77061f6d34d8de52f0518fa65096d6ca497fe7ea2dc31835955e8d3b55e693 | MATLAB | 8,664 | 201 | function [I_ion, S, Sinf, invtau, b, I_Na, I_CaL, I_Kr, I_Ks, I_to, I_K1, I_NaK, I_NaCa] = SecondOrderUpdateTT3epi(V, S, Sinf_old, invtau_old, b_old, dt, I_stim, I_stim_old, params)
% This function performs a Rush Larsen timestep of the specified length for
% the reduced Ten-Tusscher 2006 model for ventricular myocytes... |
042adf480b27e49d5b44da2453a3a903b3df9137068b3e07d7bb32a72d3d7e6b | MATLAB | 8,681 | 202 | function [I_ion, S, Sinf, invtau, b, I_Na, I_CaL, I_Kr, I_Ks, I_to, I_K1, I_NaK, I_NaCa] = SecondOrderUpdateTT3breakup(V, S, Sinf_old, invtau_old, b_old, dt, I_stim, I_stim_old, params)
% This function performs a Rush Larsen timestep of the specified length for
% the reduced Ten-Tusscher 2006 model for ventricular myoc... |
318d21493db63ecc9fdc457f49fba4876c328c4a44977ff369776cb18191ff9a | MATLAB | 8,687 | 245 | function [Cov_comp_vid,Cov_comp_snd,percExpl_vid,percExpl_snd] = getSubspaceOverlap(db,P,subOvP)
%% Get the binned data
[neurAll,~,motDat,baseIdx] = getDataBinnedToVideoFrames(db,P,subOvP);
%% Get subspace overlap
motionCompNum = subOvP.motionCompNum;
lagbins = subOvP.lagbins;
shuff = subOvP.... |
e9b86dad1d016c31fee6de0887cdd7539dcfe6b53339b8754a64c07572fdb093 | MATLAB | 8,687 | 336 | % This function is a combination of the zeroaxes.m from Andrew Knight and axescenter.m from Matt Fig.
% I just took the best of them to allow the axes look nice (crossing at the origin) and being able to be interactive.
%
% *** This function is part of ERPLAB Toolbox ***
% Author: Guanghui Zhang
% Center for Mind and B... |
d8fd5052c9f32e4248d27a52958d0524dcabde02004d18dd5ad2849893136af0 | MATLAB | 8,699 | 249 | function [data] = SEV2mat(SEV_DIR, varargin)
%SEV2MAT TDT SEV file format extraction.
% data = SEV2mat(SEV_DIR), where SEV_DIR is a string, retrieves
% all sev data from specified directory in struct format. SEV files
% are generated by an RS4 Data Streamer, or by setting the Unique
% Channel Files option in S... |
15555827f1b50bd05b8d934149da3e4f5f3b59c690853e24b7e3fb83ccd9429c | MATLAB | 8,704 | 250 | % PURPOSE: subroutine for pop_importeventlist.m
% imports EVENTLIST, from a text file, into the ERP structure
%
% FORMAT:
%
% [ERP EVENTLIST serror] = importerpeventlist(ERP, elfilename )
%
% INPUTS:
%
% ERP - ERPset
% elfilename - text file
%
% OUTPUT
%
% ERP - EVENTLIST s... |
4bd3501096ca91ecf4da894bd2a4fc12b3e2e150736a0aace80e97cb8eab63d1 | MATLAB | 8,721 | 228 | function Model_Learning_NET_3(p1)
%p1: seed for random number and p1=1:1:\mu. There are \mu independent simulations.
%w =ab, w: W_vec, a: W_veca, b: W_vecb
SDF1=10+(p1-1)*1e6;
rng(SDF1);
Ntrials0=2000;
%%Step 1: There is no embedded pattern in afferents for 2000 learning cycles.
Ntrials1 =20000;
%%Step... |
a2805ad3c06a9d6a0bacab8952891f09eff45185490681cbcf3e090db22418da | MATLAB | 8,723 | 305 | %% LR reinforced with two action states
clear all
tic
%Number of trials
Ntrials = 2000;
%Number of rats
Nrats = 100;
%Learning paramaters
alpha = 0.02; % alpha; learn rate for state value estimation
beta = 0.04; % beta; learn rate for action probability update
gamma = 0.8; % discount ... |
41479fb21bc848f6310dedc250f1dfa33799e02809d80a0e8e20196ed2d4f946 | MATLAB | 8,727 | 224 | function [resp] = tpTCDragoi(dirname, paramname, pixels, plotit, names, trials, tint,sptint, blst, basemeth)
% TPTCDRAGOI - Modified TC for Dragoi, PrairieView two-photon data
%
% RESPS = TPTCDRAGOI(DIRNAME, CHANNEL, PARAMETER, PIXELS_OR_DATA, PLOTIT, NAMES,
% [TRIALS], [T0 T1],[SP0 SP1],BLANKSTIMID,BASEL... |
4b0a59fcf9eddbc37f9a006850518a7685080a00c0773071352a47afcaa0cae3 | MATLAB | 8,729 | 306 | function varargout=sigstar(groups,stats,nosort)
% sigstar - Add significance stars to bar charts, boxplots, line charts, etc,
%
% H = sigstar(groups,stats,nsort)
%
% Purpose
% Add stars and lines highlighting significant differences between pairs of groups.
% The user specifies the groups a... |
970d300616249c49e5ad467f47a6293ab4deb78a5a9d71b32163a8a8216d609d | MATLAB | 8,732 | 247 | function [stats,st] = lme_mass_fit(X,Xcols,Xrows,Zcols,Y,ni,prs,e)
% [stats,st] = lme_mass_fit(X,Xcols,Xrows,Zcols,Y,ni,prs,e)
%
% Location-wise linear mixed-effects estimation. Allows to have different
% models across locations (this is useful when there are either missing
% values at some locations or the number o... |
f84ce18ae5a77ae26ca3d9763911f0dd4e9819ef4ba6f3b993d36b23efbce082 | MATLAB | 8,732 | 202 | function fibersPerFascicle = fiber_pop(model)
% FIBER_POP Creates fiber populations in each chosen fascicles of a given
% nerve.
% Each fascicle can have from 1 to 5 populations depending on its size.
% The nerve and fascicles contours points are given as input in mm.
% The stimulation electrode contour is also gi... |
e1cd29bfe44ada6389b8d96bf1586995ee30cf82067eb6a9d53bdb3b5bcd8d65 | MATLAB | 8,736 | 298 | % PURPOSE : Remove linear trends from each bin of an ERPset
%
% FORMAT :
%
% ERP = pop_erplindetrend( ERP,'Baseline', detwindow );
%
% INPUTS :
%
% ERP - input ERPset
% Interval - time window to estimate the trend. This trend will be subtracted from the whole epoch.
% 'pre'- [-200 ... |
6defd42c5a3c68069dbdc334886a962f52d09de93645f25b9caa06f2a1fe674a | MATLAB | 8,740 | 320 | function varargout = f_ERP_duplicate(varargin)
% F_ERP_DUPLICATE MATLAB code for f_ERP_duplicate.fig
% F_ERP_DUPLICATE, by itself, creates a new F_ERP_DUPLICATE or raises the existing
% singleton*.
%
% H = F_ERP_DUPLICATE returns the handle to a new F_ERP_DUPLICATE or the handle to
% the existing si... |
c941586951674b3e594d9ec7f94ce6fbc95a6c078dcc8851ce02ad82f211d35d | MATLAB | 8,740 | 315 |
% PURPOSE : Exports MVPC set to text
%
% FORMAT :
%
% MVPC = pop_mvpc2text(MVPC, filename, binArray, parameters)
%
%
% INPUTS :
%
% MVPC - MVPCset (ERPLAB structure)
% filename - filename of outputted file
%
%
% The available parameters are as follows:
%
% 'time' - 'on'=include time... |
02ffa9c7cca9da4d97210a57b91738c6ba3056e55383cfed03200eedf2c668ae | MATLAB | 8,757 | 268 | function [ NewVerts, NewFaces, iVertsNotToPrune ] = StitchFaces( Verts, Faces, iVertsToPrune)
%STITCHFACES Given a list of verticies and list of triangle faces stitch
%the faces together where triangles overlap. Return new verticies created
%and a copy of the Faces matrix with the fixes. The Verts should be
%appended... |
2e07d01b8294fa4cea17d5f1393d4f0c286ae4aaba2cd2d1da6f1657c853da4f | MATLAB | 8,770 | 116 | %Muthuraman TPDC code created 04-03-2016
tic
%%%%%%%%%%%%%%%%%%%%%% EEG %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all
addpath 'E:\Flexibility\TPDC'
addpath E:\Flexibility\TPDC\arfit
load('dataout.mat');
for k = 1
close all
a=data_out(:,:);
b1(1,:)=a(1,:);b1(2,:)=a(2,:);b1(3,:)=a(3,:);b1(4,:)=a(... |
aeb8e75cdb0c89aafbd521c350d1b2458d7708a012e183deba71b8ab3a461833 | MATLAB | 8,786 | 228 | %% %%%%%% PREAMBLE %%%%%%
clear
Target = 'LONG';
bw=0.05;
clear Av
warning ('off')
if ispc
pat = 'C:\Analysis\AssemblyAnalysis\raw\';
elseif ismac
pat = '/Volumes/HDD2/DNMTP/raw/';
else
path(path,'/panfs/panasas01/phph/ad15419/MATLAB')
home = getenv('HOME');
cd ([home '/MATLAB/MichalDataAna'])
p... |
568303147afe36bfffeb143ae2446d2cab0fcbdbad534df7ab8abbfeea553abd | MATLAB | 8,822 | 252 |
%% Align loops
BINS_PER_LOOP = ceil(TOTAL_LOOPS / maxClusters);
terminalStateID = max(clusterIDs) + 1;
averageLoops = [];
averageErrors = [];
totalPoints = [];
stateMap = zeros(size(clusterIDs,1),2);
for i = 1:maxClusters
clusterLoops = uniqueLoops(find(loopClusterIDs == i));
if ismember(terminalStateI... |
28dc6f1843708ed022fcfe0c3e57f6399860f75c7ac636d3bb01d117bd47b1ce | MATLAB | 8,824 | 297 | function [ hubscore, hubs, hcorr ] = get_hub_score_wei_und(mat,hubdeff,hubtype,prcnthub)
% various ways to determine which nodes might be hubs
if nargin<2
hubdeff = 'betzel2014' ;
end
if nargin<3
hubtype = 'rank' ;
end
if strcmp(hubtype,'rank')
hubrank = 1 ;
elseif strcmp(hubtype,'zscore')
hubrank = ... |
911b30a1c3aa3d085dc8a6b37fe1390b36f5e4d16337c82b30a7dac2422bd9dc | MATLAB | 8,825 | 300 | function varargout = AMRate_jitter_gui(varargin)
% BASIC_CHARACTERIZATION MATLAB code for basic_characterization.fig
% BASIC_CHARACTERIZATION, by itself, creates a new BASIC_CHARACTERIZATION or raises the existing
% singleton*.
%
% H = BASIC_CHARACTERIZATION returns the handle to a new BASIC_CHARACTERIZA... |
c6d27bb8c55eb9dd0778a19b493a4148e06d0d635ae8b143d14889fb264e29c4 | MATLAB | 8,838 | 262 | % Code to produce Supplementary Fig. 5
% Opto SUA population analysis and depth plot
addpath data
% load data
load Suppl_Fig5_data.mat
% define statistical thresholds
rsTalpha = 0.05; % alpha threshold for ranksum test
stdThresh = 3.00; % sdt threshold over baseline
%% extract trial average firing rate... |
c5f74d6bb77e090af30b2583bac312c47e84e8596b1538901a09a62c32a80c19 | MATLAB | 8,852 | 147 | function [hdot pV]=simpleDotPlot(Pos,data,sizeDot,colorBar,widthBar,colorError,markerType,sigFlag,widthLine,spreadFlag,boxFlag)
% INPUT:
% - Pos : x-position of the center of the bar
% - data : vector of data to plot
% - colorBar : color of the bar (string or RGB value or 2 RGB values
% (line and cent... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.