sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
e23b32351c763a363e1584e60bb66a197c80644870d97394abb7d9b3bbda1cac
MATLAB
23,089
654
function Do_clustering(input, varargin) % PROGRAM Do_clustering. % Does clustering on all files in Files.txt % Runs after Get_spikes, which prepares '*_spikes.mat' files. % % function Do_clustering(input, par_input) % Saves spikes, spike times (in ms), coefficients used (inspk), used % parameters, random spikes select...
15b08c960cd46aeda8ee6ee46782978663eef434416b8a7bd0c647b120c16eef
MATLAB
23,115
591
%% Code for generating Figure 2 % Initialize wavelet-specparam matrices ap_exp2 = zeros(10000,10601); ap_off2 = zeros(10000,10601); pk1err_cfr2 = zeros(10000,7365); pk1err_amp2 = zeros(10000,7365); pk1err_std2 = zeros(10000,7365); pk1_det2 = zeros(10000,10601); pk2err_cfr2 = zeros(10000,2001); pk2err_amp2 = zeros(1000...
42127c9c1e323313f931f77805a59a51085af1e70513409a64bc1d30eea9c958
MATLAB
23,124
592
%% FIBER PHOTOMETRY ANALYSIS - EVENT WINDOW (TAIL LIFT) % Code written by Carrie Ann Stine % Michael Bruchas Lab - UW % Analysis code used for tail lift results in NOPLight manuscript % Script used to calculate the z-score of a fiber photometry trace over % multiple event windows. % NOTE FOR DEMO: ONLY USE SCRIPT ...
bef65f2be9d4182be7669f16ce0e5e1a796b973520ff89730cbc590c8b530228
MATLAB
23,235
799
function varargout = ToSli(varargin) %TOSLI M-file for ToSli.fig % TOSLI, by itself, creates a new TOSLI or raises the existing % singleton*. % % H = TOSLI returns the handle to a new TOSLI or the handle to % the existing singleton*. % % TOSLI('Property','Value',...) creates a new TOSLI using t...
1a234e29aa7a7c0822868b83c56c709d6bf9ea25a8ed3ee8cbad02cd476127e2
MATLAB
23,306
585
% check vector(z_w_vec, z_q_vec, and z_wq_vec) for responsive neuron; % check vector(z_q_idx, z_w_idx, z_wq_idx, z_qw_idx) for time bias; % check pvalue for firing peak difference; % check t_idx for trial bias. %% 3. set parameters Lo_w_1 = Lo_w(1:4); Lo_s_1 = Lo_s(1:4); Lo_q_1 = Lo_q(1:4); Lo_w_2 = Lo_w(1:leng...
a57219cf0b3de9832f809dc48a79738c61b52cfbe802503494d649b21aa32ab8
MATLAB
23,323
888
function RepeattouchWdecision global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 %SpikeArray‚ÅLPegTouchAllARpegTouchall‚ðƒAƒ‰ƒCƒ“‚µ‚½ƒNƒƒXƒRƒŠƒIƒOƒ‰ƒ€ %SpikeArray‚ÅLPegTouchAll‚ðƒAƒ‰ƒCƒ“‚·‚é duration=5000; CrossCoL=[]; CrossCoR=[]; %—¼•...
5465d4b2b5c3347bafec50748553f4ec6c5229574fdba721c1b598b526f73ee5
MATLAB
23,364
752
%% load data sessionTags = {'M22027', '20220517'; 'M22029', '20220607'; 'M22031', '20220524'; 'M22032', '20220621'; 'M22033', '20220706'}; for isession=1:size(sessionTags,1) fname = [sessionTags{isession,1},'_', sessionTags{isession,2},'_r2overTime_dec22.mat']; load(fname) for iunit = 1...
0c8007a1f040b5c5d1bc562b71c823a22b083758aedc3a02333c7aa496c1ab03
MATLAB
23,394
470
function [VarMeansRL,VarSTDRL,CrossVarRL]=CrossPeg24ch20170728(RpegTouchTurn,LpegTouchTurn,RpegTouchMatrix,LpegTouchMatrix,PegTouchCell,Graph,duration,yhight,FTselect) % Num_SmallVar ChunkLength ChunkEnd Sum_SmallVar ChunkValue global OneTurnTime RefPeriod VarMeans VarSTD DrName CrossVar FigureSave fig_VarInvHist.....
5567d2e95ebfe88f20f40ed96ae7f271d87084c7f95f8d663a85ba0a7ccfe662
MATLAB
23,418
601
%% FIBER PHOTOMETRY ANALYSIS - EVENT WINDOW (HEAD-FIXED SUCROSE) % Code written by Carrie Ann Stine % Michael Bruchas Lab - UW % Analysis code used for head-fixed sucrose results in NOPLight manuscript % Script used to calculate the z-score of a fiber photometry trace over % multiple event windows % NOTE FOR DEMO: ...
f902456d0d7725b806002698165e29cddc2c5856ddc1d0ce71ba8f578127a78b
MATLAB
23,490
534
% Find location of clustered cells clear all close all clc params.colour_list = {[0 0.4470 0.7410],[ 0.8500 0.3250 0.0980],[ 0.9290 0.6940 0.1250],[ 0.4940 0.1840 0.5560],[ 0.4660 0.6740 0.1880],[ 0.3010 0.7450 0.9330],[ 0.6350 0.0780 0.1840],[0,0,0],[0.5,0,0],[0,0.5,0],[0,0,0.5]}; dir_t = 'P:\Alexander\...
641ea0557a6e291da18e78f2347b652809757ec212cad054e10343c399598e96
MATLAB
23,510
705
% Funtion to Read Images from to find cells that colocates % with Calcium Imaging Experiments % It reads images average and display them from some Dye % IT also samplea som frames from the CaImaging % Display a Merge of Both Mean Images: Dye and Calcium % Save Colocated Coordinates in the .mat File of the Experiment D...
1322424bd15d2b7fd1d04738d64ef6fc645a45c5c749593177caab3baea41c13
MATLAB
23,531
490
function RepeatPitch20170606 global ACvalue Pitch MainPointX AutoCorrValue SE lengthEvent T autoy CCresult AutoCal Repeat... SpikeCount EventCount1 EventCount2 EventCount3 EventCount4 EventCount5 AC ControlSp MainPoint AutoPitch... Ratio111 Ratio110 Ratio101 Ratio100 Ratio011 Ratio010 Ratio001 Ratio000 Pre...
2444bca50b936ade6a9e51a9cd77c773369a1cecd16af4520dd85f5103c7f818
MATLAB
23,626
132
cd D:\Canada_2020\UK_biobank\reports\AD clear; %% tabular data cd D:\Canada_2020\UK_biobank\reports\ordered %selfreport_ordered=readtable('selfreport_ordered.csv'); APOE_ordered=readtable('APOE_ordered.csv');BDNF_ordered=readtable('BDNF_ordered.csv');ADprs_ordered=readtable('ADprs_ordered.csv'); AD_ordered=readtable('...
cb6a8dde888391519f0121203271d1e2d08d6ffa8b48197fc1759d55399f84d9
MATLAB
23,804
573
%%% behavioral performance % Input: MSessionExplorer of all inhibition sessions for each mouse % Output: Session-by-session summary of behavioral performance (lick info) % For each session, behavioral performance must pass the following criteria. % Criteria: % Hit rate: lick probability o...
ae81c8b17d44fb9b12b5aecead7e270bc99172664ef8fe1889dc445715256eec
MATLAB
23,808
745
function varargout = Ragu_TMapper(varargin) % RAGU_TMAPPER M-file for Ragu_TMapper.fig % RAGU_TMAPPER, by itself, creates a new RAGU_TMAPPER or raises the existing % singleton*. % % H = RAGU_TMAPPER returns the handle to a new RAGU_TMAPPER or the handle to % the existing singleton*. % % RAGU_TM...
7757729bca53162a38eaeed655b3d7f8eeb59a3bb3eff7a52cfc9cb7c326956d
MATLAB
23,863
547
function [CSIdata] = read_csi(file,type) % type = 'Siemens', 'Philips', 'GE' [p,f,e] = fileparts(file); if strcmp(lower(e),'.rda') type = 'Siemens'; elseif strcmp(lower(e),'.sdat') || strcmp(lower(e),'.spar') type = 'Philips'; elseif strcmp(lower(e),'.7') type = 'GE'; end if strcmp(type,'Siemens') fid...
cb2ef79313cb25d5859fe432e7cc7d3f6a97d0729064f883532a580877dca322
MATLAB
24,029
848
% Cardiac model ToR-ORd % Copyright (C) 2019 Jakub Tomek. Contact: jakub.tomek.mff@gmail.com % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the Licens...
03380319e7dabc7430bdd953fff74f00f3c82d0e0b0d1ed59158745782306f82
MATLAB
24,074
477
function MovWindow20200220_sub global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon RtouchSpikeOnUnit LtouchSpikeOnUnit RtouchSpikeOffUnit LtouchSpikeOffUnit %SpikeArray‚ÅLPegTouchAllARpegTouchall‚ðƒAƒ‰ƒCƒ“‚µ‚½ƒNƒƒXƒRƒŠƒIƒOƒ‰ƒ€ %SpikeArray‚ÅLPegTouchAll‚ðƒAƒ‰ƒCƒ“‚·‚é...
dcc9c38b1316241274e89bd5653f183c2a71f229b83f4cb34fb20a15c0f4d966
MATLAB
24,089
848
% Cardiac model ToR-ORd % Copyright (C) 2019 Jakub Tomek. Contact: jakub.tomek.mff@gmail.com % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the Licens...
f2be370079f0cb6a06a102998ece508a924ee964aebbf7d3bb1f4351ad695f6b
MATLAB
24,210
489
function Repeat20201208 global RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 Spike_TouchRate IntervalCount FRvsIntervalTouchRate PhaseCountRate... TouchCount PeakInterval PeakPhaseCount pegpatternum RLRcount LRLcount ... LtTouchCount LtSpike_TouchRate Spike Spike_Bin SpikeFR_...
5dc80aeddc32ec85063eca8a3774042644d3ab0b7bb8370b2049fd8d903eae3c
MATLAB
24,222
721
%{ ---------------------------------------------------------------------------- %Stimulus bias changes by block %Just model analysis %Based on Rao 2010 Front Comp Neurosci %Value updating + Prior updating ---------------------------------------------------------------------------- %} function Figure2b_Dual_RL...
b5eaffed98cc7fe297f9c247cec576b47308c1c2ee5288fe64c05cec9585eb44
MATLAB
24,229
483
%% Analysis of block type index % Create a class classdef BlockType % functions for analyzing block type index methods(Static) function GetBTind(MouseName, seDir) % Inputs % MouseName Mouse name % seDir Directory of session explore ...
a229592427fc19f3347f779b3a82e0eadaa16e7e618114dfdcf9ed5de6cbd444
MATLAB
24,280
585
function [x_denoised, baseline_reference, x_mains_cancelled] = ecg_strip_viewer_waterfall(x_raw, fs, f_mains, varargin) % % ecg_strip_viewer_waterfall: A function to process and visualize ECG signals. % % USAGE: % [xd, bl, xm] = ecg_strip_viewer_waterfall(x, fs, f_mains, title, params); % % INPUTS: % x_raw: Raw EC...
4cb19e4b1f12dd26874db7158c8154d3572510e6855c1bc698ec9293ecf8b963
MATLAB
24,287
857
% Cardiac model ToR-ORd % Copyright (C) 2019 Jakub Tomek. Contact: jakub.tomek.mff@gmail.com % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the Licens...
2732a8549cdf636195ef119f3b8d05bb4503b118b98b0f020360b3a60038fc4e
MATLAB
24,289
857
% Cardiac model ToR-ORd % Copyright (C) 2019 Jakub Tomek. Contact: jakub.tomek.mff@gmail.com % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the Licens...
fec8c8d9176cd008b5b9fcc232622c221275eb22ed1f946dccb06221030d2e7b
MATLAB
24,352
858
% Cardiac model ToR-ORd % Copyright (C) 2019 Jakub Tomek. Contact: jakub.tomek.mff@gmail.com % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the Licens...
71ea2875ec58f56ab0970a01bae573a5e04e504d1bc7ab300dd8e86e81cb57d1
MATLAB
24,381
727
function RRR(varargin) % Do reduced rank regression (RRR) % The code in the paper "Cortical areas interact through a communication subspace", Semedo et al. (Neuron, 2019) % are used for this analysis (see 'https://github.com/joao-semedo/communication-subspace') % These codes are at 'Distributed_and_dynamical_communic...
4575cddecf8ac7d19b48590db55ed7f09ef52d0a446739ffe0389cd712eeb588
MATLAB
24,427
586
function [data_posterior_est, data_prior_est, n_var] = ecg_den_phase_domain_gp_full_cov_draft(data, I_peaks, params) if ~isfield(params, 'bins') % number of phase bins params.bins = round(max(diff(I_peaks))); % use median of RR-intervals in samples by default end if mod(params.bins, 2) == 0 params.bins = param...
1fc95b18f542cc2e327aa211dee10a173abd3961e90c01290b80b461531513d3
MATLAB
24,498
466
function RLt_Sum_20200303 %%%%%%%¶‰E—¼•û‚̃EƒBƒ“ƒhƒE‚ð“®‚©‚· global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon RtouchSpikeOnUnit LtouchSpikeOnUnit RtouchSpikeOffUnit LtouchSpikeOffUnit... pegpatternum pegpatternname RTroughlocsInterval LTroughlocsInterval LlocsInterval Rlo...
f27b9ebf585e9bc96b81a4d2b8e0d6575e6f15845e67508817a8cdb2ee537cdc
MATLAB
24,622
622
function plot_spikes_ad(app) drawnow; data = app.user_data; par = data{1}; spikes = data{2}; classes = data{6}; classes = classes(:)'; inspk = data{7}; temp = data{8}; ls = size(spikes,2); minclus = app.settings.minclus; clustering_results = data{10}; % Extract spike features if needed if strcmp(app.dd_shape.Valu...
fb3cb79eda59e2ff9059671ec47925af184350ec294e84909dca44f0fee89e97
MATLAB
24,625
525
function varargout = TouchDividerAnalyzer24ch(varargin) % TOUCHDIVIDER M-file for TouchDivider.fig % TOUCHDIVIDER, by itself, creates a new TOUCHDIVIDER or raises the existing % singleton*. % % H = TOUCHDIVIDER returns the handle to a new TOUCHDIVIDER or the handle to % the existing singleton*. % %...
fcfcd4340a98f3ce7ac5801d7504f8d85038ea76e03503a928c7bb93927588c0
MATLAB
24,627
542
function SpikeAnalysisSet(n,U,M) global StartTime FinishTime fname SpikeUnits TurnMarkerTime OneTurnTime RPegTouchAll LPegTouchAll DrinkOnArray dpath3... MedPegTimeR MedPegTimeL RpegTimeArray LpegTimeArray RpegTouchall LpegTouchall WaterOnArrayOriginal WaterOffArrayOriginal... RpegTimeArray LpegTimeArray DrName Un...
b16914b3df6028114f630d3ddd93088c4637c7dae19c77446f6add73922417e8
MATLAB
24,667
773
function varargout = NeMo(varargin) % NEMO M-file for NeMo.fig % NEMO, by itself, creates a new NEMO or raises the existing % singleton*. % % H = NEMO returns the handle to a new NEMO or the handle to % the existing singleton*. % % NEMO('CALLBACK',hObject,eventData,handles,...) calls the local ...
fffc76de77b3c32317aa0c256770a12574497cfac5fe10353cd1b1adf3096009
MATLAB
24,775
507
%% Calcium Imaging Analysis Operator (prepare) % CIOA_01_prepare is the first of a series of scripts aiming for an % easy-to-use calcium imaging analysis pipeline. Here, we collect and % prepare raw, apply spatial and temporal filters, and correct baseline % shifts due to, for example, bleaching. % CIOA assumes a stric...
2b6468975a81c7d1281df53673bd343b2c3ab3c70d3807f89d4bcb9afa7bf180
MATLAB
24,797
600
function autoSplit(obj, multisite) %AUTOSPLIT if numel(obj.selected) > 1 return; end if obj.isWorking jrclust.utils.qMsgBox('An operation is in progress.'); return; end if obj.hClust.unitCount(obj.selected) < 2 msgbox('At least two spikes required for splitting')...
4328680755a2959261d2deee24b7a1d2f27cc4de992219532f363abb338c838f
MATLAB
24,866
495
function [atlas, sz] = loadAndProcessAtlas(f, hemi, underlay, lg) % Loads and Processes Atlas Data from Various File Formats % % [atlas, sz] = loadAndProcessAtlas(f, hemi, underlay, lg) % % **Description** % ------------ % The `loadAndProcessAtlas` function is designed to load and process atlas data from % multip...
9699add460800828b438b61d5d5d3414b13e4c1865158440e7a4fd397efe4ad6
MATLAB
24,870
678
clearvars close all badtrls if badtrls project_dir = '.\Adults_badtrls\'; else project_dir = '.\Adults\'; end TFS_results_adults = table({},... 'VariableNames',{'ID'}); TFS_results_kids = table({},... 'VariableNames',{'ID'}); conwin = [2.5,3]; extension_T = ''; %% envelopes mean_E...
8ee71272b829dcc995bdf59c69326d7e54e501ce4835193ddeed145ce34a1ff7
MATLAB
24,905
894
% This is where we load all of our participant files directories', as well as % parameters for processing the output of the ECHT device and exclude participant's % with artifacts. % Written 9/15/2023 - Tylor J Harlow - tylor.harlow@uconn.edu %% Housekeeping % Clear all figures, data, and set a timer. close all clea...
8221d94df0d4fee5179ae65b0707d00ef7edc69576e4ca8d3e0f813395b48a3f
MATLAB
25,013
476
%% Fig1G_Fig2B_Fig2C % Choose and load the appropriate files for analysis clear all; [FPfiles,FPpath] = uigetfile('*.mat','Select FP Files to Analyze','MultiSelect','On'); %% Fig1d-rDA3m mean response across time % NOTE: Using JT065, Right-Hemi NAc as the example mouse (I only did n = 1 for this experiment) ...
3f8cec2b353ff6523228d9fab922fe0aa8dcfd2f00545101d040ddef113ce2ab
MATLAB
25,032
465
clearvars -except Behav_path Path_figures Path_variables MEG_path close all SubjectID={'S01' 'S02' 'S05' 'S15' 'S19' 'S20' 'S22' 'S24','S21','S25','S23'}; Drug=[3 1 1 2 3 2 3; 3 1 3 2 1 2 0; 2 1 1 3 2 3 0; 1 3 3 2 2 1 0; 2 3 1 2 1 3 0; 1 2 3 1 3 2 0; 3 1 2 2 1 3 0; 3 1 1 2 3 2 0; 2 1 1 2 3 3 0; 3 2 1 3 1 2 0;2 3 2 1 ...
a1971fb388d3a3b720363f73b17efe37e8261a9d024a0c0cb5d3945179ec0a3e
MATLAB
25,075
443
function [figs, path] = find_outputfiles(app) path = uigetdir; listing = dir(path); f_names = {[]}; f_idx = 1; for i = 1: length(listing) if ~listing(i).isdir if ~contains(listing(i).name,'xls' ) tmp_idx = []; tmp_idx = strfind(listing(i).name,'_INT'); if ~isempty(tmp...
4ab4ae2f41dc5dbe4382234790263bf15bc25dc6f32e6c5006e36dbde062ffa9
MATLAB
25,131
679
function varargout = Projection3D(varargin) % Projection3D % Given two projection vectors and data, creates a random orthogonal projection % vector, and projects the data onto that space (in scatter for points) % % Evolve: Shows timecourse of the data. Can be saved as movie (.avi). % % Copyright Benjamin Cowley, Mat...
26ef19b0a48acd800da16e67a9fbd44b2e01955f30cf3879b535b5a80b43442f
MATLAB
25,155
599
function senpai_seg_core_v4(path_in,im_in,varargin) % senpai_seg_core: % segments a 3D .tiff image by using a topology-informed % k-means based clustering approach % % Execute the function in the command window: % Syntax: % % senpai_seg_core(path_in,im_in...
b92bebf34dc933fd96e94e88d4f3e40867a8dc6ce746d39d8d49bad35fda02c3
MATLAB
25,310
608
%% Complete data array for each recSite % Concatenate sessions % Fill with nan % Get firing rate average % load data array load('E:\Data_array\AllTrials_10bin_Smooth_lickOnset\data_array.mat') % load('E:\Data_array\AllTrials_100bin_noSmooth\data_array.mat') % Import setting B = 2; % number of contexts:...
989e20d15d49dd8e90ca16f002a9cabf256eaca9fa2546c3e24fe7eb814761b4
MATLAB
25,314
900
%% analyse FA single-trials sessionTags = {'M22027', '20220517';... 'M22029', '20220607';... 'M22031', '20220524'; 'M22032', '20220621'; 'M22033', '20220706'}; dataDir = 'C:\Users\edward.horrocks\Documents\Code\V1Dynamics\Data\basic_111022'; s = struct; for isession = 1:5 tic fname = [sessio...
7c270be1350368ca8c433cfc92da550c8593caac135f9525b5345b507d8bda22
MATLAB
25,324
726
% Stanislav Sherepanov Agnès Martin Pierre Fontanaud % Calcium Analyse Reseau %function [Result_Detection]=Analyse_Calcium_Data_Network() addpath('BCT\2019_03_03_BCT\'); %addpath('F:\Calcium_Matlab_code\Analyse stanilav09102020\emd\'); %addpath('C:\Users\Analyse\Documents\MATLAB\Analyse stanilav09102020\emd\'); clos...
3ed4c942f1514cd5d2c79e376172ace9f6ae610fcc191dbed95b929dfb2d0e6c
MATLAB
25,394
559
function SpikeAnalysisSet20180527(n,U,M) %Autocor‚ÍSpikeArrayADrink‚ÍSpikeArrayWon,WaterOn/Off‚Å‚ÍSpikeArray %Touch‚Å‚ÍSpikeArray‚ÆT‚ðŽg—pB global StartTime FinishTime fname SpikeUnits TurnMarkerTime OneTurnTime RPegTouchAll LPegTouchAll DrinkOnArray dpath3... MedPegTimeR MedPegTimeL RpegTimeArray LpegTimeArray...
daff5e9820ec8f67d0084cc1fa38296d94809206da9c4e6429fee1fc1ddd1796
MATLAB
25,435
362
function varargout = Ragu_Import_Help(varargin) % RANDOMIZER_HELP M-file for Ragu_Import_Help.fig % RANDOMIZER_HELP, by itself, creates a new RANDOMIZER_HELP or raises the existing % singleton*. % % H = RANDOMIZER_HELP returns the handle to a new RANDOMIZER_HELP or the handle to % the existing singl...
e71c2ac784528ca3fd10022b5523e3cef612e64f7cbcbb7b5aaadd18aa55e70e
MATLAB
25,637
518
function print2eps(name, fig, export_options, varargin) %PRINT2EPS Prints figures to eps with improved line styles % % Examples: % print2eps filename % print2eps(filename, fig_handle) % print2eps(filename, fig_handle, export_options) % print2eps(filename, fig_handle, export_options, print_options) % % This fun...
52ba0c4558b8da39e11a42f6cae7cd606c59c301cb92d20cd1f80fe4324380fe
MATLAB
25,649
874
function Randomizer_ShowTanovaResults(out,h) % Copyright 2009-2019 Thomas Koenig % distributed under the terms of the GNU AFFERO General Public License handles = guidata(h); if strcmp(get(handles.Options_PartiallEtaSquare ,'Checked'),'on') EtaSqTypeToUse = 2; else EtaSqTypeToUse = 1; end if strcmp(get(handle...
40645bafe1e74fdb8590e218f1307559ff98103ec7288f5983b52274557214e6
MATLAB
25,906
619
function [data_posterior_est, data_prior_est, n_var] = ecg_den_phase_domain_gp_full_cov(data, I_peaks, params) if ~isfield(params, 'num_phase_bins') % number of phase bins params.num_phase_bins = ceil(max(diff(I_peaks))); % use max RR-interval by default end if mod(params.num_phase_bins, 2) == 0 params.num_pha...
3c87dfd15d5a919a626d00f702fd78900bde4cacef7a1ebbd06960a04e386f12
MATLAB
25,992
559
function burst_report(app) %BURST_REPORT writes graphs and xls sheets with results of burst analysis % Detailed explanation goes here %% create results plot_data = struct('name',[],'integral',[],'amplitude',[],'duration',[],... 'n_bursts',[], 'burstrate',[], 'burstincidence',[], ... ...
91dca179b0e69227a11f8919567112ed1262f666d9fb9b519d92f640c0bfe98a
MATLAB
26,005
569
classdef tVennEulerDiagram < matlab.unittest.TestCase % tVennEulerDiagram Tests for vennEulerDiagram. % Copyright 2021 The MathWorks, Inc. properties Figure ChartConstructor = @hTestVennEulerDiagram end properties(TestParameter) % Data for testing if correct errors are pr...
f5152ff3a84f66cc45d3ff93cb9a77fe362bdfd48ee6f29760d852eddee3051a
MATLAB
26,123
436
function WindowApply20200225(RorL) global render RtouchSpikeOnUnit LtouchSpikeOnUnit RtouchSpikeOffUnit LtouchSpikeOffUnit LtNegativeSpikeOffKaisuu RtNegativeSpikeOffKaisuu ... RtPositiveSpikeOffKaisuu LtPositiveSpikeOffKaisuu pegpatternum pegpatternname... LtPositiveFiringRate LtNegativeFiringRate RtPosit...
29157ee3e11ffca91fc4e0d5bf16e66acaad2d147bd9e6ce22e188df97fb59ef
MATLAB
26,281
302
function [RpegTouchCell,LpegTouchCell,RLpegTouchCell,RLpegName,RLpegMedian,RpegTouchTurn,LpegTouchTurn]=PegTouchAnalysis(PegTouchCell1,SliderTouch1,TurnMarkerTime,OneTurnTime1,RpegTimeArray2D,LpegTimeArray2D,FTselect) %'PegTouch'‚Ísensor‚̏î•ñ‚𓾂½‚¾‚¯B12ch‚·‚ׂĂªRpeg12–{‚ÉŠ„‚è“–‚Ä‚ç‚ê‚Ä‚¢‚邯‚«‚É‚ÍPegTouch‚¾‚¯‚Å‚à...
dc406d8e6a8be239b48aad1fab8de6148b18c792d8a737b9805712ce68ad1a5e
MATLAB
26,298
714
function [pi_0_lsim , coupling_tetha_IM , transition_matrices_IM , gmm_para_lsim , AIC, log_likelyhood, BIC, pi_steady] = em_lsim_svi( channels_observations , channel_num_states , num_gmm_component , max_itration , extra) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SVI inference %%%%%%%%%%%%%%%%%...
2abd3c67ea55a42f3c33b12653c16323778302c04dcaf23cb90699064c23dc78
MATLAB
26,299
655
%% Data for figure 3 % Load data work = whos('SPRiNT*'); % Data is saved as SPRiNT01, SPRiNT02, etc. if numel(work) > 1 sd = eval(work(1).name).SPRiNT; for t = 2:numel(work) sdtmp = eval(work(t).name).SPRiNT; sd.channel(end+1:end+length(sdtmp.channel)) = sdtmp.channel; end else sd = eva...
d133d829d44f33b91585cc661b09dbdc18b02fc6f246dad7c8b3e635a8e020ce
MATLAB
26,517
725
function result = rst_rep_anova_T2(varargin) % This function computes repeated measures ANOVAs - Unlike standard ANOVAs, % it relies on a multivariate framework which automatically account for the % correlation between measures. One advantage of this approach is that one % does not have to account for sphericity ...
a56f8c70b4abca79f8413dfd5f6219e46bc51bbf7d746956eb2ec5a75471141b
MATLAB
26,553
624
function [status] = ft_hastoolbox(toolbox, autoadd, silent) % FT_HASTOOLBOX tests whether an external toolbox is installed. Optionally % it will try to determine the path to the toolbox and install it % automatically. % % Use as % [status] = ft_hastoolbox(toolbox, autoadd, silent) % % autoadd = 0 means that it will ...
2758d2e870c273a193d4dcc562c5bc339b1415f6fbe793aace7205e92aa948df
MATLAB
26,666
491
close all; clear; clc %-------------------------------------------------------------------------- w1 = 0.72; % First stage baseline wander removal window size (in seconds) w2 = 0.87; % Second stage baseline wander removal window size (in seconds) BASELINE_REMOVAL_APPROACH = 'BP';% 'BP', 'MDMN'; % baseline wander remova...
a1ad51e92a46541e2e6578fe2b1fb530fc0ea9d4fa971789bf623ef94a5ba319
MATLAB
26,745
897
function [A, W] = fpica(X, whiteningMatrix, dewhiteningMatrix, approach, ... numOfIC, g, finetune, a1, a2, myy, stabilization, ... epsilon, maxNumIterations, maxFinetune, initState, ... guess, sampleSize, displayMode, displayInterval, ... s_verbose); %FPICA - Fixed point ICA. Main algorithm of FASTICA....
b4cf068ac36e2850856439cb5bd8b043eb6325fcc7067cc89a115fe3141898a6
MATLAB
26,849
584
%% Prerequest % 1.trial list which present all the trials % 2.a folder that contains all the behavioral data generated from % Lick_BehavDat.m %% 1. Read case list and addpath case_list = 'optogenetics_at_w'; trial_list = list_lick(case_list); [num_trials, c] = size(trial_list); addpath(genpath('E:\Wang_Behav...
fc0490025f23c67fcd9546f7458acd08a9406f43031167ceb1ec7636aaed1280
MATLAB
26,864
906
% Script for behavioral analysis of socialdoors data % Reaction times after wins? After losses? Are these different between tasks? % Jimmy Wyngaarden--July 1, 2022 clear; close all; % Point this to the istart social doors data directory: maindir = '/Users/jameswyngaarden/Documents/Documents_Air/GitHub/istart/social_...
6b3d7288720476b19d54b5548cd933c4d990a769fa6485f02be5cc0b3c717a4c
MATLAB
26,915
547
% Funtion to denoise Fluorescence Signals % By Wavelet Analysis under asumption: noise is iid % Wavelet denoiseing @script % VChS-A: Valley-Checking Segmentation Algorithm @in code % Smooth by rloess % Input % XD: Raw Signal % Output % Xest: Estimated Denoised Signals % SNRbyWT: SN...
baf1b04da308f59c92211d33d3f54271b62e5e44c60220505d6e8ccbe6f48839
MATLAB
26,957
582
function burst_report(app) %BURST_REPORT writes graphs and xls sheets with results of burst analysis % Detailed explanation goes here %% create results plot_data = struct('name',[],'integral',[],'amplitude',[],'duration',[],... 'n_bursts',[], 'burstrate',[], 'burstincidence',[], ... ...
9039db984a05ac4cf7c9d9ec8dd2cb9ddb8a1afc67a9de9453175c750c774b91
MATLAB
26,973
583
function burst_report(app) %BURST_REPORT writes graphs and xls sheets with results of burst analysis % Detailed explanation goes here %% create results plot_data = struct('name',[],'integral',[],'amplitude',[],'duration',[],... 'n_bursts',[], 'burstrate',[], 'burstincidence',[], ... ...
963edb71f20add89cd879463c3407a9d594c434e2919e046259aebd1691e44ee
MATLAB
27,020
583
function burst_report(app) %BURST_REPORT writes graphs and xls sheets with results of burst analysis % Detailed explanation goes here %% create results plot_data = struct('name',[],'integral',[],'amplitude',[],'duration',[],... 'n_bursts',[], 'burstrate',[], 'burstincidence',[], ... ...
6ca94d04c459bee24c243cf666a164b815b11df202531e07031636cb0604d039
MATLAB
27,021
489
function [autocorr_ACh, autocorr_DA, corr_AChACh, corr_DADA, corr_cell_samehemi, lags, shuffAChACh, shuffDADA, shuff_achda] = JT_autocorrFP(beh, varargin) %Cross-correlation between ACh and DA photometry signals acquired during %dual color photometry recordings % % [corr_achda, lags] = AK_corrFP(beh) % [corr_a...
890157d64c1e929e121ebe4b34a0923d51bd42361408427e89205c6ea2f33f3a
MATLAB
27,096
599
function SpikeAnalysisSet20180528(n,U,M) %Autocor‚ÍSpikeArrayADrink‚ÍSpikeArrayWon,WaterOn/Off‚Å‚ÍSpikeArray %Touch‚Å‚ÍSpikeArray‚ÆT‚ðŽg—pB global StartTime FinishTime fname SpikeUnits TurnMarkerTime OneTurnTime RPegTouchAll LPegTouchAll DrinkOnArray dpath3... MedPegTimeR MedPegTimeL RpegTimeArray LpegTimeArray...
83459ee6f789840a93caeb40480d77ff5d71809c433aa66d50cd7ccdd49775ec
MATLAB
27,163
838
function [z,s,exitflag] = smoothn(varargin) %SMOOTHN Robust spline smoothing for 1-D to N-D data. % SMOOTHN provides a fast, automatized and robust discretized spline % smoothing for data of arbitrary dimension. % % Z = SMOOTHN(Y) automatically smoothes the uniformly-sampled array Y. Y % can be any N-D noisy a...
779702702134a8c0c3a052820c34ff177aec1bdc453e35df6ca4e0b2d378ddc3
MATLAB
27,320
584
function burst_report(app) %BURST_REPORT writes graphs and xls sheets with results of burst analysis % Detailed explanation goes here %% create results plot_data = struct('name',[],'simple_name',[],'integral',[],'amplitude',[],'duration',[],... 'n_bursts',[], 'burstrate',[], 'burstincidence',[]...
baf9a647cfbdd164dc2ccc37b0c465b817ca4cbe04a571e1d6f34fd0d486be8d
MATLAB
27,506
678
function index_pinky_Tstat_func(sub,ses,project_dir) restoredefaultpath cleaning_only = 0; fake_bad_ch =1; close all clc % project_dir = 'P:\Paediatric_OPM_Notts\'; % sub = '001'; % ses = '001'; run = 'run-001'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fieldtrip_path = [p...
3b1c525bb56b4260453ee4caa1e1f8c8f58acd93680aeb75e27b0bb188658401
MATLAB
27,558
851
function varargout = dspLoreta(varargin) % DSPLORETA M-file for dspLoreta.fig % DSPLORETA, by itself, creates a new DSPLORETA or raises the existing % singleton*. % % H = DSPLORETA returns the handle to a new DSPLORETA or the handle to % the existing singleton*. % % DSPLORETA('CALLBACK',hObject...
9621918fa5d8a92ac3ef235df6828d4bdd6f4b8328b7f800a4245987d6ec82d1
MATLAB
27,788
858
function [x,x_debias,objective,times,debias_start,mses,taus]= ... SpaRSA(y,A,tau,varargin) % SpaRSA version 2.0, December 31, 2007 % % This function solves the convex problem % % arg min_x = 0.5*|| y - A x ||_2^2 + tau phi(x) % % using the SpaRSA algorithm, which is described in "Sparse Reconstruction % by Separ...
d69a3d48d3eb0ba4c1abd1b78e7cbca02e42a829168fda6a935693ad7c80eca0
MATLAB
27,917
863
function [x,x_debias,objective,times,debias_start,mses,taus]= ... SpaRSAx(y,A,tau,varargin) % SpaRSA version 2.0, December 31, 2007 % % This function solves the convex problem % % arg min_x = 0.5*|| y - A x ||_2^2 + tau phi(x) % % using the SpaRSA algorithm, which is described in "Sparse Reconstruction % by Sepa...
7410ad526bcf01c07b9a6132737237120b06c8b1a72e75e524a2fa3f827102b8
MATLAB
27,929
713
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %Compare sound, choice prior during long sound (-100 ms to 150...
278cb1ed5417d28bd8b9fa4e03ebd6fbf16124371fa6255a29a06f58fc0d4154
MATLAB
27,932
480
classdef Inhibition methods(Static) function behavSummary = GetBehavInfo(seFilePaths) % Input: % seFilePaths: file paths for MSessionExplorers % Output: table of behavioral performance % MouseName: mouse name % sesh...
087a9d437193563dc3ee489a2182df98b2c6fe07385a833989dc995ec3dbe6c0
MATLAB
27,975
568
function Repeat20200219 global RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 Spike_TouchRate IntervalCount FRvsIntervalTouchRate PhaseCountRate... TouchCount PeakInterval PeakPhaseCount pegpatternum RLRcount LRLcount ... LtTouchCount LtSpike_TouchRate Spike Spike_Bin SpikeFR_...
d96be71caf57522ddd2498a5122167fc5ce8313b224aa8876577741d9143c345
MATLAB
28,035
714
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %Compare sound, choice prior during long sound (-100 ms to 150...
a37df0fc30357f8ffab2674488f03ddf97805f8272c6aae67112bb5eb11292c1
MATLAB
28,140
750
function [t, x, names] = run_steps(model, varargin) % Runs a Matlab Simbiology model using STEPS. % % model a Matlab Simbiology model object. % varargin % - solver - 'wmdirect' or 'wmrk4' (deterministic), default: 'wmdirect' (stochastic), % - seed - set an explicit see for the pseudo random ...
7dc0eadf582ba07a1df5673d624ff8f447231acf070b413e85d01dcc72ea5e6d
MATLAB
28,178
567
% Load pre-processed 2P sal vs glu data into a single struct %%%%%% Analysis workflow: % cell_f_extraction_2P_doublecheckplanes_24012022a.m % ExportPreprocesseddata_2PGlusensstim08022022.m % Combine_2Pdata0802.m % Analysis_combined_data_2P.m % Locate2Pcells.m clear all clc params.colour_list = {[0 0.4470 0.7...
89b4914d862922735e858c36a3ade9d4c1ab19d6d32e019af66c1b2c3af5a458
MATLAB
28,180
558
%%Prerequest %combined behavioral and spike data in a single file folder %% 1. retrieve data disp('select brain region folder about combined files'); Folder_region = uigetdir('E:\Wang_combined files\mat\'); FileList_SpikMat = dir(fullfile(Folder_region, '**\*Spike*.mat')); FileList_lickMat = dir(fullfile(Folder_r...
b22f3578847cf1a8b514c52ae5cc6d04e45eb55b73031d95ebbe46b97e750c25
MATLAB
28,253
717
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %Compare sound, choice prior during long sound (-100 ms to 150...
989526045e78bdfd4c01ea725f2ef0905d5000bb1a656f2582e342b75342dc1a
MATLAB
28,270
717
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %Compare sound, choice prior during long sound (-100 ms to 150...
677a9fa0ff924e52bcfb6e8edb8c3d14f6b57c835b4746a9c5806ee447443142
MATLAB
28,295
556
function MovWindow20200220 global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon RtouchSpikeOnUnit LtouchSpikeOnUnit RtouchSpikeOffUnit LtouchSpikeOffUnit... pegpatternum pegpatternname RTroughlocsInterval LTroughlocsInterval LlocsInterval RlocsInterval %SpikeArray...
bf4f636127aa500735dd7bd88e2df213668bfa5ecce5733dd78732349d1ff109
MATLAB
28,319
558
function MovWindow20210116 global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon RtouchSpikeOnUnit LtouchSpikeOnUnit RtouchSpikeOffUnit LtouchSpikeOffUnit... pegpatternum pegpatternname RTroughlocsInterval LTroughlocsInterval LlocsInterval RlocsInterval %SpikeArray...
cdfbac9163188ded5c95687579b9f84e63835a1839a8011b1d5ce22ddaea6071
MATLAB
28,377
557
function MovWindow20201208 global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon RtouchSpikeOnUnit LtouchSpikeOnUnit RtouchSpikeOffUnit LtouchSpikeOffUnit... pegpatternum pegpatternname RTroughlocsInterval LTroughlocsInterval LlocsInterval RlocsInterval %SpikeArray...
2718859b6fced275167bf14648e7ff7e7b14147aa5611f9438e5a630c9d9d056
MATLAB
28,391
977
%% analyse FA - fit separately %% load dataa sessionTags = {'M22027', '20220517';... 'M22029', '20220607';... 'M22031', '20220524'; 'M22032', '20220621'; 'M22033', '20220706'}; dataDir = 'C:\Users\edward.horrocks\Documents\Code\V1Dynamics\Data\basic_111022'; s = struct; for isession = 1:5 tic ...
34803f2456f9488171969f4cb534a357fadd4fe954c57a1d7c4f9ad2960290cb
MATLAB
28,402
631
function save_spike_results(app) [int_idxs,~] = listdlg('PromptString',{'Please select intervals ',... 'to be plotted/saved.',''},... 'SelectionMode','multiple','ListString',app.popup_int_spike.Items); [form_idxs,~] = listdlg('PromptString',{'Please select fileformat ',... ''},... 'SelectionMode','mul...
141989589bc16122d51692784015f3ce04d4bbacfe315e7bfe1ebca40d90d546
MATLAB
28,549
736
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %Compare sound, choice prior during long sound (-100 ms to 150...
1946dbc7bfa7c659aae2e459b8d5099287757f82bfedf5c57cdd9b2b0b85366d
MATLAB
28,559
557
%% Create a class classdef tCorrectTrials % functions for analyzing tactile correct trials: tHit and tCR methods(Static) function GetAmplitude(MouseName, seDir) % Inputs % MouseName Mouse name % seDir Directory of session explore ...
0c91127c65042b1b7d5ca8c9ea4dbc6f5fbbb2a52f05dd9bd36559b96271e434
MATLAB
28,678
505
function [figs, path] = find_outputfiles(app) path = uigetdir; listing = dir(path); f_names = {[]}; f_idx = 1; for i = 1: length(listing) if ~listing(i).isdir if ~contains(listing(i).name,'xls' ) tmp_idx = []; tmp_idx = strfind(listing(i).name,'_INT'); if ~isempty(tmp...
a977e054f56d3dfa87c451038b086f33292694b75e778c39fe8ad1ab2687b4e9
MATLAB
28,875
741
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %Compare sound, choice prior during long sound (-100 ms to 150...
499b6f8be208e869f7d25ec666daae7e9e41d0bda0f14d653e1db7a98c3f1468
MATLAB
28,892
741
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %Compare sound, choice prior during long sound (-100 ms to 150...
2132ff9b0d24572cdd7b70439f0b683551f73d66fda95bfae7fc70beed84b33d
MATLAB
28,897
741
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %Compare sound, choice prior during long sound (-100 ms to 150...
9c396d883e4a65aecae2c55c9b7535cdc3424b07c867021379bad3dd16889b05
MATLAB
29,239
722
function index_pinky_4mm_Tstat_func(sub,ses,project_dir) restoredefaultpath cleaning_only = 0; fake_bad_ch =1; close all clc % project_dir = 'P:\Paediatric_OPM_Notts\'; % sub = '001'; % ses = '001'; run = 'run-001'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fieldtrip_path ...
e24a7a3e0c66187ca9fbef360e143794cb96dc93ba879c0fa6e67c111d69bac9
MATLAB
29,306
555
% Classification of initial states of transition trials % Trial-by-trial analysis % Initial state: -100 ~ 0 ms activity (100 ms before stimulus onsets) % We define transition as the time period from the first trial to the first hit trial. % Are the initial states of transition trials closer to the initial states...
4ae05943e179d6be16cf12b667fb4b12e18a5ff1caa82d7a4218bc163e9ea890
MATLAB
29,426
932
% plot figure 3 close all clearvars -except Behav_path Path_figures Path_variables Code_path SubjectID={'S01' 'S02' 'S04' 'S05' 'S06' 'S07' 'S08' 'S10' 'S11' 'S12' 'S15' 'S17' 'S18' 'S19' 'S20' 'S22' 'S24','S21','S25','S23'}; Drug=[3 1 1 2 3 2 3; 3 1 3 2 1 2 0; 1 3 2 1 3 2 0; 2 1 1 3 2 3 0; 2 1 3 1 2 3 0; 1 3 2 3 1...
890179c5b1a5d91a1fef69d14e16c86b269044a5838c790d4c1e36e828501691
MATLAB
29,458
707
function [pi_0_lsim , coupling_tetha_IM , transition_matrices_IM , gmm_para_lsim , AIC, log_likelyhood, BIC, pi_steady] = em_lsim_fast( channels_observations , channel_num_states , num_gmm_component , max_itration , extra) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SVI-inference %%%%%%%%%%%%%%%%...
c8d016120d3c006e5d85dcf130d74785ffc258220ae9c6ff53ec652106acbcd6
MATLAB
29,971
644
function [RpegTimeArray,LpegTimeArray,RpegTimeArray2D,LpegTimeArray2D,OneTurnTime,TurnMarkerTime data]=DataLoad24ch(PegOffset,dpath,fname) %1AFInfoidate, mouseID, sessionNo,training condition, Num.Turns,TotalTouchTime, TotalWaterOn, Num.Stops, 1-10, 11-20, 21-30, 31-40,,,) %2B:Start time array %3C:Stop time arra...