sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
ec33d6c3fcb07befdfe9cea0d75e000e4e81b14ad91c7220d1384d49298c505a
MATLAB
22,887
624
function [idx, C, sumD, D] = weightedkmeans(X, k, varargin) % similar to MATLAB's kmeans function, but takes weights if nargin < 2 error('stats:kmeans:TooFewInputs','At least two input arguments required.'); end if any(isnan(X(:))) warning('stats:kmeans:MissingDataRemoved','Removing rows of X with missing dat...
868c64ee02714a8e2b8b68417dc177073380a25a866bef1510d773c3d08f93b4
MATLAB
22,889
375
%% Data Decoder clear clc load Dataset list=fieldnames(Dataset); [indx,tf] = listdlg('PromptString',{'Select a Figure Panel:','',''},'ListString',list,'SelectionMode','single'); filename=list{indx, 1}; Data=Dataset.(filename).Data; formula=Dataset.(filename).Formula; distribution=Dataset.(filename).Distributio...
68fe44461ae9c9d4ee16634c3447ecc756ce92ef4a48acf78d9d43f60fa18e51
MATLAB
22,923
532
function runMMIVA_allHCSZ % % 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('...
fa5a4deb3df24cb2818ce5d1ae99ee838088f1e5132728c08f106a1e337f439a
MATLAB
22,936
657
function readsett = inifile(fileName,operation,keys,style) %readsett = INIFILE(fileName,operation,keys,style) % Creates, reads, or writes data from/to ini (ascii) file. % % - fileName: ini file name % - operation: can be one of the following: % 'new' (rewrites an existing or creates...
7a4c8bbb1bcb62d1adcb419a8770eeaa55b28d81dedff2f038964aa0b1678646
MATLAB
22,944
534
% pop_importepoch_lan() - Export epoch and/or epoch event information to the event % structure array of an EEG dataset. If the dataset is % the only input, a window pops up to ask for the relevant % parameter values. % Usage: % >> EEGOUT = pop_importepoch...
5fb5bd3cf9aa73e3f53e46d564517be760d58bf061b9fdca2729526319ac51c0
MATLAB
22,949
313
function [hdr] = read_ns_hdr(filename) % READ_NS_HDR read the header from a NeuroScan 3.x or 4.x AVG/EEG/CNT File % % [hdr] = read_ns_hdr(filename) % % The output data structure hdr has the fields: % hdr.label - electrode labels % hdr.nchan - number of channels % hdr.npnt - number of samplepoi...
a242a6258bf249e16754f25e6e8636b506151936d9b43da95b4bc835254e9789
MATLAB
23,005
638
function [mvardata] = ft_mvaranalysis(cfg, data) % FT_MVARANALYSIS performs multivariate autoregressive modeling on % time series data over multiple trials. % % Use as % [mvardata] = ft_mvaranalysis(cfg, data) % % The input data should be organised in a structure as obtained from % the FT_PREPROCESSING function. The...
c3454752123d190819328e93b4e5325b61e9e52c845a5d8f5eeabac192d899d5
MATLAB
23,005
638
function [mvardata] = ft_mvaranalysis(cfg, data) % FT_MVARANALYSIS performs multivariate autoregressive modeling on % time series data over multiple trials. % % Use as % [mvardata] = ft_mvaranalysis(cfg, data) % % The input data should be organised in a structure as obtained from % the FT_PREPROCESSING function. The...
f35733ade22be4c08c31b5be6327261b37596dd26b918667f13a3aa9a0b9e8cb
MATLAB
23,007
663
%-------------------------------------------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CBIG_MFMem_rfMRI_estimation_main.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This is the main execution script. The purpose of the skript is to use % given functional connectivity matrix (FC) and emprical funct...
3fe8b84a55355f2baf3834d7e442b9c3b3f9fb0bd915f3bf06f465caa4eb53bf
MATLAB
23,036
442
function [] = plot_ground_truth_across_sessions(folders,option,method) total_number{1}(1:3) = 0; total_number{2}(1:3) = 0; for nfolder = 1:length(folders) % Get total number of replay events for nshuffle = 1:2 % 1 is original and 2 is global remapped session_total_number{nshuffle}(nfolder,1:3) = 0; en...
ccfd57791e633ef4865bb7d3e76ee165bf318695db60c92cb75d9571752b42ed
MATLAB
23,051
318
function [hdr] = read_ns_hdr(filename) % READ_NS_HDR read the header from a NeuroScan 3.x or 4.x AVG/EEG/CNT File % % [hdr] = read_ns_hdr(filename) % % The output data structure hdr has the fields: % hdr.label - electrode labels % hdr.nchan - number of channels % hdr.npnt - number of samplepoi...
e1fe00d761abc88b5cf9cf162db34169e8de15a184092d8ecbbb7d2025cd6da8
MATLAB
23,052
663
%-------------------------------------------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CBIG_MFMem_rfMRI_estimation_main.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This is the main execution script. The purpose of the skript is to use % given functional connectivity matrix (FC) and emprical funct...
11f557894bd1e60e5948bd21a4a30c861ef2023a781f55cfc62b3e5285339a06
MATLAB
23,060
629
function [chansel, trlsel, cfg] = rejectvisual_summary(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; % ...
1b6696c4f5ce90398c140e28b8a9e5534644612deefdd689f92d7455b2253462
MATLAB
23,121
666
function CBIG_MFMem_rfMRI_estimation_main_ut(N_core,EstimationMaxStep,output_dir) %-------------------------------------------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CBIG_MFMem_rfMRI_estimation_main.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This is the main execution script. The purpose of ...
bb625ba2164b507fad815db946d52b6a747ecda59595921570bf2d93c2e813ee
MATLAB
23,152
605
classdef InfoTimelineController < handle % A sub-controller to manage the two timeline axes and their contents. % The things shown in here roughly reflect the model state represented in % labeler.infoTimelineModel, an InfoTimelineModel object. But the % correspondence is not exact. All changes to graphics han...
91137f6850bcbb235c0fcd780118bb5b8a5cab23cadf50178ccba1351387f802
MATLAB
23,204
632
function read_Intan_RHD2000_file % read_Intan_RHD2000_file % % Version 2.01, 11 October 2017 % % Reads Intan Technologies RHD2000 data file generated by evaluation board % GUI or Intan Recording Controller. Data are parsed and placed into % variables that appear in the base MATLAB workspace. Therefore, it is % recom...
8a80364344e1151d5b3c4241bf9ce0c465f7315ef176621f6f3787abae263a07
MATLAB
23,271
674
%-------------------------------------------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CBIG_MFMem_rfMRI_estimation_main.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This is the main execution script. The purpose of the skript is to use % given functional connectivity matrix (FC) and emprical funct...
1693534a530c78386f823cbea900d0f5bc9a77b7fcf3eb2c447653f3bfc1deea
MATLAB
23,279
540
function runMMIVA_allHCSZ_w_init % % 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=20; P=0; ad...
818747fc8156f1689b65b8c1a0c96498d2a541f96eb68b400f3e07ba43f6a38d
MATLAB
23,284
544
function [data] = ft_freqsimulation(cfg) % FT_FREQSIMULATION makes simulated data in FieldTrip format. The data is % built up from fifferent frequencies and can contain a signal in which the % different frequencies interact (i.e. cross-frequency coherent). Different % methods are possible to make data with special pro...
ed2662703d420f5644b6180539e042e24e97a36b1f459b4554964b2df55968d1
MATLAB
23,288
632
function TSplot(varargin) % Graphics helper function for TSapplystat. MUST BE CALLED BY TSAPPLYSTAT!! % Uses Matlab's plot function. Makes multiple plots (panels) per figure % and labels them with Subject, or Subject & Session, or Subject, Session & % Trial and/or Phase. Makes both line and scatter plots and allows mor...
2c51af69205b6d217bff143942ff5e140923dec8593cd8c13555162dcbe52415
MATLAB
23,297
737
%% this code block loads the network file from pytorch and transforms them for use with DAQ % it then loads mnist and forward propagates with this network for comparison purposes netfile = 'mnist_customsingleslm_230909211908.h5'; info = h5info(netfile); net0 = abs(h5read(netfile,['/' info.Datasets(1).Name])); ne...
9d7de48da0a1892a8599737cf26c95058966bc45069d39a171f3ddef6be0dc17
MATLAB
23,303
520
function [channel] = ft_channelselection(desired, datachannel, senstype) % FT_CHANNELSELECTION makes a selection of EEG and/or MEG channel labels. % This function translates the user-specified list of channels into channel % labels as they occur in the data. This channel selection procedure can be % used throughout Fi...
4d658c41a6e14bc4864e35f697478a8db55453d29ef510fe83c132f7a7d29e58
MATLAB
23,307
529
function [Pout,out] = boney_segment(job) %boney_segment. Extract bone measures based on SPM segmentation. % ... DETAILED DESCRIPTION ... % % Pout = boney_segment(job); % % job .. SPM job structure % .files .. SPM m-files % .opts .. structure of input values % .pmethod .. preprocessing method:...
468bc72bbd7c9f713e764e6ab5712154be7ef66a09b76f9dc1e16f4552bfc932
MATLAB
23,349
544
% RemoveArtifacts.m % Sarah West % 3/14/22 % Function that helps remove artifacts from images (intended for IC % artifacts). Is the first function I'm writing that's called with % RemoveArtifacts.m % Needs to use: % parameters.sources % parameters.indices_of_mask % parameters.reference_image function [parameters] = ...
5d15b6a4ba053c456ae70e5df9ac16a8577c21293c6794bdfeb36afb31278547
MATLAB
23,356
568
function [cfg] = ft_singleplotTFR(cfg, data) % FT_SINGLEPLOTTFR plots the time-frequency representation of power of a % single channel or the average over multiple channels. % % Use as % ft_singleplotTFR(cfg,data) % % The input freq structure should be a a time-frequency representation of % power or coherence that w...
0b47577654a3e26283b00b5750e3c032dee4105de21230d3ed5d69e8e857174f
MATLAB
23,362
755
% clear % clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); MuscleCluster = load('MuscleCluster.mat'); MuscleCluster = MuscleCluster.MuscleCluster; C1 = MuscleCluster{1}; C2 = MuscleCluster{2}; C3 = Musc...
d4189b3fc2aa3071f14836e9ce564a043f5ad8f18ad517e95598017ebf81bd33
MATLAB
23,373
638
function varargout = gui_place_sources_detectors(varargin) % GUI_PLACE_SOURCES_DETECTORS M-file for gui_place_sources_detectors.fig % GUI_PLACE_SOURCES_DETECTORS, by itself, creates a new GUI_PLACE_SOURCES_DETECTORS or raises the existing % singleton*. % % H = GUI_PLACE_SOURCES_DETECTORS returns the hand...
5e67227c1b9fab482aa8798a354cebca1f848282acd984aca87f7825387104ff
MATLAB
23,399
591
%loadcnt() - Load a Neuroscan continuous signal file. % % Usage: % >> cnt = loadcnt(file, varargin) % % Inputs: % filename - name of the file with extension % % Optional inputs: % 't1' - start at time t1, default 0 % 'sample1' - start at sample1, default 0, overrides t1 % 'lddur' - duration of s...
776b195674dc6311b7d448b7c9ca88e3cfe9744e280a1129ca0551786a2fd757
MATLAB
23,445
590
function [hfp,out] = VBA_ReDisplay(posterior,out,newFig,fromPause) % re-creates the graphical output of the VBA inversion + diagnostics % function [hfp] = VBA_ReDisplay(posterior,out,newFig) % VBA_ReDisplay first looks for a figure with a tag 'VBNLSS', i.e. a figure % that was already opened to review a model inversion...
da4a835b1f9bc915c2dd03b6a0bfbbf71e5859e2db1ce34062cabb6ea509174c
MATLAB
23,476
522
function [channel] = ft_channelselection(desired, datachannel, senstype) % FT_CHANNELSELECTION makes a selection of EEG and/or MEG channel labels. % This function translates the user-specified list of channels into channel % labels as they occur in the data. This channel selection procedure can be % used throughout Fi...
bfdd359e66730c42ef0860ac2a3a367b81523eb958ded4796c749edd81064600
MATLAB
23,492
746
classdef VideoTest % We have found movie-reading of some JRC vids to be fragile on Linux, % with results varying depending on i) order of frames read, ii) host % machine, and iii) matlab version. % % This class encapsulates a test whereby frames are read from a movie a) % sequentially, starting from the fi...
d125a866b5321a6620cccb59e7f76a80929e651c556090162aef2a26bc53278b
MATLAB
23,497
720
function varargout = NavPrefsNew(varargin) % NAVPREFS_EXPORT MATLAB code for NavPrefsNew.fig % NAVPREFS_EXPORT, by itself, creates a new NAVPREFS_EXPORT or raises the existing % singleton*. % % H = NAVPREFS_EXPORT returns the handle to a new NAVPREFS_EXPORT or the handle to % the existing singleton*...
54943d79242118953fe455746773231c3668b8fabbee68e9b3c0a22670aa7537
MATLAB
23,502
541
function runMMIVA_allHCSZ % % 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('...
045c1685fff5627409285a34b9dc2e00231be0dcff027ce8952160fcfcce5835
MATLAB
23,528
447
%%%%%%%%%%%%%%%%%%%%%%%%%%% Ö÷º¯Êý %%%%%%%%%%%%%%%%%%%%%%%%%% function varargout = XomicsEnrich(varargin) % TEST1 MATLAB code for XomicsEnrich.fig % TEST1, by itself, creates a new TEST1 or raises the existing % singleton*. % % H = TEST1 returns the handle to a new TEST1 or the handle to % the exist...
9d5f3a7fb3dfd871b53227d7c8be9d5c8f463285da7d557c8ffa2a71e1b66a21
MATLAB
23,595
611
%% Regression using parametric discriminative models in pmtk3 % % Many of the basic concepts of supervised learning, % and their pmtk3 implementation, % can be explained using linear regression as a model. % We can handle non-linear relationships % using basis function expansion, as we explain below. % We will d...
f68e6614a43ee314086415d41b5dbb0b31fd0ceae12f6f3730c17562b4d90997
MATLAB
23,646
708
%% I = IMain20180503; I = Igt; szmain = cellfun(@size,Igt,'uni',0); szmain = cellfun(@(x,y)cat(2,x,y),szmain(:,1),szmain(:,2),'uni',0); szmain = cat(1,szmain{:}); tfbigim = ismember(szmain(:,1),[1024 1024 1024 1024]); %% t = tMain20180503; lblCatC = categorical(t.lblCat); tlblCatC = sortedsummary(lblCatC) %% flyC = ...
64517ae0c0219aea7991317a4e2fca3aabd34bdaeb2cd3a6fb0325e1e2054270
MATLAB
23,668
675
function readsett = inifile(fileName,operation,keys,style) %readsett = INIFILE(fileName,operation,keys,style) % Creates, reads, or writes data from/to ini (ascii) file. % % - fileName: ini file name % - operation: can be one of the following: % 'new' (rewrites an existing or creates...
bf891b08a89fcd0ce32d0a12b5ed6409ca9bc3ea520413a50a2df8db827a3485
MATLAB
23,701
647
function [chansel, trlsel, cfg] = rejectvisual_summary(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...
8815a35455cb48de472a69f262ed79db1d181cbcac17e4c1cea5cdc435fff206
MATLAB
23,706
660
function varargout = DPARSF_NuisanceSetting(varargin) % DPARSF_NUISANCESETTING MATLAB code for DPARSF_NuisanceSetting.fig % DPARSF_NUISANCESETTING, by itself, creates a new DPARSF_NUISANCESETTING or raises the existing % singleton*. % % H = DPARSF_NUISANCESETTING returns the handle to a new DPARSF_NUISAN...
f739fa949a74decf1bab8bdc5b8d3d90ca527c191b62f3fe70795b1e57245702
MATLAB
23,738
639
classdef ShellCommand < apt.ShellToken % apt.ShellCommand - Type-safe shell command composition with automatic path translation % % This class represents shell commands as structured lists of tokens rather than % plain strings, enabling automatic translation of paths and arguments when % commands need to exec...
9a9d29a196e7063f20dce060186ed13b396bd91787aa7878eb6500ffd18727fb
MATLAB
23,750
606
classdef Stack < handle_light %stackHolder Raw data and metadata, transform after ROI and axis selection %--------------------------------------------------------------------- % license %--------------------------------------------------------------------- % Copyright 2015 Idse Heemskerk an...
72ad770da2110ce45496510bf3e7c5f61caedee1ce21836bf67feeb0504d1309
MATLAB
23,811
640
classdef ColorsByName <handle % 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:...
b36c4291ccf0d018663acae44e1bc691471873d7c5185000d71f07806c6b2e00
MATLAB
23,819
370
function [ImageArrayDemonReg_AllImages,demonDispFields]=Stream_Block_Demon_Reg(RunParallel,myPool,StackSaveName,ImageArrayDFTReg_AllImages,... ReferenceImage_Padded_Masked_Filtered_Enhanced,... AllBoutonsRegion_Orig_Padded,AllBoutonsRegion_Orig_Mask_Padded,BorderLine_Orig,Crop_Props,... Imagi...
f7a7a4a892fd3a731a99ebfe2fcdce28de408baba1d37cf2fd7f5a9085e1cdd4
MATLAB
23,878
554
function runMMIVA_allHCSZ_w_init % % 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=20; P=0; ad...
bec580c2d005356a3260fae36ce29dbbc1a5d3ad3df5ded4e1336b04f90bae55
MATLAB
23,912
603
% 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 Radio...
602a03106ed3aacc3b1c6319a00baff9272ed57793c3cc47ea42eeb77c730503
MATLAB
23,915
611
% 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 SuhDa...
aa4c39a4e1486651a038c16d58f98d0ef3e336d9553f942328d63e6e49e2cb0c
MATLAB
23,954
498
function [stat, cfg] = ft_statistics_montecarlo(cfg, dat, design, varargin) % FT_STATISTICS_MONTECARLO performs a nonparametric statistical test by calculating % Monte-Carlo estimates of the significance probabilities and/or critical values % from the permutation distribution. This function should not be called % dire...
6304ebdc1643c5d182f21841e9bfa726474952345ab8f84265a39a0d91d5b987
MATLAB
23,982
621
function [D,A] = meg_peakAnalysis(D4,nChOI,groupC,expt,user) % finds max amp and max idx per target per condition per subject % averages and plots % April 2020 % D4 = data structure, fields = slice conditions % D4.cue (trial x channels x session) % groupC(iSession) structure % groupC.channelsRanked % groupC....
13a1febbf138ae7d6782c1279b16778550c50972dc6f88294ae37ca46fb70f7e
MATLAB
23,987
498
function [stat, cfg] = ft_statistics_montecarlo(cfg, dat, design, varargin) % FT_STATISTICS_MONTECARLO performs a nonparametric statistical test by calculating % Monte-Carlo estimates of the significance probabilities and/or critical values % from the permutation distribution. This function should not be called % dire...
8435dc2780b6936c64f73fefea06f16766d8e6ef6ae783e4bff7f26e8b6b644c
MATLAB
24,044
599
function [lf] = ft_compute_leadfield(dippos, sens, headmodel, varargin) % FT_COMPUTE_LEADFIELD computes a forward solution for a dipole in a a volume % conductor model. The forward solution is expressed as the leadfield % matrix (Nchan*3), where each column corresponds with the potential or field % distributions on al...
f94a4bdc841814db51ac460fac4f5b9c12b7199687b01d2eddc93d0a4825e39c
MATLAB
24,048
536
function [response, timing, quitProg] = showScanStimulus(display,... stimulus, t0, timeFromT0) % [response, timing, quitProg] = showStimulus(display,stimulus, ... % [time0 = GetSecs], [timeFromT0 = true]) % % Inputs % display: vistaisp display structure % stimulus: vistadisp stimulus struc...
94b809f9ff4f6f82c259a52090d880be14bbea31d7741c8be0cb3f4aa3e355dc
MATLAB
24,099
502
function [sens] = ft_datatype_sens(sens, varargin) % FT_DATATYPE_SENS describes the FieldTrip structure that represents an EEG, ECoG, or % MEG sensor array. This structure is commonly called "elec" for EEG, "grad" for MEG, % "opto" for NIRS, or general "sens" for either one. % % For all sensor types a distinction shou...
89132fdf99ac75501ec9b89d965aecf29dd580e199ec339a00927ffb47f02fc2
MATLAB
24,155
503
function [sens] = ft_datatype_sens(sens, varargin) % FT_DATATYPE_SENS describes the FieldTrip structure that represents an EEG, ECoG, or % MEG sensor array. This structure is commonly called "elec" for EEG, "grad" for MEG, % "opto" for NIRS, or general "sens" for either one. % % For all sensor types a distinction shou...
0034d553faa5398c3f0739eb06329354130ca1dbb62e001f7aff09b1fdeee5de
MATLAB
24,171
654
% Address the basic question, when x is the salient category, what % percentage of units are tuned to x. function SlidingTimeDPrimeSplitEffectors(config,varargin) [varargin,DateName] = Utilities.ProcVarargin(varargin,'DateName',[]); [varargin,Pmethod] = Utilities.ProcVarargin(varargin,'Pmethod','fdr'); [...
8d90ef585eb6c12d9c9ad2347b3884317580c54dd909a8287cea430c3ac92485
MATLAB
24,221
655
%% GAMMA: Correlation/covariance as a function of distance % calculate centroids first mkdir([DIRresultsRipple, '/corr/']); corr_data = Low60GammaData(good_chan,(task_data(1,3)-500):(task_data(end,3)+500)); for z=1:num_groups map_of_indexes = map_indexes_1s(:,:,z)'; % calculate centroids [cols rows] =...
7e191f60c6a4fba8abb2ac4ef6320c65b6ef90198e4715dfd735f3e51c040c94
MATLAB
24,222
608
function varargout = h_groupControlGUI3(varargin) % H_GROUPCONTROLGUI3 M-file for h_groupControlGUI3.fig % H_GROUPCONTROLGUI3, by itself, creates a new H_GROUPCONTROLGUI3 or raises the existing % singleton*. % % H = H_GROUPCONTROLGUI3 returns the handle to a new H_GROUPCONTROLGUI3 or the handle to ...
2b58677359f8eb070369f7b1add2f1154c21affd9d88d403238a734518d3c978
MATLAB
24,226
612
function astro_geometry % 2023-06-16 % Takes in the excel and matlab data and spits out a 3D % image % The function loads the data set (if not found), find the radii % corresponding to the position indices, forms the branch information by % comparing the excel and matlab datas, and forms the 3D image. The ...
32fbe7d237ed6d098e5b5f40f910af62f6345ec5dee52ac26c7ea6470eb142ed
MATLAB
24,240
636
function [amplifier_channels, notes, aux_input_channels, spike_triggers,... board_dig_in_channels, supply_voltage_channels, frequency_parameters,board_adc_channels ]... = read_Intan_RHD2000_file_snlab(data_path) % read_Intan_RHD2000_file_bz % % Version 2.01, 11 October 2017 % % Reads Intan Technologie...
08418502434c0dcbafd550d11f00a0e65fbe0b5a90ea60599f0dc70cded946b2
MATLAB
24,263
599
function [lf] = ft_compute_leadfield(dippos, sens, headmodel, varargin) % FT_COMPUTE_LEADFIELD computes a forward solution for a dipole in a a volume % conductor model. The forward solution is expressed as the leadfield % matrix (Nchan*3), where each column corresponds with the potential or field % distributions on al...
2902f20ef819049863a8f46b877301b4a6951b17b704d45393d85fafe03c4ad2
MATLAB
24,287
823
function [samples, stats, structArray] = matbugs(dataStruct, bugsModel, varargin) % MATBUGS a Matlab interface for WinBugs, similar to R2WinBUGS % [samples, stats] = matbugs(dataStruct, bugsModelFileName, ...) % % This generates a file called 'script.txt' in the directory where % winbugs14.exe is kept (so you must hav...
172225d335257f5852772159c7e3fa56b009c355ad4ee25756c7525986d565b3
MATLAB
24,333
655
% Address the basic question, when x is the salient category, what % percentage of units are tuned to x. function SlidingTimeDPrimeSplitEffectorsStatic(config,varargin) [varargin,DateName] = Utilities.ProcVarargin(varargin,'DateName',[]); [varargin,Pmethod] = Utilities.ProcVarargin(varargin,'Pmethod','fdr...
58ddf1a6a874475c0d1d5e800c83a868edef58733892ef19aa9f0a6e202567ee
MATLAB
24,353
581
function c = multiprod(a, b, idA, idB) %MULTIPROD Multiplying 1-D or 2-D subarrays contained in two N-D arrays. % C = MULTIPROD(A,B) is equivalent to C = MULTIPROD(A,B,[1 2],[1 2]) % C = MULTIPROD(A,B,[D1 D2]) is eq. to C = MULTIPROD(A,B,[D1 D2],[D1 D2]) % C = MULTIPROD(A,B,D1) is equival. to C = MULTIPROD(A,B,...
4d82a1af94f439c70fbc4155ce555cc53fd37fede681013611c7d2d3cf8982a3
MATLAB
24,374
728
function dimord = getdimord(data, field, varargin) % GETDIMORD determine the dimensions and order of a data field in a FieldTrip % structure. % % Use as % dimord = getdimord(data, field) % % See also GETDIMSIZ, GETDATFIELD, FIXDIMORD % Copyright (C) 2014-2019, Robert Oostenveld % % This file is part of FieldTrip, s...
172a6f64cf7709a5b3b696f68b0877d5938dbf8f7f852e422a48262252b7e9b2
MATLAB
24,460
710
function [SpikeLFPCoupling] = bz_GenSpikeLFPCoupling(spikes,LFP,varargin) % SpikeLFPCoupling = GenSpikeLFPCoupling(spikes,LFP) % %INPUT % spikes structure with fields (from bz_getSpikes) % .times % -or- % {Ncells} cell array of spiketimes ...
4578973374883c714f32d3f13f5006279c4538b4f8cb93e357c0cc28a08c7b3e
MATLAB
24,499
675
function json=savejson(rootname,obj,varargin) %f % json=savejson(rootname,obj,filename) % or % json=savejson(rootname,obj,opt) % json=savejson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a JSON (JavaScript % Object Notation) string % % author: Qianqian F...
5e57f4e8a7dea18c91a41f862ccccb54f0d5d6c56b7c85f270e2f7d9ccdfbbef
MATLAB
24,528
275
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Server/Client Parameters (NOTE! this must match the server parameters) [OS,dc,ClentCompName,MatlabVersion,MatlabVersionYear,ScreenSize]=WhereAmIRunning(1); [ServerIP,Serve...
552a839ef3571542b9d2d35fd943d8309be4d15cc1725e4ac1b9f1a71c4b0836
MATLAB
24,529
752
function varargout = showufmf(varargin) % showufmf % % Opens a GUI to show UFMF-compressed video % Optional inputs: % % UFMFName: Name of input video. % % % Edit the above text to modify the response to help showufmf % Last Modified by GUIDE v2.5 18-Jul-2014 11:42:42 % Begin initialization code - DO NOT EDIT gui_Si...
21a6e2aecd333696d77cd25f98f848cd268698f72ee62ddbe2694eef1c8bc0f3
MATLAB
24,540
813
clear clc % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); %% Motion Data MotionData = MotionData.MotionData; % Joint Angles SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180); ELBa = MotionData.Ge...
0819e480ac45cf1445aff3511b5bdd567ea3f6916326bac16fba825e8c2b4805
MATLAB
24,580
500
clear; clc; %% do_save_fig= 1; nSProws= 2; nSPcols= 3; sp_ax= get_axes(5, nSProws, nSPcols); delay_ms= 5; window_Hz= 12; Root_dAM_power_dir= ['D:\Dropbox\Pitts_files\Aravind_ExpAM\___manuscript\dAM_power_data\' sprintf('%.0fms_%.0fHz', delay_ms, window_Hz) filesep]; %% [human_dAM_data, human_SAM_data, lin_mdl_hu...
741306192118d8f2ea45440f469bcf8da222db4f7dfa5ba6aaf3162dc72b2ed6
MATLAB
24,589
596
function see_replay_update(input) global time global replay_index global data global FIG global GUI_handle global parameters global tagged_replay global new_index %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if strcmp(input,'load') %load data parameters = list_of_parameters; GUI_handle = gcbf; FIG = figure; tagg...
4d030ac3e0b3af09be8ecf2199bc5a395c18ecb6a6d14a8e04da3e68ca42611e
MATLAB
24,641
598
function varargout = jbm_synapseScoringGUI3(varargin) % JBM_SYNAPSESCORINGGUI3 M-file for jbm_synapseScoringGUI3.fig % JBM_SYNAPSESCORINGGUI3, by itself, creates a new JBM_SYNAPSESCORINGGUI3 or raises the existing % singleton*. % % H = JBM_SYNAPSESCORINGGUI3 returns the handle to a new JBM_SYNAPSESC...
f1b1cecef5b6a2b07b9548c913cd435e5cb4d772b93deb9f681409a1368f2330
MATLAB
24,645
578
function [cfg] = ft_singleplotTFR(cfg, data) % FT_SINGLEPLOTTFR plots the time-frequency representation of power of a % single channel or the average over multiple channels. % % Use as % ft_singleplotTFR(cfg,data) % % The input freq structure should be a a time-frequency representation of % power or coherence that w...
73c443561ff6d5f57e94df656f81e275afd9deadb7bb01944694c9dd0193b288
MATLAB
24,647
470
function [dat, label, time, cfg] = preproc(dat, label, time, cfg, begpadding, endpadding) % PREPROC applies various preprocessing steps on a piece of EEG/MEG data % that already has been read from a data file. % % This function can serve as a subfunction for all FieldTrip modules that % want to preprocess the data, su...
c663466d3ed6fd85a38d07d5d6891c98893e73b4ddf56b224d16a1cef42d5f67
MATLAB
24,647
470
function [dat, label, time, cfg] = preproc(dat, label, time, cfg, begpadding, endpadding) % PREPROC applies various preprocessing steps on a piece of EEG/MEG data % that already has been read from a data file. % % This function can serve as a subfunction for all FieldTrip modules that % want to preprocess the data, su...
135f6592a3313b3d22a9420528255e1a3966b05d6990dc6732b630df090c2b42
MATLAB
24,728
676
function ft_write_data(filename, dat, varargin) % FT_WRITE_DATA exports electrophysiological data such as EEG to a file. % % Use as % ft_write_data(filename, dat, ...) % % The specified filename can contain the filename extension. If it has no filename % extension not, it will be added automatically. % % Additional...
85e321826f0eca483bd94e85e948b457036df4c49825baf2b383abf5273f8553
MATLAB
24,732
583
function Swarm(x, y, varargin) % Updated SymphonicBeeSwarm % Produces a distribution of points akin to a beeswarm, violin, or box and whisker % Swarm(x, y, varargin) % Only supports a single group at a time as this reduces ambiguity in matrix dimensions. % First check x & y for validity if isnumeric(x) && all(size(x) ...
67699c56bed1e0d9bab9512cc46611a3e11e83f29e74dbd0408ebb9a58f9b336
MATLAB
24,774
535
function op = calculateEventSpikingSequences(analysisParam, modelParam, paramResultsStruct, paramPFresultsStruct, spikeTimeCell, varargin) % op = grid.calculateEventSpikingSequences(analysisParam, modelParam, resultsStruct, PFresultsStruct, spikeTimeCell) % % Runs the analysis across networks at the specified parameter...
90ba5ad68b568c1331687c040bbd751ea919dfa2439793d328cbb9086696870e
MATLAB
24,781
841
%% paths addpath /groups/branson/home/bransonk/behavioranalysis/code/Jdetect/Jdetect/misc; addpath /groups/branson/home/bransonk/behavioranalysis/code/Jdetect/Jdetect/filehandling; addpath(genpath('..')); datatype = 'roian'; switch datatype, case 'stephen' rootdatadir = '/groups/branson/bransonlab/mayank/step...
e0bda35c03b8e3f060d1cb773850472517327d9998f4524b5fbe722a1c6c1556
MATLAB
24,794
503
function plot_ground_truth_cell_id_shuffle_validation(folders,option,method) total_number{1}(1:3) = 0; total_number{2}(1:3) = 0; for nfolder = 1:length(folders) % Get total number of replay events for nshuffle = 1:2 % 1 is original and 2 is global remapped session_total_number{nshuffle}(nfolder,1:3) = 0; ...
63336d9ce91b44bb6d0abd227ad02b3fcb92dd23100f8906662e3d1c0060c9d3
MATLAB
24,865
583
function c = multiprod(a, b, idA, idB) % Multiplying 1-D or 2-D subarrays contained in two N-D arrays. % % C = MULTIPROD(A,B) is equivalent to C = MULTIPROD(A,B,[1 2],[1 2]) % C = MULTIPROD(A,B,[D1 D2]) is eq. to C = MULTIPROD(A,B,[D1 D2],[D1 D2]) % C = MULTIPROD(A,B,D1) is equival. to C = MULTIPROD(A,B,D1...
db14827ed15413a4c76cbe80e0d4ea002489bb2745a6e8cda785ab997485a0c4
MATLAB
24,880
719
function [cfg, M] = ft_sourcemovie(cfg, source, source2) % FT_SOURCEMOVIE displays the source reconstruction on a cortical mesh % and allows the user to scroll through time with a movie. % % Use as % ft_sourcemovie(cfg, source) % where the input source data is obtained from FT_SOURCEANALYSIS, or a % a parcellated ...
f9442c50431228b045d05fe2e657784da7bb4f6888605ee5c8ec8a790a171af8
MATLAB
24,905
947
%% Task data preparation % 6 prefrontal channels that were significantly activated during the Test % phase (Ch 30, Ch 34, Ch 35, Ch 38, Ch 39, Ch 43, termed seed channels from here onwards) clear all clc load incongruent_allsub_2probe_final.mat load congruent_allsub_2probe_final.mat % for congruent condition N_sub = l...
5505bf3246e03ea3d54cf4ceaea8425767f59798880ab471db4ceb187786d0c1
MATLAB
24,924
618
classdef ComponentPatch < diffgeometry.Map % Multi-component object that can be contracted as a tensor % (and therefore raised and lowered) % but includes non-tensors like Jacobian and connection. % TODO: save time + memory by storing and using index permutation symmetries %--------------...
4fe8fcb15229a53edf78083f0d8f97efce666c1cef674df7c9e399caa25b38b5
MATLAB
24,951
619
function [cfg] = ft_singleplotER(cfg, varargin) % FT_SINGLEPLOTER plots the event-related fields or potentials of a single % channel or the average over multiple channels. Multiple datasets can be % overlayed. % % Use as % ft_singleplotER(cfg, data) % or % ft_singleplotER(cfg, data1, data2, ..., datan) % % The dat...
a0e99236008f348d148e56598aabf5c4978bd5765fbc0911374474d70d36fb1b
MATLAB
24,962
536
% RunAnalysis.m % Sarah West % 3/11/21 % A function that abstracts & generalizes all for loops, loading, % calculations, and saving for analysis done by the Ebner lab. Information % and parameters need to be formatted properly into the "parameters" % structure. % Functions are given as a cell array of function handl...
c4507efb80bb176d298ea4e9959324a754eceb46547b5f4f78e6e597a2314d11
MATLAB
24,972
645
% 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 UMAP...
989fe6bf23677ad62670269d584084bee85e29079b308ba35e5ceac892f8b207
MATLAB
25,014
650
function Params = CBIG_MSHBM_estimate_group_priors(project_dir,mesh,num_sub,num_sess,num_clusters,max_iter) % Params = CBIG_MSHBM_generate_individual_parcellation_FS(project_dir,mesh,sub,sess,num_clusters,max_iter) % % This script will estimate group priors for individual-level parcellation % generation. The estimated...
8920b3d024e95e71288f81666a53252de723e3154aecce97331e4d8a7104f9cb
MATLAB
25,119
725
classdef (Abstract) LabelTracker < handle % Tracker base class % LabelTracker has two responsibilities: % 1. Take a bunch of images+labels and learn a classifier to % predict/track labels on new images. % 2. Store the predictions generated in 1, as well as any related % tracking diagnostics % %...
86b363015ded2d2950a52e80fb5619ad03f647c1cfd16efade3e4d731cc05f44
MATLAB
25,151
585
classdef spherelikeFitter < surfaceFitting.surfaceFitter %spherelikeFitter Fit spherelike point cloud using polynomials %--------------------------------------------------------------------- % license %--------------------------------------------------------------------- % Copyright 2015 Idse ...
67c281ba26388e7cfb6eb9ff1749d27b8be21d65033de67c02bd0bd062e6f83e
MATLAB
25,183
572
classdef cylinderMeshWrapper < surfaceFitting.meshWrapper % Generate a SurfaceOfInterest object with atlas containing cylinder % charts from an externally produced triangular mesh representation of % a surface. This is not possible for all surfaces. %-------------------------------------------...
7ba0c015b19ce393f533605711d135bd56ef28d49f826aa571c6eedfd1b607c1
MATLAB
25,219
670
function [input] = ft_apply_montage(input, montage, varargin) % FT_APPLY_MONTAGE changes the montage (i.e. linear combination) of a set of % electrode or gradiometer channels. A montage can be used for EEG rereferencing, MEG % synthetic gradients, MEG planar gradients or unmixing using ICA. This function not % only ap...
740dc8fd4d1026b9dc1d00c90cce6b1678bd47714a1d1e16247d0d91b0392f2b
MATLAB
25,248
639
function [D,A] = meg_peakAnalysis(D4,nChOI,groupC,expt,user,slice) % function [D,A] = meg_peakAnalysis(D4,nChOI,groupC,expt,user,slice) % Finds peak amplitudes and timings of targets evoked response by condition % averages channels (nChOI) > per condition per subject % averages and plots % April 2020 % D4 = data st...
ad01c153695f0048a4263cdd446618f2438dcf5ece8fc5d13fdacef6522b2bf6
MATLAB
25,273
570
% pipeline_DFF_means.m % Sarah West % 11/29/22 %% Initial Setup % Put all needed paramters in a structure called "parameters", which you % can then easily feed into your functions. clear all; % Create the experiment name. parameters.experiment_name = 'Random Motorized Treadmill'; % Input directory name base par...
3544a58a1de6d8b3907ad58aa8fbe2e7aed13aa6dd463b5422100a19be926553
MATLAB
25,282
770
% mediation_zeta_control load(fullfile(saveLoc, 'sig_allSessions'),... 'sigSL') S = sigSL; % Analysis parameters max_coh = 0.1; minRT = 0.67; maxRT = 2; start_t = 0.39; end_t = 0.5; session = S.session; times = S.t; dt = times(2) - times(1); choice = S.choice; RT = S.rt; coh = S.sig_coh; str =...
a9822c3e270731e6c30d9a461f2990a58ada649b31ab0f7a18f3137583ee213a
MATLAB
25,354
441
function PARAMS = initializeSession( subjectName, subjectID, deviceName ) % (c) Coraline Rinn Iordan 10/2017, 02/2018, 03/2018, 04/2018, 06/2018 if nargin < 2, error( 'Must provide subject name and ID.' ); end if nargin < 3, deviceName = 'SKYRA.CurrentDesign'; end initStartTime = GetSecs; %%%%%%%%%%%%% %%% SETUP %%...
307c6f54d2a929ab318cc3375deadb5841ba1041fe549c3356ffd0e2a036bc87
MATLAB
25,374
542
function [] = plot_ground_truth_compare_jump_distance_backup_15_06(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).re...
67c1ba101ff09dd071393c50ff4ea610a74dcb984481603b8627757ba4fd99fe
MATLAB
25,378
912
% Cardiac model ToR-ORd-Land for acute and chronic myocardial infarction % Copyright (C) 2024 Xin Zhou. Contact: xin.zhou.joy@hotmail.com % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Softwar...
fd1ff624c286b0e146719af3a7b2a48015edeb874b42ecda1208f9bdd47ed3b8
MATLAB
25,473
714
%% ============== Model-free analysis ===================== %% %% refrence and citation %%%%Project name : A casual role of right dorsolateral prefrontal cortex in %%%%random exploration %%%%%%%%%%% This code were modified version of the the available code in Zajkowski et al 2017 article %%%Zajkowski, Wojcie...
0f8246356578e25aeb63b9e4ea705f401721457556a2ce31ec84b4e58722af20
MATLAB
25,537
718
% miro :: Measured Impulse Response Object % % miro Class Definition % % 2012 by Benjamin Bernschütz (bBrn) % Cologne University of Applied Sciences % Institute of Communication Systems % mail benjamin.bernschuetz@fh-koeln.de % GSM +49 171 4176069 % Phone +49 221 8275 2496 % % ...
d2f4dc3e07bf153070a7ffc32a0acc0008a5e379dbf178a3ec366d9920ee5d4d
MATLAB
25,560
690
classdef vplayer < matlab.mixin.SetGet %VPLAYER Image video/stack player class. % Usage: % vplayer(S) % % See also: imstacksc properties (SetAccess = immutable) numFrames, numChannels, frameSize end properties S % stack matField % variable name of stack i...