sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
0a943be24b8cb3007fb13eb922fce0995135f9e37c0cec8189ca1fe147f67ad8
MATLAB
9,633
242
function [] = HumanOdorRep_plot_multimodal_neuron(unitdata, data_path, save_path) % function [] = HumanOdorRep_plot_multimodal_neuron(unitdata, data_path, save_path) % %----------------------------------------------------------------------------------------- % Plot function for multimodal neurons % % Kehl et al. 202...
b0e9e69eef8f2f4596d60d77f5ab6c1112bcd1a29ed89a56813c8313df94450f
MATLAB
9,633
303
%% Regular (nonKine) data ROOTPROJDIR = 'f:\stephenTrainingDataForMayanksTracker'; lblFile1 = fullfile(ROOTPROJDIR,'lbllist_nonKine_noneBodyAxis.txt'); lblFile2 = fullfile(ROOTPROJDIR,'lbllist_bodyAxis_level1.txt'); lbllist1 = importdata(lblFile1); lbllist2 = importdata(lblFile2); lbllist1 = fullfile(ROOTPROJDIR,lbllis...
019964ab9be7ee3e7a18c79e6ff127ec4ba8826bd31f449695abd1050a90ae06
MATLAB
9,634
235
function embedding = optimize_layout5(head_embedding, tail_embedding, ... head, tail, n_epochs, n_vertices, epochs_per_sample, a, b,... gamma, initial_alpha, negative_sample_rate, verbose, min_dist) %OPTIMIZE_LAYOUT2 Another version of optimize_layout.m that slightly % optimizes the speed for MATLAB; in particu...
4ff541ba40730e5ece03eadd2ebfeba42b0c7e69780a2153a2d839f8ad3da82a
MATLAB
9,636
333
%% Compares the spatial information vs the temporal information from simulated cells % 1) Simulate the same networks with different durations of place field % trajectory traversals % 2) Combine the activity from the different trials by either time or % space, then calculate the resulting information %% Set up addpat...
a3a5f109666c6f73d5197f58340a81f57e780491186aa1f0d6bb769c19309cb0
MATLAB
9,640
237
function [x, cost, info, options] = steepestdescent(problem, x, options) % Steepest descent (gradient descent) minimization algorithm for Manopt. % % function [x, cost, info, options] = steepestdescent(problem) % function [x, cost, info, options] = steepestdescent(problem, x0) % function [x, cost, info, options] =...
80fe45caabda1d4a463ad800cdcc0d7416e0bf1ee963a7503c87e6e2ffbc78fd
MATLAB
9,649
217
function [times chans] = ms_detect4(X,opts) %MS_DETECT4 - Detect super-threshold events in a raw/preprocessed dataset % % Consider using mscmd_detect* % % Syntax: [times chans] = ms_detect4(X,opts) % % Inputs: % X - MxN array of raw or preprocessed data (M channels by N timepoints) % opts.detect_interval - minim...
029565f638a3ed3bc6afbbd8c65a472be5f0c22a35f544dcf8c8597424d5a51b
MATLAB
9,654
347
%epa_easy Analyze easy trials in endogenous pro/anti experiment % % This script analyzes the performance of all the participants during % the 'easy' (i.e., non-urgent) trials of endogenously driven % pro/antisaccade (EPA) task. It reproduces Figure S1 (or Figure 1 -- % Supplement 1) of the paper by Goldstein et a...
eba7acddf81ada55a4665ce35c7ecc5b81284085d522e00ebc6b6d79ececd1d9
MATLAB
9,654
226
% function [insitu_transcripts_filtered,puncta_voxels_filtered,puncta_centroids_filtered] = ... % normalization_qnorm1(puncta_set_cell_filtered) N = size(puncta_set_cell_filtered{1},1); readlength = params.NUM_ROUNDS; % puncta_present = ones(N,readlength); %Get the total number of voxels involved for the puncta %u...
1868fefbd75674de8166226066e86f3e57e04bca5463c16ec8ddf94add014fd4
MATLAB
9,660
208
%-------------------------------------------------------------------------- % Author: Georgia Lawlor % Date: 1/24/21 % Purpose: Create jPSTHs for a set of binned data from a specific input % file which is described below. % Revision History: % 2/18/21 - Simplified code, reformatted code so the jPSTH, coincidence, ...
7ded0e5434d136beb4dfd87aebe67d763dedb90d4a9182d00a9175a341029bc1
MATLAB
9,660
335
function [chansel, trlsel, cfg] = rejectvisual_channel(cfg, data) % SUBFUNCTION for ft_rejectvisual % determine the initial selection of trials ntrl = length(data.trial); if isequal(cfg.trials, 'all') % support specification like 'all' cfg.trials = 1:ntrl; end trlsel = false(1,ntrl); trlsel(cfg.trials) = true; % d...
f5498fcd69826c14a8ae163401a36acd7904d367ae8ed537b915f3c6cd42a93a
MATLAB
9,662
330
function [xp,dxpdom,dxpdT,dxpdf,dxpdc,dxpdk,dxpdalpha] = project_points_fisheye(X,om,T,f,c,k,alpha) %project_points2.m % %[xp,dxpdom,dxpdT,dxpdf,dxpdc,dxpdk] = project_points_fisheye(X,om,T,f,c,k,alpha) % %Projects a 3D structure onto the image plane of a fisheye camera. % %INPUT: X: 3D structure in the world coordina...
c42201d495d21a2984dd5a3b121ecb23b03fea2598f232b1497f0b78e5659a2f
MATLAB
9,663
359
function varargout = boundedline(varargin) %BOUNDEDLINE Plot a line with shaded error/confidence bounds % % [hl, hp] = boundedline(x, y, b) % [hl, hp] = boundedline(x, y, b, linespec) % [hl, hp] = boundedline(x1, y1, b1, linespec1, x2, y2, b2, linespec2) % [hl, hp] = boundedline(..., 'alpha') % [hl, hp] = boundedli...
6f5098bb0dca0318d0fb2ef63734a80ade7fb4e7669df4324a165de85df47372
MATLAB
9,667
330
function hh = scatter_h(varargin) %SCATTER Scatter/bubble plot. % SCATTER(X,Y,S,C) displays colored circles at the locations specified % by the vectors X and Y (which must be the same size). % % S determines the area of each marker (in points^2). S can be a % vector the same length a X and Y or a scalar. If S...
a8e4072865b922c665ffb3367e8df4f97def1cc674ab4d117125878fff075025
MATLAB
9,672
75
function map = viridis(N) % Colormap from MatPlotLib 2.0. Perceptually uniform and very attractive! % %%% Syntax: % map = viridis % map = viridis(N) % % Colormap designed by Eric Firing, Nathaniel J. Smith, and Stefan van der Walt. % % For MatPlotLib 2.0 improved colormaps were created in the perceptually % uniform c...
544e0d3dce2ce331ba761554263d13714e81804c20cb33fc13383cbc8852f2df
MATLAB
9,677
198
function extract_replay_events % based on Davidson, Kloosterman, and Wilson(2009,Neuron) criteria. % - events detected by MUA only % - zscore of 3 minimum, and edges detected by zscore of 0. % modificiation- If event is too long, then edge criteria shifted to % zscore of 0.25, then 0.5 % - events wi...
85cf901450f250aa3f257527e41f80e33da48fc6181052e59442bd4225a0b222
MATLAB
9,688
201
function [glob_avg] = assembly_trig_avg_single (traces, nCells, si_img, SCE, assemblies) %clear glob_avg1 glob_avg2 glob_avg3 glob_avg4 glob_avg5 glob_avg6 %event(find(SCE.RasterRace(8,:))) = 1; windowSize = 200; x = -windowSize/2:1:windowSize/2; n_int_in_assembly = sum(sum(assemblies.CellCl(:,nCells.int))); pyr...
2ae8e2d70bc190c9230f0164ce4df644e852585f78ed3db539c580a26d86fca0
MATLAB
9,690
241
% BATCH ANALYSIS PIPELINE function remapping_pipeline(option,RExp) % EXTRACT SPIKES, WAVEFORMS AND DROPPED SAMPLES %use one of these depending on how you clustered if strcmp(option,'EXTRACT_SPIKES_MARTA') extract_spikes_phy; % for clusters extracted from PHY extract_events; extract_dropped_samples; pro...
aa841bf21ec8bf9f41bd3c4a3fede47fe599e665f76ece977fc4550151593844
MATLAB
9,692
279
function ft_write_event(filename, event, varargin) % FT_WRITE_EVENT writes an event structure to a file, a message daemon % listening on a network socked, or to another computer connected through % the serial port. % % Use as % ft_write_event(filename, event, ...) % % The first argument is a string containing the fi...
2a40c598b3b1f82188d7e0192baf6d4cce83163cc211acf876d800ea3f5142ec
MATLAB
9,695
214
function CBIG_KRR_generate_kernels( feature_mat, sub_fold, outdir, ker_param, similarity_mat ) % CBIG_KRR_generate_kernels( feature_mat, sub_fold, outdir, ker_param, similarity_mat ) % % This function calculates the inner-loop and training-test kernels for % kernel ridge regression. % % Inputs: % - feature_mat % ...
8aa328d62d369e53f7d197a6f69f103c4c9cfdd0e19163d27fcb059c5ede158c
MATLAB
9,695
243
%% Plot example GP trials for a representative animal. Show detected TWs. % also show representative phase map and phase vs distance plot clear clc % repTrial = [97,98,99,100];%15 22 23 *32 %D:\InVivo\M1-Muscimol\2022-01-10_Muscimol-M1\2-Saline_220110_123444 repTrial =[83 56];%48 52 59 56 %wave 7 for T83 and w...
cd1a6097954da56754db226ffae170600d6727a99fa500b095ce01b6a2277a06
MATLAB
9,698
251
%Load the %% Download all the data %uses yamlfile,save_dir, called as a script to help debug combined_transcriptsfile_refined = strrep(combined_transcriptsfile,'.mat',sprintf('-h%i.mat',USABLE_HAMMING)); if ~exist(combined_transcriptsfile,'file') && ~exist(combined_transcriptsfile_refined,'file') transcript_obje...
3cb714b2865f2a7e50d535bea117c7a5dab8b3963b5f80904ee0e0e34d38f407
MATLAB
9,699
289
function voldata = iimg_reconstruct_vols(dat, volInfo, varargin) % Reconstruct a 3-D or 4-D volume from a "dat" matrix of vectorized images % % :Usage: % :: % % voldata = iimg_reconstruct_vols(dat, volInfo, [optional args]) % % :Optional Inputs: If entered, will write .img file to disk % % **'outname':** % ...
f11074fa7425c15f2e5cc51937c8ebd02a2bd9e8b724283914ff02cae84377fe
MATLAB
9,699
258
function CBIG_glm_regress_vol(fMRI_list, output_list, regressor_list, polynomial_fit, censor_list, per_run) % CBIG_glm_regress_vol(fMRI_list, output_list, regressor_list, polynomial_fit, censor_list, per_run) % % This function does GLM regression for fMRI volumetric data. It will: % % 1) read in fMRI volumetric data f...
c82adefa2a733ac9fb4c296b1aa21c718559688799a5427e26bd54d7015cf560
MATLAB
9,702
417
function Social_entries(basename,tet2use,unit,session,boundarie_1,boundarie_2) SR=20000; SR_trk=50; cells= unit; resofs=load([basename '.resofs']); sessionfile = [basename(1:9) '_' num2str(session,'%02.f') '.mat']; load(sessionfile,'trk'); whl = trk; value_new=300; res=load([basename '.res.', num2str(tet...
877dd9eb66e24977c0daa57089ff666f459c16116ca9104f78bbce9ebdff518b
MATLAB
9,704
267
function varargout = ICVAE_settings(varargin) % ICVAE_SETTINGS MATLAB code for ICVAE_settings.fig % ICVAE_SETTINGS, by itself, creates a new ICVAE_SETTINGS or raises the existing % singleton*. % % H = ICVAE_SETTINGS returns the handle to a new ICVAE_SETTINGS or the handle to % the existing singleton...
362bc42ba18fe7c747bf0b3c9fbcf0bf50a32e6f864f57eaade9d37b23e29301
MATLAB
9,708
321
% cmps={[1 2],[1 3],[2 3],[ 1 2 3],1,2,3}; %% % [~,Type] = Utilities.ProcVarargin(pltFCNArgs,'Type','T'); % ConditinList={{'T','F','L0'},... % {'F','L0','L1'}} FigHandels=[]; % if Type=='T' % condName='TFL0'; % L={'TFL0','','FL0','','TF','','TL0',''}; % else % condName='FL0L1'; % L...
bf22ad4df7a499d8bac678e7cb89a65ebe1bc27d98036c7dd42eea30f3146647
MATLAB
9,714
198
function make_BNV_ready(paths, brainnet) % To make *.node and *.edge files for viewing connectivity results from NBS % or custom max-T analysis on BrainNet Viewer (BNV). % % PLEASE NAME the saved NBS workspace variable as % [nickname]_NBSResults_[freq].mat % % INPUT--------------------------------------------------...
c87a62cce7b325441b7510cdda88060c08a927ebd2c1cdfcaf33c53724e24386
MATLAB
9,737
270
%{ Copyright (c) 2025 Axion BioSystems, Inc. Contact: support@axion-biosystems.com All Rights Reserved %} classdef CombinedBlockVectorHeaderEntry < Entry %CombinedBlockVectorHeaderEntry Entry which contains the entirety of a %block vector % % VersionMajor: Writing version (Major number) th...
4a0dea3b930aa20811bf1cdd7dd0e1d9885708c00a3404e69cbf15fcf191f1b1
MATLAB
9,738
241
function [dfield,moving_reg] = imregdemons_ZN(moving,fixed,varargin) %IMREGDEMONS Estimate displacement field that aligns two 2-D or 3-D images. % % [D,MOVING_REG] = IMREGDEMONS(MOVING,FIXED) estimates the displacement % field D that aligns the moving image, MOVING, with the fixed image, % FIXED. MOVING and FIXED...
698190a04b8ea4c36974a762afc99b6ad212157d64a22a5c2b8af67315fc641a
MATLAB
9,739
360
%% load trnDataSH_Apr18.mat load trk__vw2_all.mat load trk_Igt_crop_vw2_all %% nGT = height(tGT); pGT = reshape(xyLbl_GT_crop(:,:,:,2),nGT,10); ids = tGT.id2_nonunique; idxs = randsample(nGT,20); Shape.montage(Igt_crop(:,2),pGT,'nr',4,'nc',5,'p2',pTstTRed,'idxs',idxs,... 'framelbls',ids(idxs)); %% PAT = 'trk__res_IF...
9ef76c286fe7f6aeff964d493e80299cd06ed3b4f5bcbfa567985a883da8897d
MATLAB
9,740
376
function LAN = merge_lan(LAN1,varargin)%LAN2, % merge two LAN % form: LAN = merge_lan(LAN1,LAN2,LAN3,...) % LAN = merge_lan(LAN) % LAN = merge_lan(cfg) % cfg.lan1 = estructura lan o 'srt' con nombre de variable en workspace % .lan2 = idem % .sort = vector del orden de epoc...
251fce03b2cdaa5619306de411f05a42333fd03d86c9ae614b4e66661559d953
MATLAB
9,744
211
function [intersect, t, u, v, xcoor] = TriangleRayIntersection (... orig, dir, vert0, vert1, vert2, varargin) %TRIANGLERAYINTERSECTION Ray/triangle intersection. % INTERSECT = TriangleRayIntersection(ORIG, DIR, VERT1, VERT2, VERT3) % calculates ray/triangle intersections using the algorithm proposed % B...
afba0cc63d670309d3cec3d56f48d226ba5ec17c288a5c7ef4197ab8c765be24
MATLAB
9,745
268
function [c, v, outcnt] = ft_connectivity_corr(input, varargin) % FT_CONNECTIVITY_CORR computes correlation, coherence or a related quantity from a % data-matrix containing a covariance or cross-spectral density. It implements the % methods as described in the following papers: % % Coherence: Rosenberg et al, The Four...
4ecfd877afe1a44c6a20727c4ca7e04b35159aa9ffebfc4b057abaf72f0ba0df
MATLAB
9,747
250
classdef Field < handle_light % Map defined over the whole manifold, which is a collection of Map % objects defined on different sets in the topology, here referred to % as patches. %--------------------------------------------------------------------- % license %-----------------------...
8a872d77d9a2d4e27a5d062cee65079245d0d8382999372e7d1c9377f021ebe7
MATLAB
9,748
200
function currents = getCurrentsStructure_ToRORdLand(time, X, beats, parameters, ignoreFirstSpikes) % Extraction of parameters cellType = 0; if (isfield(parameters,'cellType')) cellType = parameters.cellType;end nao = 140;if (isfield(parameters,'nao')) nao = parameters.nao; end cao = 1.8;if (isfield(parameters,'cao')) ...
446897b9e8cf19024fc7a51cea29456c5cff62d5afb6b613e03935566f9385fa
MATLAB
9,753
286
%% Function for analysis of ICP on an insult-basis function [ICP_insults] = func_ICP(ICP, outcome) % Input: % ICP_data: ICP time series (optionally filtered to remove noise) % outcome_data: to make the correlation plot, individual ICP data % needs to be correlated to individual outcome scores (e....
76c97fcde1c53f4fc27b95d4eed68ac995423910a815fdda2f36008adb6f221b
MATLAB
9,753
161
function sPPI_and_gPPI_with_deconv_FIR(stat_path,exp_folder,N,N_ROIs,q_level,ground_truth) % ======================================================================== % Ruslan Masharipov, October, 2023 % email: ruslan.s.masharipov@gmail.com % ======================================================================== tic...
3f43e982ee12f1f02d0b58ae12ebd6b85a949b0d90dc89716bb0e348d6d83477
MATLAB
9,759
252
function [h, coordsys] = ft_headcoordinates(fid1, fid2, fid3, fid4, coordsys) % FT_HEADCOORDINATES returns the homogeneous coordinate transformation matrix % that converts the specified fiducials in any coordinate system (e.g. MRI) % into the rotated and translated headcoordinate system. % % Use as % [h, coordsys] =...
4b9e1955cf76d5e4e32c358d133aba62f4511f335ed225fab4c5a654aef39e96
MATLAB
9,759
276
function CBIG_ASDf_Plot400Schaefer19Subcor17Networks_419by419Input(corr_mat, scalelim, filename_prefix) % CBIG_ASDf_Plot400Schaefer19Subcor17Networks_419by419Input(corr_mat, scalelim, filename_prefix) % % This function draws the 419x419 correlation matrix (400 cortical ROIs + % 19 subcortical ROIs). % Major networks a...
6206ebf8255194f295717f02bbd3b8448e9e4554900faeb9895a9f0c3f124147
MATLAB
9,762
313
%% CellVCat ("Cellwise Vertical Concatenation") % perform vertical concatenation of array elements down a cell (dim 1) % assumes that the 2nd dimension is constant across all rows; tranpose if % this assumption is violated % Potential Inputs and Behaviors: % --------------- % Nx1 cell array: % - Each element of...
6ca66ac7b649f149517f593b9727fdb87fa26a7c1d8fd68e5c3cf3776f9b64b4
MATLAB
9,762
265
% Author: Daniel J. Beall % Email: DJBEALL1101@gmail.com % % beall_blink_detection() - Returns list of ICA components marked as a blink % % Usage: % >> [blinks]=beall_blink_detection(cwb,topog,chanlocs,n); % % Inputs: % cwb - list of components with bumps % topog - topographies vector % ...
1e65d379a583fcb73742f2658121c78b57bfbecb0d308a3b42a52fe05513a777
MATLAB
9,777
289
function CrossMahalanobisDistance(AllTrialData,Labels,TimeWindow,OutDir,Tag,varargin) % Train on dim 1 to classify dim 2, test on how well it generalizes. % e.g. train on nancy to diff bp, test how well bp diff'd in Tyson. [~,PThresh] = Utilities.ProcVarargin(varargin,'PThresh','fdr'); % [~,NIter] = Utilities.Pr...
fb3c06d9828ac0dede41cde07466a0849890d5cc121b332dbc433fad1728a035
MATLAB
9,779
262
function ft_uilayout(h, varargin) % FT_UILAYOUT is a helper function to make a consistent graphical user interafce with % multiple control elements. This function will find all elements with a specific tag % and style, and update or position them consistently. % % Use as % ft_uilayout(h, 'tag', '...', 'style', '...'...
fb2b2bcdc0fe15477c61114d287feafd0909b0431cc4880ec5b2f096231dd64f
MATLAB
9,781
262
function ft_uilayout(h, varargin) % FT_UILAYOUT is a helper function to make a consistent graphical user interafce with % multiple control elements. This function will find all elements with a specific tag % and style, and update or position them consistently. % % Use as % ft_uilayout(h, 'tag', '...', 'style', '...'...
6904dbe24799320107bbff6389cbfc42372f5cb73d7931234db1948357975fca
MATLAB
9,783
262
% Author: Birgit Nierula % nierula@cbs.mpg.de function [out] = ga_combineData(subjects, condition, srmr_nr, is_raw, dat_level) out = {}; % get condition info [cond_info] = get_conditionInfo(condition, srmr_nr); cond_name = cond_info.cond_name; nerve = cond_info.nerve; trigger_name = cond_info.trigger_name; str_stimu...
8274fa23ee68f49e05de0999ba1d09e50d6c98c287a43bbf858b7e2bf89c0218
MATLAB
9,786
302
%% TDFILE = '/groups/branson/bransonlab/apt/experiments/data/trnDataSH_20180503.mat'; BASEPROJ = '/groups/branson/bransonlab/apt/tmp/sh_empty_base_proj_5pts_2vws.lbl'; FLY2CALIB = '/groups/branson/bransonlab/apt/experiments/data/fly2DLT_lookupTableAL.csv'; td = load(TDFILE); tMain = td.tMain; fly2calib = readtable(FLY2...
edcc82228e8d4417093780b6af3cf6014d3f5d7f2186363de94e95775b0ba1af
MATLAB
9,790
308
%% initialize settings % Controls how far apart the frames we are analyzing. Setting 'fs' to 15 % means that every 15 frames are analyzed out of our video. fs = 1; sizeThresh = 10; % A decimal value used during background subtraction. A typical value would % be from -0.1 to 0.1. Can be negative. The higher this valu...
cbcc56164ac34aac84f742b531298c6950165de11d578a0cdc20a4825c037e76
MATLAB
9,796
233
function [] = actionAnalysis(dataset,folders,params) close all JAABA_folder = folders.JAABA_folder; %'C:\Users\lt532\Desktop\Aggression Project\JAABA Stuff\JAABA-master\MirrorChamberData\'; warning('off','stats:gmdistribution:MissingData') d = dir(JAABA_folder);d(1:2) = []; JAABA_subfolder = {d.name}'; thrust_thresh =...
18bd8980334bb4bef6da56a28547afdbd87a6d8259f1efe2c75e06a99a329ef9
MATLAB
9,800
295
function h_hotKeyControls3(handles, keyData) [currentInd, handles, currentStruct, currentStructName] = h_getCurrendInd3(handles); key = keyData.Key; modifier = keyData.Modifier; switch(key) case {'rightarrow', 'leftarrow', 'uparrow', 'downarrow'} switch(key) case 'rightarrow' ...
ead8c09a5972fc26fb90f6bbdfb116e77a5571df37568694bbe04c778b3e7479
MATLAB
9,802
311
% [sbfmfnames,rois] = avitosbfmf(...) % % Inputs an AVI movie and converts to an SBFMF movie. % Also allows user to specify regions of interest, % in which case each region of interest is saved to a % different SBFMF. % % Usage: % The parameters to avitosbfmf can be specified as pairs % consisting of a string speci...
9eb4185ee134285330bb5620048e7ab06d538c58d4de7ba0cd8985daf6ef56ee
MATLAB
9,805
391
% Minimal tutorial script - Comparing ground truth and detected burst events % with synthetic data. % See LICENSE.md for distribution information. % % % Configuration. % % Paths. addpath('lib-wl-synth', 'lib-wl-proc', 'lib-wl-ft', 'lib-wl-aux', ... 'lib-wl-plot'); % % Data files. outputfile = 'output/minimal-s...
a9a2d92b73ad5d5469a83c11e749a2ff13ce8ae3f7885227bef11da2a958f489
MATLAB
9,806
261
function embedding = optimize_layout4(head_embedding, tail_embedding, ... head, tail, n_epochs, n_vertices, epochs_per_sample, a, b,... gamma, initial_alpha, negative_sample_rate, verbose, min_dist) %OPTIMIZE_LAYOUT2 Another version of optimize_layout.m that slightly % optimizes the speed for MATLAB; in particu...
f158c907261924306135ca34cb202284b850c2a93db402f8fb594ede40d04a62
MATLAB
9,806
301
function ie_sphere(n,nquad,occ,p,rank_or_tol,store,method) % IE_SPHERE An example usage of strong skeletonization, solving a % second-kind integral equation (Laplace double-layer potential) on the % unit sphere. Sane defaults are provided for all parameters. % % IE_SPHERE(N,NQUAD,OCC,P,RANK_OR_TOL,STORE,METHOD) r...
f749ebdf54a5bf3b2dce557a64c1af536e3bb99c9cfc08dbb2c075928df1130b
MATLAB
9,815
279
function varargout = w_QCList(varargin) % W_QCLIST MATLAB code for w_QCList.fig % W_QCLIST, by itself, creates a new W_QCLIST or raises the existing % singleton*. % % H = W_QCLIST returns the handle to a new W_QCLIST or the handle to % the existing singleton*. % % W_QCLIST('CALLBACK',hObject,ev...
19a97fecb927a26a1baaf0af6051f207bda53cef19154fddc5b554ddc19cb224
MATLAB
9,821
220
function [spk, spkMap, spkView, par] = reformDat(par, dd) %% Generate spiking histograms for all trials and neurons % Inputs % - par = basic information about the recording session and parameters % including % the time vectors par.tsl (time aligned to motion onset in ms) % and par...
00a20e285bdeb844362f0235889ce383fb66e5bec9adcd74f875317f338cb018
MATLAB
9,825
225
%------------------------------------------------------------------------- % Author: Brandon S Coventry % Goal: To transform data from raster into Infotheory toolbox (Timme) form % Date: 01/10/2023 %-------------------------------------------------------------------------- %Data storage shape % n stimulus conditionsxre...
cf2391983b0b1855acf6b5ff2f36764961f68eb6548d9422dff676317709b6c7
MATLAB
9,827
254
function t = CritT(alfa,v,tail) % File name : 'CritT.m'. This file can be used % for quickly obtaining the critical t-value for % alfa values of 0.01, 0.05, 0.10 and degrees of freedom % between 1 and 100 % % One input values : 'alfa','v','tail' % One output value : 't' % % alfa: significance level (0.0...
8c3c09c220a2e2dab602b38af0807e0f380451dc9bff11024e0d86e797633d42
MATLAB
9,833
286
classdef DateTime % This class enclapsulates date time value but behaves in a very % similar way as typical array of timestamps in datenum format %====================================================================== %{ Copyright (c) 2011 This program is a result of a joined cooperation of Energocent...
b9b899dfcf6883e488226117fbae292b0b0eef5e06bb1e4f8bd47544831750be
MATLAB
9,835
277
function arr = exindex(arr, varargin) %EXINDEX extended array indexing % ARROUT = EXINDEX(ARRIN, S1, S2, ...) indexes a virtual array made by % extending ARRIN with zeros in all directions, using subscripts S1, S2 % etc. % % ARROUT = EXINDEX(ARRIN, S1, R1, S2, R2, ...) extends ARRIN using rule % R1 on ...
bdf0cb564107cdbab3d6fb9014ff498ed233e13cdae8ee093308758f40b9b73d
MATLAB
9,837
200
function currents = getCurrentsStructure_ToRORd(time, X, beats, parameters, ignoreFirstSpikes) % Extraction of parameters cellType = 0; if (isfield(parameters,'cellType')) cellType = parameters.cellType;end nao = 140;if (isfield(parameters,'nao')) nao = parameters.nao; end cao = 1.8;if (isfield(parameters,'cao')) cao ...
cbee9688dbf04e877a485b2b430c2c3d423939b03fd522190c4715aa44c0795d
MATLAB
9,838
305
%% set up paths JAABAcodedir = '/groups/branson/home/bransonk/behavioranalysis/code/Jdetect/Jdetect'; labelfiles = { '/tier2/hantman/Jay/videos/M186hm4dBPN/labeler/M186hm4dBPN_manualEndpoint1stCNO.lbl' '/tier2/hantman/Jay/videos/M186hm4dBPN/labeler/M186hm4dBPN_manualEndpoint2ndCNO.lbl' '/tier2/hantman/Jay/videos...
f2178891587553cbf0f83d6ea99c428f9ee0c4af73451b60e4fc9fba64e655ae
MATLAB
9,839
270
function [im_hatch,colorlist] = applyhatch_pluscolor(h,patterns,CvBW,Hinvert,colorlist, ... dpi,hatchsc,lw) %APPLYHATCH_PLUSCOLOR Apply hatched patterns to a figure in BW or Color % APPLYHATCH_PLUSCOLOR(H,PATTERNS) creates a new figure from the figure H by % replacing d...
4de8601cb08ba5fc8786d748e7d6eea824e909add9020e8e04c68727f2e331bb
MATLAB
9,849
306
% HIFDE3 Hierarchical interpolative factorization for differential equations % with nearest-neighbor interactions on a regular mesh in 3D. % % This is an optimization of HIFDE3X for the special case of nearest-neighbor % interactions on a regular mesh in 2D. A given mesh node is allowed to % interact ...
eea8bed8ad41800b4416dff434b7dc8fcaf946979dc2c1bf0cab6cea525c623b
MATLAB
9,873
161
function sPPI_and_gPPI_with_deconv_no_centering_FIR(stat_path,exp_folder,N,N_ROIs,q_level,ground_truth) % ======================================================================== % Ruslan Masharipov, July, 2024 % email: ruslan.s.masharipov@gmail.com % ===================================================================...
eba8d25295bca4a7359db9020d7371cf6d91d4edc2c553002916ef30f9cc798c
MATLAB
9,885
209
% Comparison of freq and amp on RF size addpath("HelperFunctions") load(fullfile(DataPath, 'IntraDayVariability_Processed.mat')) load(fullfile(DataPath, 'AmpFreqSurvey_Processed.mat')) AmpFreqResults = struct(); %% Remove CRS02 from IntraDay structure IntraDayVariability = IntraDayVariability(strcmp({IntraDayVariabil...
e2c9d373b2f933cfdb60d8749816569ec4d7b9d7430d89d042d86c026359fb2c
MATLAB
9,890
281
function [dipout] = beamformer_sam(dip, sens, headmodel, dat, all_cov, varargin) % BEAMFORMER_SAM scans on pre-defined dipole locations with a single % dipole and returns the CTF Synthetic Aperture Magnetometry (SAM) % beamformer estimates. location. Dipole locations that are outside % the head will return a NaN value...
ffd3d568c566e700f9b449327024b3d4931252bad2fda84c5fb8a526c4be2367
MATLAB
9,895
278
function CleanReview(spkDat, cleanDat, clust, errCriterion, varargin) maxScale = 2; sameScale = true; convertToVolt = true; nSampTarget = 300; nSampReject = 25; nSampAccept = 25; minIsi = 1; Fs = spkDat.Fs; spkDat.waves = double(spkDat.waves); wvFs = Fs * spkDat.upsample; for i = 1:2:length(varargin) switch lower...
928334032b5f3ffd3f2b12ff8e8fe1f7fb320624f00abbf865c8702b3203fc02
MATLAB
9,896
291
function varargout = DPARSF_ScrubbingSetting_gui(varargin) % varargout = DPARSF_ScrubbingSetting_gui(varargin) % GUI for setting parameters for Scrubbing. % Input: FDType, FDThreshold, PreviousPoints, LaterPoints, ScrubbingMethod. % Output: FDType, FDThreshold, PreviousPoints, LaterPoints, ScrubbingMethod. ...
32265ec7fe6523b15d019a6b11f33f3afbb80402c6d5821927e292d743c72bdb
MATLAB
9,898
353
function eventmatrixdata = wlFT_doFindEventsInTrials( trialftdata, ... bandlist, segconfig, paramconfig, bandoverrides, tattleprogress ) % function eventmatrixdata = wlFT_doFindEventsInTrials( trialftdata, ... % bandlist, segconfig, paramconfig, bandoverrides, tattleprogress ) % % This function calls wlProc_doSegm...
7717723d943fa5a344d5ad559652389eaba8795cb84805c7dfa3ec43992f49b6
MATLAB
9,898
253
function [stat] = ft_sourcestatistics(cfg, varargin) % FT_SOURCESTATISTICS computes the probability for a given null-hypothesis using % a parametric statistical test or using a non-parametric randomization test. % % Use as % [stat] = ft_sourcestatistics(cfg, source1, source2, ...) % where the input data is the resul...
0ba2694069cede86f6389f8715f126524de6374d15940e661f8c42c6fc8f5974
MATLAB
9,905
202
function [J] = build_jacobian_FD(mesh,data,varargin) % BUILD_JACOBIAN_FD Calculates spatial distributions of sensitivity of % field registerd on the mesh boundary to changes of optical properties % per mesh node. It deliveres up to 4 distributions: % If data are real (CW - continuous wave): % - J_{mua}^{A} ...
de4c82cbec3a4a65a0ab1144a61a070a036b286a68ec84855d748abe5ff87851
MATLAB
9,913
275
% header = mmf_read_header(filename) % TODO: handle multichannel data, non 8-bit data % mmf format documentation: % Set of Image Stacks representing a movie. Beginning of file is a header, with this format: % 10240 byte zero padded header beginning with a textual description of the file, followed by \0 then the follow...
22dac1fae20ac9e56df1fb86716033ee87551e152aa8122082010055430fc4e6
MATLAB
9,921
352
function eventmatrixdata = wlFT_doFindEventsInTrials_MT( trialftdata, ... bandlist, segconfig, paramconfig, bandoverrides, tattleprogress ) % function eventmatrixdata = wlFT_doFindEventsInTrials_MT( trialftdata, ... % bandlist, segconfig, paramconfig, bandoverrides, tattleprogress ) % % This function calls wlProc_...
ba41d4603f023cf290f7328c33b27e2240f31d6c4252877c8bf2c4cc183ac6ce
MATLAB
9,925
252
function [spectrum,freqoi,timeoi] = lan_specest_wavelet(dat, time, cfg) % LAN_SPECEST_WAVELET picks up the equivalent fieldtrip function, % FT_SPECEST_WAVELET, and replaces calls to other fieldtrip functions. % Optional arguments should be provided within a single structure, unlike % the original implementation. % %...
fdbc4a8faf0c365623104722661512843894ee112f40c1312b0b69d34e8f4e45
MATLAB
9,939
254
function [stat] = ft_sourcestatistics(cfg, varargin) % FT_SOURCESTATISTICS computes the probability for a given null-hypothesis using % a parametric statistical test or using a non-parametric randomization test. % % Use as % [stat] = ft_sourcestatistics(cfg, source1, source2, ...) % where the input data is the resul...
6d5c421b7151de4afbf9237b7c0269e2cc1c9c09e5d03ac0b25b657e5cd88a7b
MATLAB
9,940
233
% SubtractContinuousVariables.m % Sarah West % 6/13/22 % Removes Beta * continuous Y response variable from X explanatory variables % after continuous variable regressions. function [parameters] = ResidualsFromContinuous_Inverted(parameters) MessageToUser('Residuals from ', parameters); dataset_info = param...
aa35eade9b4addec0c77f762d4e38b21a76a0b89795ac1dc721e302be1cc0dac
MATLAB
9,940
283
% shifting_key_n = floor(tiling_info.z_pixel./z_truncate); % shifting_key_n = 20; % z_truncate = floor(tiling_info.z_pixel./shifting_key_n); clear stitching_queue tform kk = 0; for ii = 1:size(read_file_name,1)-1 for jj = 1:size(read_file_name,2) kk = kk+1; stitching_queue(kk).tile_1 = ...
e1906661a05a01f82e25a829369aefddb59c7be0d428727592718dc33c2689a9
MATLAB
9,941
264
function [cROIs, Cs, cROIs_BG, Cs_BG, coherence, skew, sz, patch_ID, A0] = DNMF_General(paths_to_videos, options) % [cROIs, Cs, cROIs_BG, Cs_BG, coherence, skew, sz, patch_ID, A0] = DNMF_General(paths_to_videos, options) % % Jason Moore, 2025 %Extract options maxVal = options.maxVal; s...
30cd80674b49428f590c1041757029619fe82890a7458d24d2822d4a7da0a9af
MATLAB
9,943
315
function [source] = ft_appendsource(cfg, varargin) % FT_APPENDSOURCE concatenates multiple volumetric source reconstruction data % structures that have been processed separately. % % Use as % combined = ft_appendsource(cfg, source1, source2, ...) % % If the source reconstructions were computed for different ROIs or ...
da4370947a1d71e3435182c0630aef15cc3c42d53300cc144cde8f6bae1566c3
MATLAB
9,946
258
%% dataCellSuperClass % % || -- Superclass for generic methods of working w/ dataCell classes % Copyright (C) 2023 Trevor S. Smith % Drexel University College of Medicine % % 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 % t...
7434f522fac8987f3cc673971ad2d0a28f00fc5827221ee343d223cf2fbeb09e
MATLAB
9,950
246
function csi(filename, experimentName) if isempty(filename) quit(2); end data = load(filename); NeuP = data.NeuP; HeadX = data.HeadX; HeadY = data.HeadY; Speed = data.Speed; % Determine how many segments [seg,frame]=size(NeuP); seg = 1:seg; num_seg = numel(seg); ...
cd7abbe9bcbb243d92f110b491503bf1730b932b6dac3a1ad1671b1db6c701b2
MATLAB
9,952
341
% load data % contact Lead Author for data %% number of cells - AO vs VS % panel 2F figure; hold on % AO1-VS1; xx = cellRatioNcells{1}; k = size(xx, 1); plot([ones(1,k); ones(1,k)*2], xx', 'Color', [1 1 1]/2); yy = xx(:,1); clr = 'm'; bar(1, mean(yy), clr, 'FaceAlpha', 0.5); errorbar(1, mean(yy), st...
354e881bff982cf5bdd2ba7e90f8758163b234b7ad80ac8fb70f4144b2b21c9f
MATLAB
9,955
285
function [spike] = ft_read_spike(filename, varargin) % FT_READ_SPIKE reads spike timestamps and waveforms from various data % formats. % % Use as % [spike] = ft_read_spike(filename, ...) % % Additional options should be specified in key-value pairs and can be % 'spikeformat' = string, described the fileformat (defa...
00bec7ab235b40f33f353d98649df95e290b3e6a60b3ea6f47eae249c2fb00e9
MATLAB
9,957
268
function ClusterStates_MakeFigure(SleepState,basePath,noprompts) %Check needed here if Sleep state has the right stuff v2struct(SleepState.detectorinfo.detectionparms.SleepScoreMetrics) v2struct(SleepState.detectorinfo.StatePlotMaterials) v2struct(SleepState.detectorinfo.detectionparms.SleepScoreMetrics.histsandthre...
0d2c46014989fe82f091c53cf34081550536184b1ff45662b4760b0f76be6267
MATLAB
9,961
315
function [source] = ft_appendsource(cfg, varargin) % FT_APPENDSOURCE concatenates multiple volumetric source reconstruction data % structures that have been processed seperately. % % If the source reconstructions were computed for different ROIs or different slabs % of a regular 3D grid (as indicated by the source pos...
e1ee14eaef8a53e36cfbb75e5d8b6cd5f90e83675ea4d1fcaf4f9aaae72eedaf
MATLAB
9,964
165
function sPPI_and_gPPI_without_deconv(stat_path,exp_folder,N,N_ROIs,q_level,ground_truth) % ======================================================================== % Ruslan Masharipov, October, 2023 % email: ruslan.s.masharipov@gmail.com % ======================================================================== tic ...
f7ec55c6d6791799fe41c88f91c95584fbd74d3870b03b16b490ee0a5d9c8a51
MATLAB
9,971
254
function [X tcens]=ms_extract_clips2(Y,times,T,beta,betaonesnap) %MS_EXTRACT_CLIPS2 - Extract clips from raw/preprocessed data array centered % at a collection of event times, possibly upsampling/shifting % %Consider using mscmd_extract_clips % % Syntax: [X tcens] = ms_extract_clips2(Y,times,clip_si...
3cbb9857bfa8e67474d94056e62e1a0b2a1bfb862c2568ff7fb2fca498a15cae
MATLAB
9,972
293
function [out1,out2,out3] = ginput2(arg1) %GINPUT Graphical input from mouse. % [X,Y] = GINPUT(N) gets N points from the current axes and returns % the X- and Y-coordinates in length N vectors X and Y. The cursor % can be positioned using a mouse. Data points are entered by pressing % a mouse button or any ke...
e5ad54d7e66eea86199e443d69ac17000ec640fe6acd6dbdef590c20f7d97c68
MATLAB
9,972
360
function [CMAP,CLIM,WIDTH,REF,LEVELS] = cmfit(CMAP,CLIM,WIDTH,REF,CENTER,varargin) %CMFIT Sets the COLORMAP and CAXIS to specific color bands. % % SYNTAX: % cmfit % cmfit(CMAP) % cmfit(CMAP,CLIM) ...
948723fed9a5a603956ac57c66bb5b24482ca1a9ff607fd379ee1cdfe0eb6bf5
MATLAB
9,973
248
function [spectrum, freqoi, timeoi] = ft_specest_tfr(dat, time, varargin) % FT_SPECEST_TFR performs time-frequency analysis on any time series trial data using % the 'wavelet method' based on Morlet wavelets, doing convolution in the time % domain. % % Use as % [spectrum,freqoi,timeoi] = ft_specest_convol(dat,time,....
fe6d04002d6f1b4508b8ab7c72b32a8d2c934b47fa3f7f25293eb7bad3c315e3
MATLAB
9,994
58
function plot_model(COR,ind,chanlocs,t,alfa) if nargin < 5 alfa=0.05; end %electrode = chanlocs = chanlocs ; coef = size(COR.models(ind).t,2); if strcmp(t,'t') topo = figure('Colormap',... [1 1 1;0.972972989082336 0.999628365039825 0.999628365039825;0.945945918560028 0.999256730079651 0.999256730079651;0.918...
126b60d1e31e07bbd74c0e1716c7e3ba6d6d290c90f76cc7c083f8f238061a75
MATLAB
9,997
336
function [volInfo, dat] = iimg_read_img(inputimgs, extended_output_flag, reading_data, first_vol) % :Usage: % :: % % [volInfo, dat] = iimg_read_img(inputimgs, [extended_output_flag (1|2)], [reading_data (0|1)], [first vol only (0|1)]); % % - reads 3-D or 4-D img/nii files, with extended volInfo output % - flag to r...
da6356291e4714e248147bc4a0d3e7b91445f778e0fcbe79b6fd00cfb19b73c1
MATLAB
10,002
153
%% RELAX EEG CLEANING PIPELINE, Copyright (C) (2024) Aron Hill & Neil Bailey % 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 License, or % any later...
13032f031f126e7e06c1878f4a80bad2d0aedac53d3746834e3b837613603fb8
MATLAB
10,005
347
function [C,Ceq] = Constraint_Function (xopt) NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 4; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.a1; x0(2) ...
3ec0efd7feb0fd49d33e06638b5de5bef9b616c3cf58d63351073bb25946350d
MATLAB
10,011
349
function [C,Ceq] = Constraint_Function (xopt) NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 2; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.a1; x0(2) ...
19bcee509ca94ae8924b0e801512fbed252849c54b9fa9ae4bb9031cfebb1912
MATLAB
10,021
213
%Analyze_Frontloading.m %This script analyzes alcohol drinking patterns to assess if %alcohol front-loading is present using the following %criteria: %1*. Of three detected change points, the change point with the best fit %is the earliest and/or is within the first half of the session. This %becomes the reference cha...
e730e8ad854c06a533d6c350c9b15a28647debda0ab9b05998e78f7dffe5195d
MATLAB
10,027
194
function [Si, Stm, sROI] = boney_segment_create_bone_surface ... (Vo, Ybonepp, Ybonemarrow, Ybonethick, Yheadthick, Ya, Ymsk, YaROIname, YaROIid, out, job) %create_bone_surface. Surface-based processing pipeline. % Final bone processing function that creates the bone surfaces to extract % values from the surrounding ...
727c1a39f09869e315ebf2cf23d16bdca94ba46ab4624361c68af9514fe80e00
MATLAB
10,029
303
function ReclassifyReview(spkDat, reclassDat, varargin) % convert waveform data from int16 to double-precision floating point spkDat.waves = double(spkDat.waves); minIsi = 1; [wL, nChan, ~] = size(spkDat.waves); pk = spkDat.peakLoc; wP = spkDat.wavePad; wL = wL - 2*wP; vScale = spkDat.vScale; maxScale = 1; sameScale ...
86e99bcacc1ec9c82aea9fbce3df3ef945dfd922753480de93244afa7a085b36
MATLAB
10,040
243
function seizureInfo = getSeizureTimingInfo(seizurePath, seizureCell, params) % This function reads a seizure's mat file and extracts information about % the baseline times, seizure times, postictal times, recovery times, and % control times. It also extracts information about lick and click times. % INPUTS: % - sei...
2e46f364f22702c74a56b0d0e7c983f2ff552a45c0ab0c7d6dacefef1044571a
MATLAB
10,041
269
function save(this,filename,encoding,ordering) % Save GIfTI object in a GIfTI format file % FORMAT save(this,filename,encoding) % this - GIfTI object % filename - name of GIfTI file to be created [Default: 'untitled.gii'] % encoding - optional argument to specify encoding format, among % ASCII, Base6...