sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
68662225765e6c1a51b91f821ccf8cc5fa584fb4e7167ffe5ff428e64438aa43
MATLAB
15,573
395
function [data] = ft_redefinetrial(cfg, data) % FT_REDEFINETRIAL allows you to adjust the time axis of your data, i.e. to % change from stimulus-locked to response-locked. Furthermore, it allows % you to select a time window of interest, or to resegment your long trials % into shorter fragments. % % Use as % data = ...
2ea27f93f75c75868501513170e5f6befe6960486706669e4adc39bde7f0f458
MATLAB
15,574
528
function data = loadubjson(fname,varargin) % % data=loadubjson(fname,opt) % or % data=loadubjson(fname,'param1',value1,'param2',value2,...) % % parse a JSON (JavaScript Object Notation) file or string % % authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu) % created on 2013/08/01 % % $Id: loadubjson.m 460 2015-01-...
dfab5f505c6270aac765f2a47e9ecadf0990d7c7725883c3e720742e6654c127
MATLAB
15,588
416
% AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Provided by the Herzenberg Lab at Stanford University % License: BSD 3 clause % classdef Label...
4b3b6c65726abfdc8c1560212f2796ac204926d0499bccd5181212c716be7184
MATLAB
15,595
396
function [data] = ft_redefinetrial(cfg, data) % FT_REDEFINETRIAL allows you to adjust the time axis of your data, i.e. to % change from stimulus-locked to response-locked. Furthermore, it allows % you to select a time window of interest, or to resegment your long trials % into shorter fragments. % % Use as % data = ...
0225c000cd78213e60c9b3961f46dcba2073875cc5255bdc622c9bc7119e6a26
MATLAB
15,696
377
function RokJ_PSTH_meanSpikeRate() % Function reads data containig spike times recorded in a leg nerve of % Nezara viridula in response to a female calling song (FCS) and/or noise. % It analyses the data and calculates PSTH and mean spike rate. The results % can be saved as figures, referenced in the paper as Fig...
fda0ab2e4948aa626ea603dc2b31ad5ea425eb0c9fd8623bc5857fb07d19fa0a
MATLAB
15,698
445
%{ Once you have your results, time for plotting and making the graphs look beautiful already in Matlab! Rather than prettifying your plots in Illustrator, I highly recommend doing as much as possible already in Matlab. Chances that you'll have to regenerate the figures at some point (because you decide to change one s...
e378b1dc99abb33f8913d1faef75abd7097058f24cc368e474fb8d90189a8127
MATLAB
15,709
560
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...
50b9707040cbc07097e7be0f16d222c8a9e70ce9ea18eeb3928b220d819102a2
MATLAB
15,713
440
classdef GTManagerController < handle % Controller for the "Groundtruth Navigator" window, which lists the % groundtruth to-label suggestions per movie/frame/target and lets the user % navigate to them and compute GT accuracy. % % This replaces the bare uifigure function GTManager.m: state and widget % hand...
bfa4925cdf6b230eba3e9d8e7b24426de89d77852ac4fc245c472df293e9e56b
MATLAB
15,716
408
% sim_grid.m % % Runs simulations of both PFs and preplay across a grid of parameters. It % saves the spikes of each as PFSpikeTimes_grid and preplaySpikeTimes_grid % -Each parameter point is simulated by the function run_param_sim() % It then runs Bayesian decoding using those spikes. % -Decoding is performed by the f...
f7d8f2fbaa932bb84c5b053a323041c17725cb61302510bbdeecd7f1799fb980
MATLAB
15,716
243
function remapping= rate_remapping_TRACK_PAIRS(folders,varargin) % folders is [] for individual session, or cell array of folders % varargin can be 'spearman' or 'wcorr' if isempty(folders) a=pwd; folders={a}; cd .. end cd(folders{1}); if ~isempty(varargin) method= varargin{1}; disp(['running for.....
94dc3d6f546092aba45c6a3b1d730eeeea1e21f822ef1340ff3b1a67382b4c8b
MATLAB
15,718
372
function [data] = ft_megplanar(cfg, data) % FT_MEGPLANAR computes planar MEG gradients gradients for raw data or average % event-related field data. It can also convert frequency-domain data that was computed % using FT_FREQANALYSIS, as long as it contains the complex-valued fourierspcrm and not % only the powspctrm. ...
85e06205e5c6f093b759d1d439461be1839e3a0fb7aa0cb67ac5622a2307847a
MATLAB
15,739
450
function varagout = boney_xml2csv(job) %boney_xml2csv(job). Wrapper to call cat_io_xml2csv for boney structure. % See cat_io_xml2csv. % % varagout = boney_xml2csv(job) % % report % 'boney_default' .. only the most relevant fields % 'boney_details' .. some additional selected fields % (reg...
88c7d4225e464a45385336541a67f9c607df4458ea7b734d93cb737e347aa6f0
MATLAB
15,750
445
function [grad, elec] = mne2grad(hdr, dewar, coilaccuracy) % MNE2GRAD converts a header from a fif file that was read using the MNE toolbox into % a gradiometer structure that can be understood by the FieldTrip low-level forward % and inverse routines. % % Use as % [grad, elec] = mne2grad(hdr, dewar, coilaccuracy) %...
c5bc6d47673cbfa7086a56fb42977d3ddecec4ec868f65f437c6e0bf179b891f
MATLAB
15,752
467
function [Gain, errMsg] = bst_duneuro(cfg) % BST_DUNEURO: Call Duneuro to compute a FEM solution for Brainstorm. % Modificado para LAN Pablo billeke % USAGE: [Gain, errMsg] = bst_duneuro(cfg) % @============================================================================= % This function is part of the Brainstorm s...
54834b455edde96293f170b4b5ac471f5bc1929e8584d553cde948629d6aa3c4
MATLAB
15,764
487
//======================================================================== // GLFW 3.4 Cocoa - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org> // Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net> // // This software ...
338cac65cba5c981b7f0e55d8a54716eb98eb309c8dca3a40b2a8946fc3ac1b0
MATLAB
15,776
445
function [grad, elec] = mne2grad(hdr, dewar, coilaccuracy) % MNE2GRAD converts a header from a fif file that was read using the MNE toolbox into % a gradiometer structure that can be understood by the FieldTrip low-level forward % and inverse routines. % % Use as % [grad, elec] = mne2grad(hdr, dewar, coilaccuracy) %...
93924023cc15ebde9c161ba0f608b8947456f775484943ff5f46122c19263fda
MATLAB
15,786
444
% note: change current folder to figure "number" clear all;close all;clc; rawPath=pwd; %displays the current working directory - set it to the figure "number" savePath=rawPath; addpath Panels/ addpath Functions/ load("ExampleCellFig1") load("Bars_WB_DSI0.30NVS0.15_Allcells") colors=[0.5586 0.7344 0.5586]; %% Figure ...
a87dbd1af254a13d412feb84dc7ce41e1b7ba29c218355c8c57d703b41c3287b
MATLAB
15,787
350
function [UDStates] = detectUD(varargin) % Detect up and down states from LFP. % % USAGE % % [spikes] = bz_loadPhy(varargin) % % INPUTS % (OPTIONAL) % basePath -(default: pwd) basePath for the recording file, in buzcode format: % whateverPath/baseName/ % folder mus...
c49c4a5732caf122684602a161c578184b729951c2d444d59c89336a0550e7c7
MATLAB
15,821
246
function block_results(stat_path,exp_folder,q_level,ground_truth) % ======================================================================== % Ruslan Masharipov, October, 2023 % email: ruslan.s.masharipov@gmail.com % ======================================================================== load([stat_path filesep exp_...
f0de84239ba2d9ba9f00545dd38cc36ed180eaca12f2c8fe2487876623d087d5
MATLAB
15,832
483
function mesh = read_ply_mod(filename) % read_ply - read data from PLY file. % % mesh = read_ply(filename); % % mesh.v : vertices % mesh.f : faces % mesh.vn: vertex normals % % IMPORTANT: works only for triangular meshes. % % Copyright (c) 2003 Gabriel Peyré % % Modified 2015 by Idse Heemskerk t...
21cf8a0a5842770513cf7ecea52fcbfa955288912d751c26cf278daf5b248f6b
MATLAB
15,836
396
function [data] = ft_resampledata(cfg, data) % FT_RESAMPLEDATA performs a resampling or downsampling of the data % % Use as % [data] = ft_resampledata(cfg, data) % % The data should be organised in a structure as obtained from % the FT_PREPROCESSING function. The configuration should contain % cfg.resamplefs ...
247e6df4bd585fcf0ab46fca4f7db517be5f3b146cf67bc8cb3eb4e98594d773
MATLAB
15,857
414
function varargout = w_ApplyMonteCarlo(varargin) % W_APPLYMONTECARLO MATLAB code for w_ApplyMonteCarlo.fig % W_APPLYMONTECARLO, by itself, creates a new W_APPLYMONTECARLO or raises the existing % singleton*. % % H = W_APPLYMONTECARLO returns the handle to a new W_APPLYMONTECARLO or the handle to % t...
2a74e57715fa5a5300a1b4e6d6b34fbb34411a307d2cab1eb9df59780c4c78b7
MATLAB
15,873
393
% Author: Ulrike Horn % uhorn@cbs.mpg.de function varargout = manual_rpeak_selection(varargin) % MANUAL_RPEAK_SELECTION MATLAB code for manual_rpeak_selection.fig % MANUAL_RPEAK_SELECTION, by itself, creates a new MANUAL_RPEAK_SELECTION or raises the existing % singleton*. % % H = MANUAL_RPEAK_SELECTION...
57fc39f9c970a10d017858b9658a8c0550921349d7da216092bc16d969a09c55
MATLAB
15,911
442
function [cfg] = ft_neighbourplot(cfg, data) % FT_NEIGHBOURPLOT visualizes neighbouring channels in a particular channel % configuration. The positions of the channel are specified in a % gradiometer or electrode configuration or from a layout. % % Use as % ft_neighbourplot(cfg) % or as % ft_neighbourplot(cfg, dat...
a1883f737f3b34ca5fa3cb4141feb850620aca2f36f2ea800ffe8d1d4314ca7e
MATLAB
15,927
447
%% WT clear all; close all;clc; %% fps=30; trail=[]; date='0729';EN=[13 14 15];mouse='9'; trail=[trail;loadtrail(date,EN,fps)]; date='0731';EN=[10 11];mouse='7'; trail=[trail;loadtrail(date,EN,fps)]; date='0810';EN=[22 23 24];mouse='2';%2 4 trail=[trail;loadtrail(date,EN,fps)]; date='0810';EN=[32 33 34];mo...
638cd25569450650922062c2c6f38878af3e4229081e6a9a9ad7fafeaf4498a1
MATLAB
15,942
315
function [Ybonepp, Ybonethick, Ybonemarrow, Yheadthick, vROI, bnorm] = ... boney_segment_extractbone(Vo,Ym,Yc,Ye,Ya,Ymsk,trans,seg8t,tis,tismri,out,job,vx_vol,YaROIname,YaROIid,RES,BB) %% * Report: % - better an upper slice? % - optimize print font size % - add basic parameters (reduce,mask,Atlas,tpm) % - ad...
b594ee816c2c92a08f16af454e5ce3e3e7cbddf2fab7248b166e3a74b7c1228a
MATLAB
15,949
361
function [RawData,HarmonizedBrain, HarmonizedBrain_LH, HarmonizedBrain_RH, Header_LH, Header_RH, OutNameList_LH, OutNameList_RH] = yw_Harmonization_Surf(ImgCells_LH, ImgCells_RH, MaskData_LH, MaskData_RH, MethodType,AdjustInfo, ParallelWorkersNum,OutputDir) % [HarmonizedBrain_LH, HarmonizedBrain_RH, Header_LH, Header_...
924426cf9f115ccc820305a243770756ad7d7d0c9dae2de5a9b3799a34b95be7
MATLAB
15,981
348
% regularize_ICs.m % Sarah West % 9/1/21 % Takes calculated ICs, thresholds them, and regularizes them into % contiguous areas function []=regularize_ICs(parameters) % Establish input and output directories disp(['output saved in ' parameters.dir_output_base{1}]); % For each mouse for mou...
4ab34ac67310846ea002e28a0a392e0d3a852e3c09452393a188af1a59cbf2e9
MATLAB
15,994
361
function [spectrum,ntaper,freqoi] = ft_specest_mtmfft(dat, time, varargin) % FT_SPECEST_MTMFFT computes a fast Fourier transform using multitapering with % multiple tapers from the DPSS sequence or using a variety of single tapers. % % Use as % [spectrum,ntaper,freqoi] = ft_specest_mtmfft(dat,time...) % where % da...
f58af2db07cb49aed17c164ddfee128c57ea2a4cae064d003cbff863f35008e7
MATLAB
15,995
361
function [spectrum,ntaper,freqoi] = ft_specest_mtmfft(dat, time, varargin) % FT_SPECEST_MTMFFT computes a fast Fourier transform using multitapering with % multiple tapers from the DPSS sequence or using a variety of single tapers. % % Use as % [spectrum,ntaper,freqoi] = ft_specest_mtmfft(dat,time...) % where % da...
b74d998823c30cc29af01ac8f2bbbe010d57c4890f6c67292442b9d5548cf761
MATLAB
15,999
427
function avw_hdr_write(avw, fileprefix, machine, verbose) % AVW_HDR_WRITE - Write Analyze header file (*.hdr) % % avw_hdr_write(avw,[fileprefix],[machine],[verbose]) % % eg, avw_hdr_write(avw,'test'); % % avw - a struct with .hdr field, which itself is a struct, % containing all fields of an Ana...
78a195bdc22683fa191a5aeb8e20c209bff2dc1b3b66da9c80174a63168b9daf
MATLAB
16,007
581
% Field Trip-related test scripts - Synthetic FT data - "Custom" tests. % % This tests the ability to specify "custom" (lambda-function) segmentation % and parameter extraction algorithms. % % See LICENSE.md for distribution information. % % % Includes. do_ft_init % Grandfather in "synthetic trace" configuration. do...
6602b7bf94f84441171b6c7460d1c3006f41e7f7f928d54bbd00745d50b1555b
MATLAB
16,022
425
function varargout = CommunicationModelSetting(varargin) % COMMUNICATIONMODELSETTING MATLAB code for CommunicationModelSetting.fig % This GUIDE dialog returns a communication-model setting structure. % % Usage: % newSettings = CommunicationModelSetting(oldSettings, dialogTitle) % % Returned structure fields: % Pred...
2f22fe46327b295b80215ad0a2e7cd989a1b0fdd724e419b1609c951502fa68b
MATLAB
16,030
398
function varargout = h_roiControlGUI3(varargin) % H_ROICONTROLGUI3 M-file for h_roiControlGUI3.fig % H_ROICONTROLGUI3, by itself, creates a new H_ROICONTROLGUI3 or raises the existing % singleton*. % % H = H_ROICONTROLGUI3 returns the handle to a new H_ROICONTROLGUI3 or the handle to % the exi...
b144b8c9775b56c754ea07aa9e91d108cd84edb573833822f4ef72470a75e3c9
MATLAB
16,032
375
function varargout = h_animalStateTrackerGUI3(varargin) % H_ANIMALSTATETRACKERGUI3 MATLAB code for h_animalStateTrackerGUI3.fig % H_ANIMALSTATETRACKERGUI3, by itself, creates a new H_ANIMALSTATETRACKERGUI3 or raises the existing % singleton*. % % H = H_ANIMALSTATETRACKERGUI3 returns the handle to a new H...
0119b0b1def77cd8c65c037f4a2f392e3de76299ac5e8cb1ba3552ee480bfd4f
MATLAB
16,041
335
function coreg = spm_cfg_coreg % SPM Configuration file for Coregister %__________________________________________________________________________ % Copyright (C) 2005-2016 Wellcome Trust Centre for Neuroimaging % $Id: spm_cfg_coreg.m 7665 2019-09-23 11:27:40Z john $ %------------------------------------------------...
6d50b370c802fb24935f5234f77b36acc28418443d337ae52fbab12f10065491
MATLAB
16,060
374
function process_positions_PRE % Input: data extracted from NLX 'VT1.nvt' % - x: x position of largest tracked blob % - y: y position of largest tracked blob % - timestamps: timestamps (in seconds) % Output: linear structure containing new X,Y,T and linearized position template % this function calls 'crop_in_time.m' ...
e60d692daea0e56cd2d320f26a49a144f402c1c6373f0953f8406ae82e38323c
MATLAB
16,076
392
function [data] = ft_megplanar(cfg, data) % FT_MEGPLANAR computes planar MEG gradients gradients for raw data or average % event-related field data. It can also convert frequency-domain data that was computed % using FT_FREQANALYSIS, as long as it contains the complex-valued fourierspcrm and not % only the powspctrm. ...
664fc73eab61d834a82a892fa29f4815600145e5e9322f13781d599a4f1370cb
MATLAB
16,083
395
classdef DatasetReader < matlab.mixin.SetGet & dynamicprops % DatasetReader Read Imaris ims file DataSets % % © 2015–2016, Peter Beemiller (pbeemiller@gmail.com) % % See also ImarisReader properties (SetAccess = 'immutable', GetAccess = 'public', Transient = true) ...
ddd4a03c25eef4b406edef265d5bc4c55e85fc6f48dbd495927b05d99c2876af
MATLAB
16,089
440
function VBA_updateDisplay(posterior,suffStat,options,y,it,flag) % // VBA toolbox ////////////////////////////////////////////////////////// % % VBA_updateDisplay(posterior,suffStat,options,y,it,flag) % updates display of sufficient statistics % % This function deals with the screen display of iterative sufficient % st...
4806b3f1beb87327d9bf455b53bf25dead5ebf4ee1a967fa7f510ebb94a64094
MATLAB
16,094
322
function [ReHoBrain_AllWindow, Header] = y_reho_Window(WindowSize, WindowStep, WindowType, AllVolume, NVoxel, AMaskFilename, AResultFilename, IsNeedDetrend, Band, TR, TemporalMask, ScrubbingMethod, ScrubbingTiming, Header, CUTNUMBER) % Calculate dynamic regional homogeneity (i.e. ReHo) % FORMAT [ReHoBrain_AllWind...
f8a0b3fad9034f560c0d43c384f6e346d872511074c32c2c33068238cb3b8f42
MATLAB
16,101
401
function [normalised] = ft_volumenormalise(cfg, mri) % FT_VOLUMENORMALISE normalises anatomical and functional volume data % to a template anatomical MRI. % % Use as % [mri] = ft_volumenormalise(cfg, mri) % where the input mri should be a single anatomical volume that was for % example read with FT_READ_MRI. % % Con...
41d90dc246cb99eccddc8b745500e5e51106296aea675509c6303cc97e910bfa
MATLAB
16,107
444
function han = showsurface(vertices, faces, para, varargin); % plots volume conductor/cortex as surfaces % eventually plus sources/dipoles % usage: showsurface(vc,para,source1,source2,....); % % % vc is a structure with two fields: % vc.tri is Nx3 matrix of integers where each % column denotes the indice...
e24e3bcc1a11b37eaeb1446c79ad2632738a1616d26534db4cafd0ccd09c5f1f
MATLAB
16,109
444
% krr_predict_FK - kernel ridge regression estimation % using (stratified) LOO and permutation testing % Diego Vidaurre % adapted to use feature matrix as input, different kernels (Fisher kernel) % Christine Ahrends % % [predictedY,stats] = krr_predict_FK(Yin,Xin,family,parameters); % [predictedY,stats] = krr_predict...
6b1df00e2c6e5d9c15c05075f8d08db692f71fd90206ef171c1f497a8bda22d2
MATLAB
16,123
504
function json=saveubjson(rootname,obj,varargin) % % json=saveubjson(rootname,obj,filename) % or % json=saveubjson(rootname,obj,opt) % json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a Universal % Binary JSON (UBJSON) binary string % % author...
b54ae0908efb1281dadd7ab0063136ca04ff65147227492adbff981a19953797
MATLAB
16,129
372
function [p]=initialize_group(p) % remove '/' from end of base path temp_base_path = strsplit(p.paths.base,'/'); if isempty(temp_base_path{end}) p.paths.base = strjoin(temp_base_path(1:end-1),'/'); end % Path to subjects directories [LIST, ISDIR] = glob([p.paths.base,'/*']); % exclude groupANALYSIS directory if ...
3b0fb945dfd2189cd5259944772da6cd42f08e85bfdb70a38dca9e2671fc1f19
MATLAB
16,142
388
function [] = plot_ground_truth_compare_global_remapped_combined(folders,method,option) total_number{1}(1:3) = 0; total_number{2}(1:3) = 0; for nfolder = 1:length(folders) % Get total number of replay events cd(folders{nfolder}) load decoded_replay_events [~,time_range]=sort_replay_events([],'wcorr'); ...
1ac0d6f2d864ac5e86a6b30f8daffd0e7e0aa920c9bcbfe569762cc19f41a23c
MATLAB
16,168
457
function res = vl_simplenn_feattopix(net, x, dzdy, res, varargin) % VL_SIMPLENN Evaluates a simple CNN % RES = VL_SIMPLENN(NET, X) evaluates the convnet NET on data X. % RES = VL_SIMPLENN(NET, X, DZDY) evaluates the convnent NET and its % derivative on data X and output derivative DZDY. % % The network has a s...
4c8f5d604edf467d899b30f22563aee12bfb87fad4871ef5ed9da6b83c26f722
MATLAB
16,176
230
function gtfileinfo = GTFileInfo(exptype) cprdir = '/groups/branson/bransonlab/apt/experiments/res/cprgt20190407'; gtimagefile = ''; annoterrfile = ''; switch exptype, case {'SHView0','SHView1'} if strcmp(exptype,'SHView0'), vwi = 1; else vwi = 2; end gtfile_trainsize_cpr = fullfile...
30e1e44af9fef80e5deb500af726527f447ac23f697aac3f25949c9125dcfc49
MATLAB
16,180
425
function tom_mrcwrite(varargin) %TOM_MRCWRITE writes data to MRC format file. % % tom_mrcwrite(Data) % % tom_mrcwrite(Data) % tom_mrcwrite(Data,'name',property1,'style',property2) % % Writes 'Data' in a MRC format under the name property1. If 'Data' is not a % structure, a default header is created 3 differen...
ddac0d1d87ba6f175d1bcbb9e619054fb88b63aaa4510c7ef2b58c84dbffec52
MATLAB
16,185
367
function lead_job_dmri(opt) % - Lead-DBS Job created on 16-Apr-2019 18:09:49 - % -------------------------------------- lead path; options = getoptslocal; options.lcm.seeds = opt'; ea_run('run', options); function options = getoptslocal options.endtolerance = 10; options.sprungwert = 4; options.refinesteps = 0; op...
280be1cf0d5e8f8dd002c33421d88121d8759f97023ef96fd506749286798d81
MATLAB
16,186
247
function block_results_FIR(stat_path,exp_folder,q_level,ground_truth) % ======================================================================== % Ruslan Masharipov, October, 2023 % email: ruslan.s.masharipov@gmail.com % ======================================================================== load([stat_path filesep ...
7374f1546f45de6ea8f23b0373d293d41fac17751d180ef8e0841fd6958691d3
MATLAB
16,194
446
% AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Math Lead & Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Provided by the Herzenberg Lab at Stanford University % License: BSD 3 clause % classdef SortT...
ca39ba9701ba4b4034cccc0e8574a90b6252fcb2992e206f8a1bbb9b24e6db97
MATLAB
16,197
421
% MATLAB code provided by Seyed Mohammad Ali Rahmati % Affiliation: Biomechanics and Motor Control Lab, Department of Biological Sciences, Georgia Institute of Technology, Atlanta, GA. % % Description: % This script calculates the biomechanical variables of a selected % musculotendon unit (MTU) during locomotion based...
284aaecefd98f71f870d3091a4f88e4b3429dab3308e044a379b7c6563c0dbbc
MATLAB
16,204
408
function varargout = colorCorrection_manual(varargin) % COLORCORRECTION_MANUAL MATLAB code for colorCorrection_manual.fig % COLORCORRECTION_MANUAL, by itself, creates a new COLORCORRECTION_MANUAL or raises the existing % singleton*. % % H = COLORCORRECTION_MANUAL returns the handle to a new COLORCORRECTI...
7f41e6061306c3fa998f69b82ec840bd7e76b304d641a47b1947040e834cb157
MATLAB
16,206
431
function [logDat ts] = ExtractBehavior(datDir, logFile, task) % flag active reward port (L = 1, R = 2) rwdPort = 2; altPort = 1; % load RHD info rhdFile = [datDir filesep 'info.rhd']; rhdInfo = ReadRhdInfo(rhdFile); %% Extract All Box File Timestamps % get recording duration info = dir([datDir,'/board-ADC-00.dat']...
e733d85ee44c105b748cacb1e6659ddc394e0a066db83b61bbd4306d1a13fead
MATLAB
16,229
376
% % AUTHORSHIP % Primary Developer: Stephen Meehan <swmeehan@stanford.edu> % Secondary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Jonathan Ebrahimian <jebrahimian@mail.smu.edu> % Provided by the Herzenberg Lab at Stanford University % License: BSD 3 clause classdef N...
70c9bf1c9f32aa7b417e1f010c5913aec1b8255c0f6761bf0d54af248f908cfa
MATLAB
16,242
370
% fMRI lead mapper (resting_state > first 100 subjects) %% function lead_job(opt) % - Lead-DBS Job created on 11-Apr-2019 15:49:11 - % -------------------------------------- lead path; options = getoptslocal; options.lcm.seeds = opt'; ea_run('run', options); function options = getoptslocal options.endtolerance = 1...
92f52111d36e7ec8b018501f988e2fec2706456be8614288a28cbfeca5694d06
MATLAB
16,249
344
function [] = plot_ground_truth_multitracks_event(folders,option,method) total_number(1:3) = 0; for nfolder = 1:length(folders) cd(folders{nfolder}) load decoded_replay_events [~,time_range]=sort_replay_events([],'wcorr'); for event = 1:length(decoded_replay_events(1).replay_events) ...
e7deb9a0649581adefa8dab8b4d2cf7480d66fc44cd5d365d2a177a64f17f22b
MATLAB
16,277
354
function x = ifdct_wrapping(C, is_real, M, N) % ifdct_wrapping.m - Inverse Fast Discrete Curvelet Transform via wedge wrapping - Version 1.0 % This is in fact the adjoint, also the pseudo-inverse % % Inputs % C Cell array containing curvelet coefficients (see % description in fdct_wrapping.m)...
74e852b9683733195906e60bd106459dca1fad75be3ad8cabce4c6107404b4c2
MATLAB
16,289
442
function obj = subsasgn(obj,subs,varargin) % Subscript assignment % See subsref for meaning of fields. %__________________________________________________________________________ % Copyright (C) 2005-2017 Wellcome Trust Centre for Neuroimaging % % $Id: subsasgn.m 7744 2019-12-03 12:38:47Z guillaume $ switch subs(1)....
2681013a7b11a966d8fbfd3cafbfd5042800a8ad153a7e828cc0fa2a319d1ea1
MATLAB
16,345
361
function [sourcemodel, cfg] = ft_prepare_leadfield(cfg, data) % FT_PREPARE_LEADFIELD computes the forward model for many dipole locations % on a regular 2D or 3D sourcemodel and stores it for efficient inverse modelling % % Use as % [sourcemodel] = ft_prepare_leadfield(cfg, data) % % It is necessary to input the dat...
ac352ff7eaa2c469280704073eacf63c86596df8044d27510e8a9e877d25ed38
MATLAB
16,353
310
function [R_i,R_amp,S_i,S_amp,T_i,T_amp,Q_i,Q_amp,buffer_plot] = SimpleRST(ecg,fs,gr) %% function [R_i,R_amp,S_i,S_amp,T_i,T_amp]=peakdetect(ecg,fs,view) %% =================== Online Adaptive QRS detector ==================== %% %% ========================== Description ============================= %% % QRS detection...
10f5817d2ddde524d2457824fe6d9befffc7b30e5b559a32093220cc410d03a4
MATLAB
16,366
308
%% This file produces and saves the data for all of the connectome data fitting results. %% Machine and simulation parameters delta = 8*1E-3; % pulse duration (s) gyroRatio = 267.522E6; % gyromagnetic ratio in units of rad/s/T G = [31, 68, 105, 142, 179, 216, 253, 290]' * 1E-3; % Gradient strengths in units of T/...
3ef032797b25ed8ecd0555e8299462877f71af22f37239e0616411fd862ba7d5
MATLAB
16,396
253
%% Creating dissimilarity matrices for each subject % Defining working directories all_subjects_files_dir = 'C:\Users\michaelpeer1\Google Drive\bar_mord_shared_files\Experiment_data\Graphml_files'; % Contains GraphML format files of subjects' social network, extracted using the LostCircles tool (https://lo...
bf7cd432b730ed609c3b8cd5bb38ee0dcdff08c7bd17b8557fb28ee9c9a9f231
MATLAB
16,397
552
%PMTKslow % Compare various joint density models on categorical (mostly binary) datsets % We visualize the learned structuers and evaluate loglik and % imputation error on test sets %% Data % labels is N*D, where labels(n,d) in {1..Nstates(d)} Nfolds = 1; % pcTrain and pcTest do not need to sum to one % This way,...
b0d8feb7a1ef568fa8fa21292517c7353fa5144d1b1877d34ffb7cced26e984d
MATLAB
16,398
439
function varargout = DPABI_ResultsOrganizer(varargin) % DPABI_ResultsOrganizer MATLAB code for DPABI_ResultsOrganizer.fig % DPABI_ResultsOrganizer, by itself, creates a new DPABI_ResultsOrganizer or raises the existing % singleton*. % % H = DPABI_ResultsOrganizer returns the handle to a new DPABI_Results...
4c0a6d343efce9bb6bd285a0dadaf877913fc0fe47a8a6fe9f59d898c3fb189f
MATLAB
16,416
480
load(fullfile(saveLoc, 'cosine_sim'), 'cosine_sim') load(fullfile(saveLoc, 'resCorr_wiTrial'), 'all_zrMean', 'resCorr'); load(fullfile(saveLoc, 'cosine_sim_randperm'), 'cosine_sim_randperm') % cosine_sim_randperm(sess, d1, d2, :) load(fullfile(saveLoc, 'resCorr_wiTrial_rand_gauss'), 'par_sess', 'filtW50b', 'rz_ses...
785966dc562bd7d18fde34be4478e9fe38cbb5891a4c82bde25e326307e7ae97
MATLAB
16,418
363
function fcp_4_beamforming_tmplGrid(paths) % FCP_4_BEAMFORMING carries out beamforming and source projection on % cleaned data. A T1 template head model is loaded in (normalizing across % particpants) to create a volume conduction model and subsequently, a % source model. Each participant's MRI data is then loaded in ...
8493b14c31b5ac3d96c50529f48292d49aadce659f03196e0b98ec379a4d029d
MATLAB
16,423
562
load trnDataSH_20180417T094303.mat; load trnDataSH_20180417T094303_IFinalReconciled.mat; %% Remove outliers, nan rows tLook = tGT; hFig = figure; axs = createsubplots(4,5); for i=1:20 axes(axs(i)); histogram(tLook.pLbl(:,i)); end %% idxOut = find(tFinalReconciled.pLbl(:,3)>1e3) idxNan = find(any(isnan(tFinalRecon...
bbc28ebb9a1b6aecec58e3fecc7240ac960505c9c12b6987e07cf001d1e11ca8
MATLAB
16,429
285
function P = boney_segment_preprocessing(P,out,ctpm,pmethod,bias,rerun) %boney_segment_preprocessing. Call SPM12 or CAT12 segmentation. % % P = boney_segment_preprocessing(P,out,method,bias,rerun) % % P .. updated structures of processed files % out(:).P .. other input files % ctpm .. TPM selector (1-...
2d1c40405b221626ff5280f59e6e12d01fae056cf3732b77ceb1a6b2d322adbf
MATLAB
16,444
374
function [ titleStr, settings, results ] = collapseSources( dataview, settings ) % This functions summarizes one or multiple datasources as a new 'collapsed' % datasource. It bins all datapoints according to a number of binning variables % and then computes summary statistics over all datapoints in ea...
58c21e8238271ca0dae90dbe2ccc59ff837b21d7f02f3eadf3282af61227c51f
MATLAB
16,444
466
classdef SuhWindow < handle properties(Constant) TESTING=false; end properties(SetAccess=private) handlingMoved=false; movedByBtnClick=false; followed; where; followers; %key is window, value is struct of follower dlg + where info figMap; alway...
8b77f940d12e051025868909fd596ff288e6539615bdaf36e1db7fcb31a219f9
MATLAB
16,444
394
function [dataout] = ft_eventtiminganalysis(cfg, data) % FT_EVENTTIMINGANALYSIS computes a model of single trial event- % related activity, by estimating per trial the latency (and % amplitude) of event-related signal components. % % Use as % [dataout] = ft_eventtiminganalysis(cfg, data) % where data is single-chann...
eac72b75cdf14ae98a69a51a8d16e17b1936348b0cfbe7dffa459cea74327351
MATLAB
16,446
292
%% 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...
0dd1b4eb28c71fffc9656177f47322589c50d23839488b813c4b95b8e5134ed4
MATLAB
16,470
345
function detector = acfTrain( varargin ) % Train aggregate channel features object detector. % % Train aggregate channel features (ACF) object detector as described in: % P. Dollár, R. Appel, S. Belongie and P. Perona % "Fast Feature Pyramids for Object Detection", PAMI 2014. % The ACF detector is fast (30 fps on a ...
cea7658be327a87adf68ffa408424ee7f6808482ad25929784cb83588a8dcdf7
MATLAB
16,481
471
function [x, y] = HistorySection(obj, action, varargin) GetSoloFunctionArgs(obj); switch action, % ------------------------------------------------------------------ % INIT % ------------------------------------------------------------------ %%% list all the way the rat can do wel...
784ca0b0144612b26944e6017298ab5ee91096dad8c5db749c50bb3114f02bb4
MATLAB
16,485
487
function [mri] = ft_read_mri(filename, varargin) % FT_READ_MRI reads anatomical and functional MRI data from different % file formats. The output data is structured in such a way that it is % comparable to a FieldTrip source reconstruction. % % Use as % [mri] = ft_read_mri(filename) % % Additional options should be ...
c3633dfcd3be910b5098b5e0c9ecee0c57ca3e90ec2c14221cc862fd3ca1008e
MATLAB
16,492
512
function [posterior,out] = VBA_MoG(y,K,options) % function [posterior,out] = VBA_MoG(y,K,options) % This function is a VB scheme for the MoG classifier. % IN: % - y : the pxn data matrix, where n is the number of 'observations' to be % classified, and p is the dimension of each of these observations % - K : the m...
35aea779e11a848c4f484c94d8ce3cd5cd2c8f80e199942c4b04f6d564d5bc15
MATLAB
16,499
369
function [posterior,out] = VBA_NLStateSpaceModel(y,u,f_fname,g_fname,dim,options,in) % [posterior,out] = VBA_NLStateSpaceModel(y,u,f_fname,g_fname,dim,options,in) % % This function inverts any nonlinear state-space model of the form: % y_t = g( x_t,u_t,phi ) + e_t % x_t = f( x_t-1,u_t,theta ) + f_t % using a variat...
14780612048d73936a8069dab14d107892d101525b9b8203252fda20c9d0687f
MATLAB
16,508
466
% IFMM Interpolative fast multipole method. % % This is an implementation of a kernel-independent fast multipole method % based on the interpolative decomposition for hierarchical low-rank % compression. The algorithmic framework is fully algebraic and supports % multiplication with both the matrix and its...
d1d344b4076937ed58c53b1f14a8bdc487fb2201a9360b9139ec074f2b74e189
MATLAB
16,526
220
function [remapping, remapping_raw] = rate_remapping_TRACK_PAIRS(folders,varargin) % Input: % folders is [] for individual session, or cell array of folders % varargin{1} is for methods, and can be 'spearman' or 'wcorr' % varargin{2} as save toggle - can be 1 (default) or 0 % Output: % remapping: diffe...
5688e579ea18eb57d091bb66c3be78495f83994cabdb584bfdfddebe075e76a0
MATLAB
16,534
537
%% INITIATE clear close all cc=[58 112 182; 97 168 125; 100 96 133]./255; structure={'GPi', 'GPe','STR'}; %% PAT INFO bfmdrs=[15; 8; 10; 5.5; 11.5; 4.5; 36.5; 22; 30; 6]; %62.5 cervical=[1 1 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1]; genseg=[0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0]; %% PSD STRUCTRE: pow close ...
50993e40e82e5a22222635a7e3f97adc1f3f7a94bd1954c869e7644137ed2d19
MATLAB
16,537
487
function [ EMGwhisk ] = GetWhiskFromEMG( basePath,varargin ) %[ EMGwhisk ] = GetWhiskFromEMG(basePath ) %This is a detector that extracts whisking/nonwhisking epochs from %implanted EMG in the whisker pad. Extracts also the EMG and EMG envelope. % %INPUT % basePath % Assumes presence of the following files: %...
04e5dc923dac739c025ba98edd4e114bf08d5a8287b6a330b7e2030d87f440cf
MATLAB
16,569
389
%% calculate pixel-wise correlations of roi crops data_stability = roi_correlations(data_stability,2,'stability'); %% plot settings set(groot,'DefaultAxesTickDir', 'out') set(groot,'DefaultAxesTickDirMode', 'manual'); set(groot,'DefaultAxesFontWeight', 'normal'); set(groot,'DefaultAxesFontName', 'Arial'); set(...
cff0aa38bdb11a02f6107c631c34c5562de7699ac1ace2a2b9774a1442b99675
MATLAB
16,575
423
function [data] = ft_channelrepair(cfg, data) % FT_CHANNELREPAIR repairs bad or missing channels in the data by replacing them with the % plain average of of all neighbours, by a weighted average of all neighbours, by an % interpolation based on a surface Laplacian, or by spherical spline interpolating (see % Perrin e...
f6d773b7f1782c584d19e4024a8d78b6291b0819d7fcc9d713725648915931e1
MATLAB
16,576
425
function [ titlestr, settings, results ] = linearRegression( dataview, settings ) % Regresses Coordinates onto Variable using leave-1-out CV or k-fold % CV. % % % %<PRE> % This file is part of dspace-core. % % Copyright (C) 2020 University Zurich, Sepp Kollmorgen % % Thi...
bc6e38ef9d1bcc2ed6d3f40b70bec6d7998503c31a2bd1a5e6688985a287cbce
MATLAB
16,608
421
classdef (Abstract) surfaceFitter < handle_light % Fit a surface to a point cloud % % This is an abstract class that needs to be implemented for % specific cases. For examples see the tpsFitter or spherelikeFitter %--------------------------------------------------------------------- ...
f55dc332e9ae5ae3020e504e36aae49b9cbfc13fab498d2e593b709e9c3d534f
MATLAB
16,626
457
classdef InfoTimelineModel < handle % A domain model to hold application state that just happens to correspond % (roughly) to what is shown in the two APT timeline axes. Normally the % Labeler object holds a reference to one of these in the infoTimelineModel % property. Note that this class does not define an...
ed46e653d28e8fe1378b511328e496a1d1cab775bd2a49dc8092361ca2e8077b
MATLAB
16,627
389
function varargout = w_GRFCorrection(varargin) % W_GRFCORRECTION MATLAB code for w_GRFCorrection.fig % W_GRFCORRECTION, by itself, creates a new W_GRFCORRECTION or raises the existing % singleton*. % % H = W_GRFCORRECTION returns the handle to a new W_GRFCORRECTION or the handle to % the existing si...
e13c58a31bde7aa610a5ba68d4fd690a44019a06d5e68c93e4395e21f2b41d79
MATLAB
16,646
408
function [x, cost, info, options] = conjugategradient(problem, x, options) % Conjugate gradient minimization algorithm for Manopt. % % function [x, cost, info, options] = conjugategradient(problem) % function [x, cost, info, options] = conjugategradient(problem, x0) % function [x, cost, info, options] = conjugateg...
81a628eed9f113d86b0b50dde93e9737e7cde93960f0690847e7bc7ad24e8824
MATLAB
16,662
326
function [ReHoBrain, Header] = y_reho(AllVolume, NVoxel, AMaskFilename, AResultFilename, IsNeedDetrend, Band, TR, TemporalMask, ScrubbingMethod, ScrubbingTiming, Header, CUTNUMBER) % Calculate regional homogeneity (i.e. ReHo) from the 3D EPI images. % FORMAT [ReHoBrain, Header] = y_reho(AllVolume, NVoxel, AMaskFi...
492dcc583b7591461f1a78b753bc2f24efed24e219f0bd548ee396ee722a7e40
MATLAB
16,669
444
function varargout = SurfSpace(varargin) % SURFSPACE MATLAB code for SurfSpace.fig % SURFSPACE, by itself, creates a new SURFSPACE or raises the existing % singleton*. % % H = SURFSPACE returns the handle to a new SURFSPACE or the handle to % the existing singleton*. % % SURFSPACE('CALLBACK',hO...
21883ec65827cf6e566770a1110e2e9ba84ec7156aabb9993340940fa95c4e3e
MATLAB
16,673
422
function [data] = ft_rejectvisual(cfg, data) % FT_REJECTVISUAL shows the preprocessed data in all channels and/or trials to % allow the user to make a visual selection of the data that should be % rejected. The data can be displayed in a "summary" mode, in which case % the variance (or another metric) in each channel ...
e931c9cf23e29c1faea5a7e91f91ec64a0c43ab08a0a409078c5f4b1f4241bfd
MATLAB
16,674
395
classdef RayRaster < handle properties ( SetAccess = private, Dependent ) interior_array(:,:,:) logical end methods function obj = RayRaster( X, Y, Z, mesh ) shape = [ numel( X ) numel( Y ) numel( Z ) ]; x_index_range = obj.compute_index_range( X, mesh( :, 1...
e791bf63e0068fdb7f720b07b14a9442fef1c70b71009acdc80df2a69978c2a2
MATLAB
16,684
431
% Class for probability binning described at % https://www.ncbi.nlm.nih.gov/pubmed/11598946 % % Bioinformatics inventors % Original: Roederer M1, Moore W, Treister A, Hardy RR, Herzenberg LA. % Incorporation into QF matching: % Darya Orlova <dyorlova@gmail.com>\ % Guenther Walther...
f713f21bf38ba71c6622a390adc99fcc9df71c45886c4fb662cb8c4c572e4f74
MATLAB
16,700
427
function runMMIVA % % Instructions to run this script: % % Set current folder to be the MISA folder, e.g.: % cd . % cd('~/MISA') % % Add the folder containing this file to the path, e.g.: % addpath('./scripts/tests') % % Clear all and RUN: % close all; clear all; clc % % run this script comps=30; P=0; addpath('/trdapps...
78ae627cf5325893979291a4f0709f8d6ac1783fff14ffd19804558a525866db
MATLAB
16,712
397
% pipeline_preprocessing_randomMotorizedTreadmill.m % Sarah West % 8/17/21 % This script allows you to run all steps of the preprocessing pipeline via % the "Run Section" feature of the Matlab Editor. Each step of the preprocessing % is called as a function. % Use "create_mice_all.m" before using this. % ** shoul...
4067244374988ce4620cf9615cab957618a75136884a73cb2e5bb16bd0eb8c83
MATLAB
16,727
603
clear srcinfo ns = 4000; srcinfo.sources = rand(3,ns); srcinfo.charges = rand(1,ns)+1i*rand(1,ns); nt = 3999; targ = rand(3,nt); eps = 1e-5; ntests = 36; ipass = zeros(ntests,1); errs = zeros(ntests,1); zk = complex(1.1); ntest = 10; stmp = srcinfo.sources(:,1:ntest); ttmp = targ(:,1:ntest); % Test sources to s...
79a9b6efe0a59d443615f553acacf7c93078a550f4759ca1b24d7e0aa227cdda
MATLAB
16,743
503
%% refrence and citation %%%%%%%%%%%This code is a modified version of the the available code in Zajkowski et al 2017 article %%%Zajkowski, Wojciech; Kossut, Malgorzata; Wilson, Robert, 2017, "A causal role for right frontopolar cortex in directed, but not random, exploration", https://doi.org/10.7910/DVN/CZT6E...