sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
91f214c0e4581dce87b26ad6911df964ff6e27a41967f8b04edca8a3af549903
MATLAB
13,530
335
function Model_Learning_NET_1(p1,p2) %p1: seed for random number and p1=1:1:\mu. There are \mu independent simulations %p2: N_psn: number of post-synaptic neurons. (p2=1: N_psn=4);(p2=1: N_psn=5) %(p2=1: N_psn=6);(p2=1: N_psn=7) %w =ab, w: W_vec, a: W_veca, b: W_vecb SDF1=10+(p1-1)*1e6; rng(SDF1); Ntrials0...
08dc3f3a38a1caed28121598e55e519600cc7f5bc167a8967fd7e12eff43730a
MATLAB
13,541
315
function [Jx_bar, Jy_bar] = solveClosureProblemPeriodic(problem, Edir, skin_map) % This function takes an input problem (specified in the traditional % 'problem' format used by the monodomain solver code) and solves the % steady-state diffusion problem with no reaction term, but subject to an % external electric field,...
fb7dd8cef8009db59576f3e099b1849c8d8985cb5f905a96e85e215121b9a49d
MATLAB
13,554
405
%sets up network for small 6-state environment simulation % Testing modifications to 'find next state' components after April '17 cleanup. % among other things, changed proxPast learning rule to be oscillatory and % cleaned up plot method. NEW_NETWORK=1; if NEW_NETWORK clear all NEW_NETWORK=1; else n.rese...
0c50ed3101657135799d57272d1d6f7b465454ab56ceb389196a96db27cf6826
MATLAB
13,563
473
function varargout = DRAFT_Headtracker_Behavior(varargin) % DRAFT_HEADTRACKER_BEHAVIOR MATLAB code for DRAFT_Headtracker_Behavior.fig % DRAFT_HEADTRACKER_BEHAVIOR, by itself, creates a new DRAFT_HEADTRACKER_BEHAVIOR or raises the existing % singleton*. % % H = DRAFT_HEADTRACKER_BEHAVIOR returns the handl...
e36d9e54f188a43eb419396bfdeb974188b59c5bcdc5e8bb3573dfa699c12355
MATLAB
13,578
314
function VikingPlot( varargin ) disp(''); disp('Version: 1.0.2019.04.23'); disp(''); dbstop if error %If no arguments passed, print usage if(nargin == 0) PrintUsage(); return; end %Walk through arguments, setting flags as needed CellIDs = []; %...
e2e8488877a45b542c30643d6c9008bcbe60f36009d063364587a02bdbfa8ec4
MATLAB
13,595
396
% PURPOSE : Creates and modifies channels using any algebraic expression (MATLAB arithmetic operators) % running over the channels in the current EEG structure. % % FORMAT : % % EEG = pop_eegchanoperator( EEG, formulas); % % % % INPUTS : % % EEG - input dataset % Formulas - expression for...
cc3a2b8005cbcece8018de8b2f97959d36ffab95f6d36bd6b4459b778646629c
MATLAB
13,616
385
function varargout = rerefassistantGUI(varargin) % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @rerefassistantGUI_OpeningFcn, ... 'gui_OutputFcn', @rerefassistantGUI_OutputFcn, ....
db8455c2b40cd3bf5655d977e545d794813c8a8f8106ac9963335c5a71508821
MATLAB
13,622
437
function varargout = Aversive_detection_GUI(varargin) % GUI for aversive detection task % %To do: %Fix AM depth percent plotting %Change GO trial color on plot %Add grouping variable plotting cabailities for optogenetics %Add pause mode (make default) so animal can warm up and get reminders %Remove Inf option for NOGO ...
693e11b4819a7005ab29b1fc83fe876b476f001193875e2d9eec695d34b27036
MATLAB
13,634
410
%sets up network for small 6-state environment simulation % Testing modifications to 'find next state' components after April '17 cleanup. % among other things, changed proxPast learning rule to be oscillatory and % cleaned up plot method. NEW_NETWORK=1; if NEW_NETWORK clear all NEW_NETWORK=1; else n.rese...
c222f31563a9010e0df640249193e61ae5f1c7dd3b5b6326864edd9b8c60255d
MATLAB
13,658
386
function varargout = f_rerefassistantGUI(varargin) % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @f_rerefassistantGUI_OpeningFcn, ... 'gui_OutputFcn', @f_rerefassistantGUI_Output...
279c8f4a62ff4f7a2c1b81f2353c16e28383680447b65a078077d665a0dc3133
MATLAB
13,669
298
%PURPOSE: 1) Organize and compute descriptive metrics for single %trial data from a set of Brainstorm subject directories % 2) Send these metrics to BST_ArtifactScanTool.m for GUI-based trial rejection % 3) Use resulting thresholds to mark new bad trials/channels %INPUT: ...
37fa7afb642c26d5701f46d00c17ffda210d3c168cb768d5c8e6854ad2d4c73e
MATLAB
13,677
348
function varargout = process_ft_sourcestatistics_VY( varargin ) % PROCESS_FT_SOURCESTATISTICS Call FieldTrip function ft_sourcestatistics. % % Reference: http://www.fieldtriptoolbox.org/reference/ft_sourcestatistics % @============================================================================= % This function is par...
d0d90d7f660fb9e1785ccc77ea3c3a9cace42c776e05fca393059089143f6cea
MATLAB
13,765
377
function [patterns, pattTypes, colNames, allPatternLocs, params] = ... findAllPatterns(vfx, vfy, params) % FINDALLPATTERNS finds the patterns at each point in time for % the velocity fields determined by the XxYxTime matrices VFX and % VFY. % PATTERNS is a matrix containing the type, location and time of each % p...
a99f2244c5796004ea8ae9779f81036dd4cde420a5a2ef15ce9cc8bc306841b2
MATLAB
13,769
362
function CHiME3_simulate_data_patched_parallel(official,nj,chime4_dir,chime3_dir) % CHIME3_SIMULATE_DATA Creates simulated data for the 3rd CHiME Challenge % % CHiME3_simulate_data % CHiME3_simulate_data(official) % % Input: % official: boolean flag indicating whether to recreate the official % Challenge data (default...
d6a9e67a5e9a74964a1212a28548edf943316d7ab84746a955047228f2ac474e
MATLAB
13,782
244
%%%%%%%%%%this script produces masked images for hand_objects when hands %%%%%%%%%%are annotated detailed. This script also visualizes the output %%%%%%%%%%%%%%%%%%%% images written to the output directory. %%%%%%%% Comment out all imshow() statements if you want to speedup the %%%%%%%% execution of this script....
ed0d1b5d68e2df19d80e31262c24eaba8fbeec98c0a472463249c18cc5bbd0d4
MATLAB
13,790
398
%% getModelSetup_at % gets the different types of models. By default, uses the cosine tuning model (same dir tuning for sample/test, but different cat tuning) % % Directions that are only used in the sample or test stimulus can be specified using the optional fields TaskInfo.Direction_sample and TaskInfo.Directions_tes...
bc36eef0d11a4afddf0aad560c27cd270aee6086a9c1fd7c2cacec2abc57da8b
MATLAB
13,791
330
% Code to produce Supplementary Fig. 7 % Analysis of saccade amplitude and direcction during the optogenetic and visual detection taskS % sessionIDs = [456:460]; % DC laser sessions with consistent stimulation addpath sacc pxPerDeg = 27.854; % pixels per degree of visual angle at the center %% run saccade ...
059740f16ca46d3bc6dd7a5abd1fc5699cfa1ddadd98b2ba001d235d3a5d078a
MATLAB
13,830
357
function map=pmkmp_new(scheme, n) % PMKMP_NEW Makes perceptually balanced colormaps with rainbow-like colors % % ARGUMENTS: % scheme -- Colormap scheme. Can be linear schemes 'isol' or % 'cubicl', or circular schemes 'ostwald', 'ostwald_o', or % 'edge'. Default 'ostwald_o'. % ...
25c1ee6df944e9c89b37bf2762d43012ab992602d090efadcb8623d3ffe17ff8
MATLAB
13,834
549
function SaveDataFiles_v2 clear all close all force clc % Created 07 Apr 2017 JDY %---FLAGS---% CHL = 0; % Rates = [64 128 256]; Rates = 512; % Gerbil = ['236397';'243027']; % Gerbil = '236397'; % Gerbil = '243027'; Gerbil = '247026'; % Gerbil = '239151'; % Gerbil = '240130'; % Gerbil = '2...
0dcd4548c91ebc504ffdc5ea51d01da36719a497e3a28c1a481506dd74ffed63
MATLAB
13,897
378
% Inputs: % %ALLMVPC -ALLMVPCSET %MVPCArray -index(es) of selected MVPCsets %qtimeRange - time range e.g, [-200 800] %qXticks - x tick labels e.g., [-200 0 200 400 600 800] %qXtickdecimal - xtick precision e.g., 0 %qXlabelfont - font name for...
7c22b45a30750c4f70ec6b7e77c2e4960317a61e2f2a59f7c2f965c9f879bb91
MATLAB
13,899
453
%This is a program that pools all the behavioral data, agnostic about %imaging data. "Data for DMDL_DLDM_CBDL" under behavioral analysis under %pooled data. Created by Haleh Fotowat clearvars % close all path=uigetdir; cd(path) load('ave_spont_rate.mat') behav_fname1=dir('2*_b.mat'); stim_fname1=dir('2*_s.mat') per2p=1...
ea12380eef24068d3fc7d9c2072df48b790fce2fe5d21778f0f9968751a4eb69
MATLAB
13,901
281
% Package GMLM_dmc for dimensionality reduction of neural data. % % References % Kenneth Latimer & David Freeedman (2021). Low-dimensional encoding of % decisions in parietal cortex reflects long-term training history. % bioRxiv % % Copyright (c) 2021 Kenneth Latimer % % This software is distributed unde...
08fe0708d6234cbc0332fd99f69bad3cf2d6146a6f52df446f973fe16c37802e
MATLAB
13,942
360
function Model_Learning_NET_2(p1,p2) %p1: seed for random number and p1=1:1:\mu. There are \mu independent simulations %p2: N_psn: number of post-synaptic neurons. (p2=1: N_psn=4);(p2=1: N_psn=5) %(p2=1: N_psn=6);(p2=1: N_psn=7) %w =ab, w: W_vec, a: W_veca, b: W_vecb SDF1=10+(p1-1)*1e6; rng(SDF1); Ntrials0...
0c62c12a4d1e711a15c98ee0349de8a74b61d3054a8287a809f74c5a67b445f5
MATLAB
13,971
477
function Example_recovered_parameters % Script recreates figure 5 from the manuscript. This provides an example of the recovered parameters to 2 % subjects using simulations obtained from applying the SOEA20, SOEA45, % MOEA20 and MOEA45. FS1 = 7; % fontsize % Load simulations load('Total_Simulations_moea20...
239c89cdfa5b931f9e56ad711b7e70d4195ee2d1775fcce75e67d41a110a2403
MATLAB
13,979
452
function varargout = Training_Mk1(varargin) % Training_Mk1 MATLAB code for Training_Mk1.fig % Training_Mk1, by itself, creates a new Training_Mk1 or raises the existing % singleton*. % % H = Training_Mk1 returns the handle to a new Training_Mk1 or the handle to % the existing singleton*. % % Tr...
3fc4ab795e741d09620db340a1d463cd511f0e4000a7cc2397d908f889894456
MATLAB
14,018
454
function varargout = Modulation_Mk1(varargin) % Modulation_Mk1 MATLAB code for Modulation_Mk1.fig % Modulation_Mk1, by itself, creates a new Modulation_Mk1 or raises the existing % singleton*. % % H = Modulation_Mk1 returns the handle to a new Modulation_Mk1 or the handle to % the existing singleton...
597212e5baa5d71a71af8756ca8b9635222853bef6cb381b7b756fd9beb9d2ad
MATLAB
14,021
307
function plotCompDetails(spkVIS,spkHPF,spkPredVIS,spkPredHPF,focusOn) %%% Look at similarity of responses across PCs/regions, etc. %% Process a bit the data mainFigP = spkVIS.mainFigP; nMiceVIS = size(spkVIS.dataMPC_even,4); nMiceHPF = size(spkHPF.dataMPC_even,4); % reorient the pcs s = ...
412c47cd0224f2ddfcfa07569bb6df26780e7bdd563a27b70c0ac03e4ad2c811
MATLAB
14,031
434
function NextTrialID = TrialFcn_appetitive_kp_SanesLab(TRIALS) % NextTrialID = TrialFcn_PureToneDetection_MasterHelper(TRIALS) % % This is a custom epsych function for the Sanes Lab for use with % appetitive GO-NOGO tasks. % % NextTrialID is the index of a row in TRIALS.trials. This row contains all % of the informatio...
708590704128c604435fcf528337eb0d922002e3a03a1e9db4a62815ac342414
MATLAB
14,066
426
function varargout = f_MVPC_save_as_GUI(varargin) % F_MVPC_SAVE_AS_GUI MATLAB code for f_MVPC_save_as_GUI.fig % F_MVPC_SAVE_AS_GUI, by itself, creates a new F_MVPC_SAVE_AS_GUI or raises the existing % singleton*. % % H = F_MVPC_SAVE_AS_GUI returns the handle to a new F_MVPC_SAVE_AS_GUI or the handle to %...
b5dd50b649b56d16eb1caec31a21f6814abbab899c609910c6af56091c8cbf4e
MATLAB
14,074
320
function [err, graphics_card, GetVideoLine] = crsFindLinearLUT(N,INIT,COMPORT) % [ERR, cLUT, VideoReceived] = crsFindLinearLUT(N,INIT,COMPORT) % % crsFindLinearLUT determines an appropriate linear LUT to load into the % host GPU palette. This is required to ensure that pixel values are % transmitted to the CRS...
624dabffc81bfd89d3fd1a43acdd73b12607291f859bb3f3eaf2a74f8735feed
MATLAB
14,087
442
% *** This function is part of ERPLAB Toolbox *** % Author: Guanghui % Center for Mind and Brain % University of California, Davis, % Davis, CA % 2024 %b8d3721ed219e65100184c6b95db209bb8d3721ed219e65100184c6b95db209b % % ERPLAB Studio Toolbox % Copyright © 2007 The Regents of the University of California % Created by ...
83e0a4c38039e5123edf6bdcf2a855738cce4ab0bf8c541d97d2589b399f23f9
MATLAB
14,112
481
%% RIF analysis plotwin = [-0.3 0.4]; analysiswin = [0.0051 0.3051]; excanalysiswin = [0.0051 0.2051]; baselinewin = [-0.3 0]; binsize = 0.001; gwdur = 0.02; DB = 'ds_a1_aaf_mod_mgb'; if isunix host = 'localhost'; else host = '129.100.241.107'; end % Make connection to database. if ~exist('conn','va...
a4370642d80ec781209157f8ea1876fbf855f963d448eb29f2bd03b25b0857db
MATLAB
14,113
388
% Script to test the accuracy of pattern detection and tracking with % multiple simulated critical point patterns % Rory Townsend, Aug 2018 % rory.townsend@sydney.edu.au close all rng(100) %% Set parameters gridSize = [16 16 10]; alphas = 0.01; alphas = linspace(0, 3, 7); alphas(1) = 0.1; betas = [0.01, 10]; %noisele...
73503a3e5c1b8a78b8611d83c2eeae2db10b1ad63117fef67f274c2df8b32ed6
MATLAB
14,183
450
function varargout = f_EEG_saveas_multi_bestfile(varargin) % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help f_EEG_saveas_multi_bestfile % Last Modified by GUIDE v2.5 18-Jun-2024 19:50:47 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_...
a8624450f8cb7183555d09d69dd2d3fbef17180f93589546dd02093d60fc309c
MATLAB
14,198
309
% A single JIDE property field in a JIDE property grid. % This is an internal class and is not intended to be used directly. % % References: % http://www.jidesoft.com/products/JIDE_Grids_Developer_Guide.pdf % % See also: PropertyGrid % Copyright 2010 Levente Hunyadi classdef JidePropertyGridField < handle ...
cffc53a7213c9d89ab3d4138e017abc1e260e017b3fe1806c5519cc5727e4401
MATLAB
14,241
334
function [section_pop] = extractRegionPop(endo, ratioR, ratioD, ... idFascicle, idPop, idCross, section_pop_prev) % EXTRACTREGIONPOP Extract the region where to place the fibers acording to % the population type and the endoneurium cross-section area % %[section_pop] = extractRegionPop(endo, endoC, idFascicl...
587a687beddb44f5fc3a2ed6fc9b092a972d63dc81d335731f6946f04f010588
MATLAB
14,250
565
classdef ( Hidden ) Text < matlab.mixin.SetGet %uix.Text Text control % % t = uix.Text(p1,v1,p2,v2,...) constructs a text control and sets % parameter p1 to value v1, etc. % % A text control adds functionality to a uicontrol of Style text: % * Set VerticalAlignment to 'top', 'mid...
ab83c20acffb0083e4ac17f0a52c0cee3c9fb4438ba8802c4f9f7ee77fee7638
MATLAB
14,250
285
% Package GMLM_dmc for dimensionality reduction of neural data. % % References % Kenneth Latimer & David Freeedman (2021). Low-dimensional encoding of % decisions in parietal cortex reflects long-term training history. % bioRxiv % % Copyright (c) 2021 Kenneth Latimer % % This software is distributed unde...
c18cb55864b6d0241146c1f9ddd1e0a10d66f77cdeb800729dfc81d440829844
MATLAB
14,250
559
function RF_FreqVsTime(unit_id) % RF_FreqVsTime % RF_FreqVsTime(unit_id) % % Visualize receptive field as frequency vs time raster % % daniel.stolzberg@gmail.com 2013 if nargin == 0 || isempty(unit_id) unit_id = getpref('DB_BROWSER_SELECTION','units'); end f = findobj('tag','RF_FreqVsTime'); if isem...
ffd04d86f15c3e4935752967a925e23cd23cdc6aea296c4180c5a004afccfcaa
MATLAB
14,335
304
clear pat = 'C:\Analysis\AssemblyAnalysis\raw\'; Targets = {'SHORT','MEDIUM','LONG'}; Dirs = {'Left','Right'}; Areas = {'HP','PFC'}; bw=0.05; tlimsSample = [-5 5]; tlimsChoice = [-5 5]; length_ = sum(abs([tlimsSample, tlimsChoice]))/bw; tb = (1:length_)*bw; % reject_list={'MiroslawMEDIUM2_Events.mat','Nik...
e09abe61c7d2d9c684c908e256832a12c5eba02accb5d45992e963279712041e
MATLAB
14,336
414
function DBExportUnitData(blockid) % DBExportUnitData; % DBExportUnitData(blockid); % % Export analyzed data stored on the unit_properties table to an Excel % document. % % If no input is supplied as a blockid, then the currently selected block % from DB_Browser will be used. If DB_Browser is not open then it...
b42f70af95eb8850174fcf9d437304fb245c77ea609eaa4c366cf7353387d868
MATLAB
14,375
378
% Wrapper function for getAssemPatterns % % Aleksander PF Domanski PhD UoB 2016 % aleks.domanski@bristol.ac.uk % % % Provides plots of these data if plot_flag is set. Use to explore % the timing and prevalence of assembly activation patterns that occur % above chance %% Preamble clear all close all target=...
faa8500ebfffacf641888950089952acc72206845183ba24b0feb72e6f9c948e
MATLAB
14,381
346
classdef Violin < handle % Violin creates violin plots for some data % A violin plot is an easy to read substitute for a box plot % that replaces the box shape with a kernel density estimate of % the data, and optionally overlays the data points itself. % % Additional constructor paramet...
526754692a956f01c90ad01446dc48d796547d83934ee9b04d8fd87da7ef1bda
MATLAB
14,388
353
classdef VBoxFlex < uix.VBox & uix.mixin.Flex %uix.VBoxFlex Flexible vertical box % % b = uix.VBoxFlex(p1,v1,p2,v2,...) constructs a flexible vertical box % and sets parameter p1 to value v1, etc. % % A vertical box lays out contents from top to bottom. Users can % resize conten...
6a606b689bad0dd037bdb2e6b78a5923b827627e774a4b5e299160950f705c5a
MATLAB
14,391
393
function [patterns, pattTypes, colNames, allPatternLocs, params] = ... findAllPatterns(vfx, vfy, params, phase, repNumber) % FINDALLPATTERNS finds the patterns at each point in time for % the velocity fields determined by the XxYxTime matrices VFX and % VFY. % PATTERNS is a matrix containing the type, location and ...
27b1c604a14862fb9d6adf741eebde7bd220d7e6bc9b1ba9f7c433917422ac5f
MATLAB
14,395
355
function plotAssemPatterns(Ass) %% (1) Plot soloists vs. choristers figure('Name',[Ass.filename ' : Promiscuity of units'],... 'Color','w'); cmap = {'r','g','b'}; for s = 1:3 subplot(1,2,1); hold on bar(s,Ass.units.FractionSingleAssem(s),'EdgeColor', cmap{s},'FaceColor', cmap{s});...
9df8a8c9935baba0af3c650e4c9c9a28bdea1fdb5bb2c9ca394f8dd5a6a3d575
MATLAB
14,429
352
% Comparison between 1Limb sync and async (ONLY 11 NEW data - group B) conditions_names = {'TENS 1LimbSync', 'TENS 1LimbAsync'}; numberPatients1LIMB = 11; load('1LIMB_data.mat'); %% Questionnaire plotQuest = [SubQuest1LIMB(1:4, 1) + 3 SubQuest1LIMB(1:4, 2) + 3]; plotSem = [semSubQuest1LIMB(1:4, 1) semSubQuest1LIMB(1:4...
fa93685d8a9dc6bb33505f01a9bcd1a72bfe2282e5533937343b788aa92ad5f4
MATLAB
14,438
306
%Author: Guanghui ZHANG--zhang.guanghui@foxmail.com %Center for Mind and Brain %University of California, Davis %Davis, CA, USA %Feb. 2024 %Updated by David Garrett %June 2025 function varargout = f_EEG_informtion_GUI(varargin) global observe_EEGDAT; addlistener(observe_EEGDAT,'count_current_eeg_change',@count_curre...
d4b988fea0d31eb3491973fd77a0132c28b5a9b4920637bd3797605967b91b1c
MATLAB
14,442
353
classdef HBoxFlex < uix.HBox & uix.mixin.Flex %uix.HBoxFlex Flexible horizontal box % % b = uix.HBoxFlex(p1,v1,p2,v2,...) constructs a flexible horizontal % box and sets parameter p1 to value v1, etc. % % A horizontal box lays out contents from left to right. Users can % resize ...
9fc220640a01e93b269378fba48f901e1a1ad19ecb4a59e30b7fdd40463a29c7
MATLAB
14,444
452
function varargout = f_BEST_save_multi_file(varargin) % F_BEST_SAVE_MULTI_FILE MATLAB code for f_BEST_save_multi_file.fig % F_BEST_SAVE_MULTI_FILE, by itself, creates a new F_BEST_SAVE_MULTI_FILE or raises the existing % singleton*. % % H = F_BEST_SAVE_MULTI_FILE returns the handle to a new F_BEST_SAVE_M...
99379348a989965d3f57847c89e9d68285437e3abb9c285cff56d0ac4cdeed22
MATLAB
14,453
304
function BestAssemPosthocNoiseShuffle(iFile) %% %%%%%% PREAMBLE %%%%%% if isstr(iFile) iFile = str2num(iFile); end fprintf('running on File no. %d\n',iFile); Delays_ = {'Short','Medium','Long'}; Target = 'LONG'; Areas = {'PFC','HP','Joint'}; TimeSpan = 4; bw=0.05; tlimsAll = [-5 5]; tbAll = tlimsAll(1...
26e7bb2212cbd92ba8925fbd9e505101eaa09f370bc116d8e48845f9d26b1cc0
MATLAB
14,469
376
function varargout = SpikeSortGUI(varargin) % SPIKESORTGUI MATLAB code for SpikeSortGUI.fig % SPIKESORTGUI, by itself, creates a new SPIKESORTGUI or raises the existing % singleton*. % % H = SPIKESORTGUI returns the handle to a new SPIKESORTGUI or the handle to % the existing singleton*. % % SP...
3bd327e8849caeaaebc73c0043aef01cf675365d320189bf0048997e6b8430b8
MATLAB
14,478
348
classdef Violin < handle % Violin creates violin plots for some data % A violin plot is an easy to read substitute for a box plot % that replaces the box shape with a kernel density estimate of % the data, and optionally overlays the data points itself. % % Additional constructor paramet...
4fe3693510c94044a21766e6798f5053db62289022ee0308ab5f397bd958d0a2
MATLAB
14,485
322
clear pat = 'C:\Analysis\AssemblyAnalysis\raw'; SHORT = load(sprintf('%s\\allTimestamps\\Behaviour analysis\\DayByDay_SHORT.mat',pat),'Slatency','NPlatency','Rlatency'); MEDIUM = load(sprintf('%s\\allTimestamps\\Behaviour analysis\\DayByDay_MEDIUM.mat',pat),'Slatency','NPlatency','Rlatency'); LONG = load(sprintf('...
0d41740ca0f26a1a4b3d4292d044edddf787101d450e851a6e629e83bd88443a
MATLAB
14,493
524
%%BLP_rev_photometry_summary_plot %% clear all PAG_FC{1}='.\Data\981024FC'; PAG_FC{2}='.\Data\981025FC'; PAG_FC{3}='.\Data\996403FC'; PAG_FC{4}='.\Data\996405FC'; PAG_Test{1}='.\Data\981024Test'; PAG_Test{2}='.\Data\981025Test'; PAG_Test{3}='.\Data\996403Test'; PAG_Test{4}='.\Data\996405Test'; CeA_FC{1...
6c42c85e31f8c45ccda280c426be9ecfc9f2eb0f83a57b54c7ffc3990e7d17bc
MATLAB
14,493
440
function NextTrialID = TrialFcn_SameDifferent_SanesLab(TRIALS) % NextTrialID = TrialFcn_PureToneDetection_MasterHelper(TRIALS) % % This is a custom epsych function for the Sanes Lab for use with % appetitive GO-NOGO tasks. % % NextTrialID is the index of a row in TRIALS.trials. This row contains all % of the informatio...
56477ef7211a8ef5a100a060ce95137f19e1d75d2b74fb1466b01b4796d1eb35
MATLAB
14,532
591
dbstop if error Test1XZ = [ 0 0 -.5; -1 0 .5; 1 0 .5;] Test1XY = [0 -.5 0; -1 .5 0; 1 .5 0;]; Test2XZ = [1 0 -1; -1 0 1; 3 0 1]; Test2XY = [0 -1 1; -2 1 0; 2 1 0;]; Test3XZ = [...
6cd9bdd80b51eddcef92aa4a60b6b3e86c30adf749b424a0bf2290861b51b41a
MATLAB
14,560
428
%this program reads the stimulus, behavior and 2p data and generates %neuronal clusters for one plane recordings. Created by Haleh Fotowat close all clearvars Reg=input('please enter 1 for analysis of hindbrain, 2 for midbrain and 3 for forebrain 0 for all brain and -1 for neuropil: '); nCh=input('enter the number of 2...
ad72871e1e05abbd14a549122c526ce5d10a03fd7a91e5b3099305ca8bcf130c
MATLAB
14,575
461
function varargout = Ventriloquist_Mk3(varargin) % Ventriloquist_Mk3 MATLAB code for Ventriloquist_Mk3.fig % Ventriloquist_Mk3, by itself, creates a new Ventriloquist_Mk3 or raises the existing % singleton*. % % H = Ventriloquist_Mk3 returns the handle to a new Ventriloquist_Mk3 or the handle to % t...
7f904459ebe7a46fbf5f3ba8200f0ac6e3258c0517c2d016b4ba646270a43225
MATLAB
14,600
385
function varargout = SpikeSortGUI(varargin) % SPIKESORTGUI MATLAB code for SpikeSortGUI.fig % SPIKESORTGUI, by itself, creates a new SPIKESORTGUI or raises the existing % singleton*. % % H = SPIKESORTGUI returns the handle to a new SPIKESORTGUI or the handle to % the existing singleton*. % % SP...
9b48799d6d6a97a3cf22113f6458b6e02f9ac8c6da503e1d3671f0fda05e83d8
MATLAB
14,601
410
% PENDING % % % % % % function [ERP serror] = importerpss(filename, format, transpose) serror = 0; if nargin<2 error('ERPLAB says: error, filename and pathname are needed as inputs.') end %%%taken from asc2erp.m%%% fullname = filename; fid = fopen(fullname); %used to verify whether it is an...
bb4c032f8c01eaf56be3cc18aa83e82ef11b905483fda23c7a9bae5c0ed1db9e
MATLAB
14,601
399
% PURPOSE : Creates the EVENTLIST structure with the event information % extracted and reorganized from EEG.event (default) or from % an external list (text file). The EVENTLIST structure is % attached to the EEG structure. % % FORMAT : % % EEG = pop_creabasiceventlis...
c847f24612f54a8c03e8e3ad7ce640c1372d8428b394faa8a80ef593b41db8b5
MATLAB
14,606
455
function varargout = f_EEG_save_multi_file(varargin) % F_EEG_SAVE_MULTI_FILE MATLAB code for f_EEG_save_multi_file.fig % F_EEG_SAVE_MULTI_FILE, by itself, creates a new F_EEG_SAVE_MULTI_FILE or raises the existing % singleton*. % % H = F_EEG_SAVE_MULTI_FILE returns the handle to a new F_EEG_SAVE_MULTI_FI...
7d6503ecd63797cb02d09f4e14ab98873d04f694729ef26ef741c16f1a3fbc70
MATLAB
14,615
361
% Comparison between BACK sync and BACK async conditions_names = {'BACK sync', 'BACK async'}; load('BACK_MIXED_data.mat'); % either run analysis2.m or load the struct %% Questionnaire plotQuest = [SubQuestBACK(1:4, 1) + 3 SubQuestBACK(1:4, 2) + 3]; plotSem = [semSubQuestBACK(1:4, 1) semSubQuestBACK(1:4, 2)]; figure()...
242982726d6bfd536651a34b986e62066e05b68d3a9c119a903c9ccb6d6ff707
MATLAB
14,620
416
% % Author: Javier Lopez-Calderon & Steven Luck % Center for Mind and Brain % University of California, Davis, % Davis, CA % 2009 %b8d3721ed219e65100184c6b95db209bb8d3721ed219e65100184c6b95db209b % % ERPLAB Toolbox % Copyright � 2007 The Regents of the University of California % Created by Javier Lopez-Cald...
2ff549d9ff9af42eacd183ac1e861389c6a4f077c41ff4a1d97a14034e368dbf
MATLAB
14,676
581
% fresh start clearvars close all %% run config config_file='config_mammals_1.m'; addpath(strcat(pwd,'/config')) run(config_file); %% read in proc spreadsheet filename = [ DD_PROC '/MamiNum_corrected_proc.txt' ] ; ssheet = readtable(filename,'Delimiter','\t') ; n_animal = size(ssheet,1) ; thr_vals = [ 0 0.05 0.1 0....
965a1941560747084e7de650321e461ae518fd603a7e53addd4047090ef61639
MATLAB
14,718
480
function varargout = Ventriloquist_Mk1(varargin) % Ventriloquist_Mk1 MATLAB code for Ventriloquist_Mk1.fig % Ventriloquist_Mk1, by itself, creates a new Ventriloquist_Mk1 or raises the existing % singleton*. % % H = Ventriloquist_Mk1 returns the handle to a new Ventriloquist_Mk1 or the handle to % t...
40309ad688faf0a50855d81e3b6c5de965e2469f42765ef0fe2d90484ca35f57
MATLAB
14,720
310
%% %%%%%% PREAMBLE %%%%%% clear Delays_ = {'Short','Medium','Long'}; Delays__ = {'4s','8s','16s'}; Target = 'LONG'; tlimsAll = [-5 5]; tlimsShort=[-4 10]; tlimsMedium=[-8 10]; tlimsLong=[-16 10]; tlimsANOVA = [-2 2]; shift = 0; plotOnline = false; runCVEdecoder = true; bw=0.05; Nbs = 100; tbSh...
37331829a748fdb57a4cd02cc8d5ef0fd825e2e85bc3b0961ca5bb9e80265b86
MATLAB
14,762
338
% function DecodingDuringDelayIndividualUnits(iFile) % if isstr(iFile) % iFile = str2num(iFile); % end %% %%%%%% PREAMBLE %%%%%% clear Delays_ = {'Short','Medium','Long'}; Delays__ = {'4s','8s','16s'}; Del = [4 8 16]; Target = 'LONG'; RunErrors = false; tlimsShort=[0 4]; tlimsMedium=[0 8]; tlimsLong=[0 16]; tlims...
1b73d24d4344b96c0d6f67ba93b8b5f0c3dff88bab656b426ef76a77eb812042
MATLAB
14,776
323
function [marks_struct,com]=pop_marks_add_label(marks_struct,varargin) com = ''; % this initialization ensure that the function will return something % if the user press the cancel button % display help if not enough arguments % ------------------------------------ if nargin < 1 help pop_marks...
a4176462f596d119197f952872e8568e8338cae1a7d554356d3f1aa00e020937
MATLAB
14,821
360
% Comparison between MIXED sync and MIXED async conditions_names = {'MIXED sync', 'MIXED async'}; load('BACK_MIXED_data.mat'); % either run analysis2.m or load the struct %% Questionnaire plotQuest = [SubQuestMIXED(1:4, 1) + 3 SubQuestMIXED(1:4, 2) + 3]; plotSem = [semSubQuestMIXED(1:4, 1) semSubQuestMIXED(1:4, 2)]; ...
8b8333312581cd46bea18099d6f08e5bdd777933c41751f9259747efe419ef25
MATLAB
14,828
200
function [lineNameStr,linecolors,linetypes,linewidths,linecolors_str,linetypes_str,linewidths_str,linecolorsrgb] = f_get_lineset_ERPviewer() for ii = 1:315 lineNameStr{ii,1} =strcat(num2str(ii)); end linecolors = {'Black [0 0 0]','Red [1 0 0]','Blue [0 0 1]','Green [0 1 0]','Orange [1 0.65 0]','Cyan [0 1 1]','...
6cb369624da415fa9b41226acde6052bdd594fb892b1c3bb5d9803075c3da6a8
MATLAB
14,833
327
clear Targets = {'SHORT','MEDIUM','LONG'}; Delays_ = {'Short','Medium','Long'}; tlimsShort = [-4 10]; tlimsMedium = [-8 10]; tlimsLong = [-16 10]; tlimsANOVA = [-5 5]; shift = 0; plotOnline = false; bw = 0.05; tbShort = tlimsShort(1) : bw : tlimsShort(2); tbMedium = tlimsMedium(1): bw : tlimsMedium(2);...
863ef0034f3f172c48bbe95fc7cce8ee3402eb0e130444f954c0ca4b89860356
MATLAB
14,884
399
% PURPOSE : Interactively epoch bin-based trials % % FORMAT : % % EEG = pop_epochbin(EEG, trange, blc); % %INPUTS : % % EEG - EEGLAB structure % trange - window for epoching in msec % blc - window for baseline correction in msec or either a string like 'pre', 'post', or 'all' % (strings...
8763b6ebbf1f1033b21a20672710e1ac7c7c3281837d2a85aecbb650a5993f86
MATLAB
14,917
469
function NextTrialID = TrialFcn_appetitive_SanesLab(TRIALS) % NextTrialID = TrialFcn_PureToneDetection_MasterHelper(TRIALS) % % This is a custom epsych function for the Sanes Lab for use with % appetitive GO-NOGO tasks. % % NextTrialID is the index of a row in TRIALS.trials. This row contains all % of the information f...
48fef82e10ae93eaa350cfe3ed532b82b9cbf7aa5f344537ba63720db69042be
MATLAB
14,942
564
function varargout = Appetitive_training(varargin) % %Appetitive_training({'C:\Users\...*.rcx'},{'Title String'}) % %This GUI allows a user to hand-train an animal to associate a sound %with a water reward. Pure tones and broadband noise are both supported. %Input 1: 1x1 cell array containing the filename of an RPVds ...
5bb9c8780a40b0deee91cd36185cb324cdab6a6cc07104f2bbacc63c176406f0
MATLAB
14,996
473
function varargout = f_mvpc_save_multi_file(varargin) % F_MVPC_SAVE_MULTI_FILE MATLAB code for f_mvpc_save_multi_file.fig % F_MVPC_SAVE_MULTI_FILE, by itself, creates a new F_MVPC_SAVE_MULTI_FILE or raises the existing % singleton*. % % H = F_MVPC_SAVE_MULTI_FILE returns the handle to a new F_MVPC_SAVE_M...
da3c90528d34eb2871295c02f9ab9a1c853baa937853ee9d66cafbcd9c0707d3
MATLAB
15,027
297
function performance = Decode_final_temporal_v2(dataset,m,st,session,Trial_Label,trials,bins,etrials,dataset_e,m_e,st_e,Test) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This function decodes a trial label from the dataset built from the % recorded neurons. Specifically, the function e...
33d188f8bf0e3051548c0a5291dd7f606f8ce5585ff5988f580516ff013cb98e
MATLAB
15,039
472
function NextTrialID = TrialFcn_appetitive_AMTempIntegration_SanesLab(TRIALS) % NextTrialID = TrialFcn_PureToneDetection_MasterHelper(TRIALS) % % This is a custom epsych function for the Sanes Lab for use with % appetitive GO-NOGO tasks. % % NextTrialID is the index of a row in TRIALS.trials. This row contains all % of...
788317ae15cae36222b08e0898e3971e9600d09fc56035080ba771272328c0fc
MATLAB
15,088
368
%{ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VIGILANCE STATE TRANSITION ANALYSES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Author: Kristoffer Feher (2022), kristoffer.feher@upd.unibe.ch %} %% %%%%% housekeeping %%%%% clear all close all clc; ...
bcb9bcd525319a545dc8c6a66416a9386ac2c739675bc42174fac940dcb19c71
MATLAB
15,090
395
function varargout = CSDplotter(varargin) % CSDPLOTTER M-file for CSDplotter.fig % CSDPLOTTER, by itself, creates a new CSDPLOTTER or raises the existing % singleton*. % % H = CSDPLOTTER returns the handle to a new CSDPLOTTER or the handle to % the existing singleton*. % % CSDPLOTTER('C...
6d717c66588544a475ae5d632467ef2bc985e72637bdb44dec5348a016dfca3f
MATLAB
15,103
393
function Model_Learning_noise(p1,p2) %p1: seed for random number and p1=1:1:\mu. There are \mu independent simulations %p2: pattern length. p2=1 is for 50 ms; p2=2 is for 100 ms; p2=3 is for 300 ms rng(10+(p1-1)*1e6); %There are 3 steps in this program. %%Step 1: There is no embedded pattern in affere...
46b5047a9c10686c7cc810519d2e64eb5eabffcde13b766d7538e39ac6c84025
MATLAB
15,139
382
% Displays a matrix in a pop-up window for convenient editing. % This control presents an m-by-n table of matrix entries. % Copyright 2008-2010 Levente Hunyadi classdef MatrixEditor < UIControl properties Type = PropertyType.empty(1,0); end properties (Dependent) Control; ...
f8b133056ac5382605f5125bea2c1a90be22aa82b0e66583a1501f0d5a781f73
MATLAB
15,172
102
function [ obj ] = getObjectForHand( hand_obj, all_obj ) % getObjectForHand this function returns object which is being handled by a % specific hand. % Input: hand_obj, all_obj % Output: obj: Object being handled by hand_obj is_both_hands = 0; attributes = hand_obj.attributes; hand_type = getHandType(attribute...
d731324c1a4c41a517ff1c4c202917ff389428576de6be0e28cfa451e2570b1e
MATLAB
15,250
318
% % Script to add the (sub-)tracts lines and distance between the end-point ROIs % % % Note: This script requires the freesurfer output of the individual subjects to run. Unfortunately, for privacy % reasons, we are not allowed to share the freesurfer output files. Instead, the file that this script woul...
652d83b8eef9e40048b4ef77e465a8dcf2e6ced1f717d513743fb72f875488e5
MATLAB
15,253
469
function varargout = f_EEG_saveas_multi_file(varargin) % F_EEG_SAVEAS_MULTI_FILE MATLAB code for f_EEG_saveas_multi_file.fig % F_EEG_SAVEAS_MULTI_FILE, by itself, creates a new F_EEG_SAVEAS_MULTI_FILE or raises the existing % singleton*. % % H = F_EEG_SAVEAS_MULTI_FILE returns the handle to a new F_EEG_S...
4afa5e25c4d923c94572ebe128aaa65b7e5db2aa543973b08212463f8271c486
MATLAB
15,353
420
function [type] = artifactscantool_senstype(input, desired) % FT_SENSTYPE determines the type of acquisition device by looking at the channel % names and comparing them with predefined lists. % % Use as % [type] = artifactscantool_senstype(sens) % or % [flag] = artifactscantool_senstype(sens, desired) % % The outp...
bbfc7bf733680cfc4de7d35d13c767cacfb7dd6ea9eee9853f682282d543637d
MATLAB
15,421
214
%%This function is to create EEG Tab % Author: Guanghui Zhang, David Garrett & Steve J. Luck % Center for Mind and Brain % University of California, Davis % Davis, CA % 2022-2025 function EStudio_gui_erp_totl = EStudio_EEG_Tab(EStudio_gui_erp_totl,ColorB_def) if isempty(ColorB_def) ColorB_def = [0.7020 0.77 0...
eed8482b928d98b7cdfd27aabeb7308a3026494f9a677030483e0ae11b9ff0b4
MATLAB
15,480
486
function varargout = f_ERP_save_as_GUI(varargin) % F_ERP_SAVE_AS_GUI MATLAB code for f_ERP_save_as_GUI.fig % F_ERP_SAVE_AS_GUI, by itself, creates a new F_ERP_SAVE_AS_GUI or raises the existing % singleton*. % % H = F_ERP_SAVE_AS_GUI returns the handle to a new F_ERP_SAVE_AS_GUI or the handle to % t...
13f914967bd2da84fa63f8fea698de3b7753f026a77921398d0890cc327269ad
MATLAB
15,493
342
%% Preamble, get file list clear all; close all set(0,'DefaultFigureWindowStyle','docked') flags.plotIndividualChanges = false; % pat{1} - % location of the processed assembly memberships % pat{2} - % location of raw spike times if ispc % pat{1} = 'C:\Analysis\AssemblyAnalysis\Sleep\Decoding vs flanki...
0cbb31c81ef16c3a3c8c89d6ad02c8036ada62b000277bfe7779e49d086cdc00
MATLAB
15,522
387
function varargout = interpclosed(x,y,varargin) % INTERPCLOSED Arc-length interpolation, perimeter and area of 2D closed curves defined by points % % xyq = INTERPCLOSED(x,y,tq) Interpolates new data points xyq at given % positions defined by an arc-length parametrization and the query points % tq, along the closed...
94ad6d6cdc0861037b1669a5bc1442839af3174bc0a04ce63b61d5e03f824c7f
MATLAB
15,570
716
function varargout = StimDetect_Monitor(varargin) % StimDetect_Monitor % Last Modified by GUIDE v2.5 15-Oct-2015 12:27:01 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_Ope...
e2fceeeee22090e29d9d44b38fdb8467e3b06c0b176a83dd7b627ebad2d35772
MATLAB
15,618
518
function varargout = CondAvoidGUI(varargin) % CondAvoidGUI M-file for CondAvoidGUI.fig % CondAvoidGUI, by itself, creates a new CondAvoidGUI or raises the existing % singleton*. % % H = CondAvoidGUI returns the handle to a new CondAvoidGUI or the % handle to % the existing singleton*. % % ...
6f95e470eef0db07968a55c433a59c2dc771be97dd85ad4b361c3aa8eeef7259
MATLAB
15,660
317
%Author: Guanghui ZHANG--zhang.guanghui@foxmail.com %Center for Mind and Brain %University of California, Davis %Davis, CA, USA %Feb. 2022 && Nov. 2023 function varargout = f_erp_informtion_GUI(varargin) global observe_ERPDAT; addlistener(observe_ERPDAT,'Count_currentERP_change',@Count_currentERPChanged); try ...
05d3eb8789d0ad8a625bb68a03046d38307b2ad6f6b2db9a0c798a86ee22cc0f
MATLAB
15,711
304
function performance = Decode_final_temporal_v2AD(dataset,m,st,... session,... Trial_Label,... trials,... bins,... ...
49bdec2f34a9b59e2fd36f3b388fc48bc78a450d5b7f9df23a7825ba822700f7
MATLAB
15,732
310
%% %%%%%% PREAMBLE %%%%%% clear Delays_ = {'Short','Medium','Long'}; Delays__ = {'4s','8s','16s'}; Target = 'LONG'; tlimsAll = [-5 5]; tlimsShort=[-4 10]; tlimsMedium=[-8 10]; tlimsLong=[-16 10]; tlimsANOVA = [-2 2]; shift = 0; plotOnline = false; runCVEdecoder = true; ResampleTS = true; Resamp...
da66d4de1d9838c0f55dd527d6ef4fcfde567709cfa8a0a364ca430a72f50117
MATLAB
15,772
573
function varargout = Appetitive_training(varargin) % %Appetitive_training({'C:\Users\...*.rcx'},{'Title String'}) % %This GUI allows a user to hand-train an animal to associate a sound %with a water reward. Pure tones and broadband noise are both supported. %Input 1: 1x1 cell array containing the filename of an RPVds ...
173d7b7a0e8844ffc932746b9239d4963a70751d9d38040b920e92d7dc1d87ee
MATLAB
15,878
360
%% MAIN clear all close all clc % Vectors Drift1LIMB = []; EmbQuest1LIMB = []; VivQuest1LIMB = []; PciQuest1LIMB = []; pps1LIMB = []; ppsBaseline1LIMB = []; SomatotopicForm = []; % LEGEND % Each condition is assigned to a number: % 1 = BACKsync, 2 = BACKasync, 3 = MIXEDsync, 4 = MIXEDasync conditions = {"TS1L", "TA...
09a1da35cd86b3703b3e6d3d56c64f9b55254d5670ea8e9af53905b233f9dbdb
MATLAB
15,925
423
%% OVERVIEW % % 1. Imports raw AOI traces from .xlsx file into "data" (matrix) % - readFile() function outputs raw data into "raw_data" matrix % 2. Uses customized input parameters to reformat raw data % - inputs: raw_data, sampling framerate, time window of interest % - outputs: data (data) and time ...
5afe05f98edc19ac51fb5d5c811a092a2f7bea9121ac38eb239d0df9367814dc
MATLAB
15,927
481
function varargout = f_BEST_save_as_GUI(varargin) % F_BEST_SAVE_AS_GUI MATLAB code for f_BEST_save_as_GUI.fig % F_BEST_SAVE_AS_GUI, by itself, creates a new F_BEST_SAVE_AS_GUI or raises the existing % singleton*. % % H = F_BEST_SAVE_AS_GUI returns the handle to a new F_BEST_SAVE_AS_GUI or the handle...