sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
d1a61030f0e52525a73c024903ec2e8298b02d343e3239e5eda28033bb5ee139
MATLAB
19,259
445
%{ 1.Put all the files in the same folder 2. run this script This script is designed to work with binary files generated by Bonsai`s MatrixWriter node(sink/dsp) !!!!! IMPORTANT!!!!! filename has a certain structure to it, and the code is using the filename to assign conditions to different channels for exampl...
0ad63098c699569774d078ecc8c4282aa3ef3915856c3883af738a58ea184c05
MATLAB
19,266
536
function varargout = DPABI_QC_Surf(varargin) % DPABI_QC_Surf MATLAB code for DPABI_QC_Surf.fig % DPABI_QC_Surf, by itself, creates a new DPABI_QC_Surf or raises the existing % singleton*. % % H = DPABI_QC_Surf returns the handle to a new DPABI_QC_Surf or the handle to % the existing singleton*...
6ce6de7f77a002d8ba09c9486b792cbd2960ad52aabf9b8f670533aad3e12c08
MATLAB
19,266
577
function [parcel] = ft_sourceparcellate(cfg, source, parcellation) % FT_SOURCEPARCELLATE combines the source-reconstruction parameters over the parcels, for % example by averaging all the values in the anatomically or functionally labeled parcel. % % Use as % output = ft_sourceparcellate(cfg, source, parcellation) ...
af5d6b6a00034cace53a94304d8d6733d44b3e34aeda8fa85a4916873c448e0d
MATLAB
19,275
496
function [type] = ft_senstype(input, desired) % FT_SENSTYPE determines the type of acquisition device by looking at the channel % names and comparing them with predefined lists. % % Use as % [type] = ft_senstype(sens) % or % [flag] = ft_senstype(sens, desired) % % The output type can be any of the following % 'c...
02dd2105265a25a68d12bf3fb8aead116197fdf3597a8e6f45ca23fd8168446e
MATLAB
19,289
509
function CrossDecodeAnalysisImproved(AllTrialData,Labels,DecodeLabels,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...
252ee4e9629d21caee1b68e50de2e22b5ea472f71a279b7b19864dfbfec15b8e
MATLAB
19,311
516
% Address the basic question, when x is the salient category, what % percentage of units are tuned to x. function SlidingTimeDPrimeMotorVersionStatic(config,varargin) [varargin,DateName] = Utilities.ProcVarargin(varargin,'DateName',[]); [varargin,Pmethod] = Utilities.ProcVarargin(varargin,'Pmethod','fdr')...
9bb9f419526444e98a6207f41bacc40a94d21e2b78014a98fd2a97cb045caba3
MATLAB
19,313
653
% clear % clc MuscleMomentArmOW_time = []; MuscleMomentArmWI_time = []; % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); MuscleCluster = load('MuscleCluster.mat'); MuscleCluster = MuscleCluster.MuscleCluste...
a9c27248ca056996c2474042443e35538388ce3297e406e4d2f2585ccec3ed4f
MATLAB
19,322
467
function [data] = ft_megrealign(cfg, data) % FT_MEGREALIGN interpolates MEG data towards standard gradiometer locations by % projecting the individual timelocked data towards a coarse source reconstructed % representation and computing the magnetic field on the standard gradiometer % locations. % % Use as % [interp]...
8e38bcab8b310309a5f1b41adaafa8ac957aa7ec189f8a3eddcee90af2680ff0
MATLAB
19,323
652
% clear % clc MuscleMomentArmOW_time = []; MuscleMomentArmWI_time = []; % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); MuscleCluster = load('MuscleCluster.mat'); MuscleCluster = MuscleCluster.MuscleCluste...
21c35b5081418da1b173f1bf5f8346a20712756c5685870a7d9e844670cb0602
MATLAB
19,334
414
function [optimalDV, optimalFD, optimalPCT, minMSE] = mCotWrapper(workingDir, varargin) %UNTITLED Summary of this function goes here % Detailed explanation goes here %mseParameterSweep needs: % numRunsDataNeededPerSubject,minSecDataNeededPerSubject,minNumContiguousDataSeconds numPreprocWorkers = 4...
209a8e91c1eca77df3e9b55f97f1e099f151d2b5ce0b952f7aadf66c300e9de9
MATLAB
19,349
652
% clear % clc MuscleMomentArmOW_time = []; MuscleMomentArmWI_time = []; % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); MuscleCluster = load('MuscleCluster.mat'); MuscleCluster = MuscleCluster.MuscleCluste...
8d889d0b97c81421434a1ff2f25ee097fc474787020e2955952dace39f228cfd
MATLAB
19,395
558
% 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 SortG...
d502f6ceeaae7825dcb91f0241a4325da4dce672b88c60cb974530a9a836567f
MATLAB
19,399
391
function perform_encoding_analysis(p) % % - This code is written for performing whole brain encoding analysis from specified features. % - Whole brain data was parsed into "nparse" groups for parallel computations. % - A whole brain analysis for one subject and for one feature type takes about 2-3 hours with single cpu...
8edc61215d154d97367257d37279a2032a0875a557fecafbdcf6687b6e6089f8
MATLAB
19,402
651
function [ss,avr,moes]=FscatJit2_mergeGroups(identifiers, data, varargin) % Plots data as both jittered points and an error bar, in the % order the identifiers are passed to it. It preserves whatever order % was in the fbmm structure. Also includes the option to define the circle % size or use a default. Also allows ...
e3cd773e48e201e4cf144e31fc1c07a61c60e97b28ccfec504491548aee8d34a
MATLAB
19,411
258
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
62b60c86d84c699a34e80b0bd3f3923e3382164260e07dfc41998af2c8d19913
MATLAB
19,414
531
% Author: Birgit Nierula % nierula@cbs.mpg.de function prepro_extractSepParameters(subject, nerve, srmr_nr) %% set variables subject_id = sprintf('sub-%03i', subject); savepath_eeg = [getenv('EEGDIR') subject_id '/']; savepath_bs = [getenv('ANADIR') subject_id '/bs/prepro/']; savepath_bs2 = [getenv('BSDIR') subject_...
b0856cac749fa5cdc2a272e315d67468c1cefd961e90a842618097894af4d9c8
MATLAB
19,414
654
% clear % clc MuscleMomentArmOW_time = []; MuscleMomentArmWI_time = []; % f = gcf; % exportgraphics(f,'Fig1_Original.png','Resolution',600) MotionData = load('MotionData.mat'); MusculoskeletalData = load('MusculoskeletalData.mat'); MuscleCluster = load('MuscleCluster.mat'); MuscleCluster = MuscleCluster.MuscleCluste...
623f3d184bcbac6644bc2104bc0e8f93a82c2679834193978e05f9a7c9ceb8e1
MATLAB
19,448
597
function tfrview(tfr,sig,t,method,param,map,p1,p2,p3,p4,p5); %TFRVIEW Visualization of time-frequency representations. % TFRVIEW(TFR,SIG,T,METHOD,PARAM,MAP,P1,P2,P3,P4,P5) % allows to visualize a time-frequency representation. % TFRVIEW is called through TFRQVIEW from any TFR* function. % % TFR : time-frequency rep...
27c7904ed3810900fc19a8de9b8452eb1ecd38ab9b4c0b29388c7ef115081ca3
MATLAB
19,465
474
classdef FeaturesAnnotator < FeaturesReporter properties featureSet end properties (Transient) rangeFeatureBeingAdded settingsEdited settingsTable selectedSet featureSetsPopup lastChosenFeatureSetName reporterName ...
11a72b70db636fadd8b929ced6bbf1d9d7f142ce25c72ebf2982b3bfeea8e735
MATLAB
19,469
534
function [Out1, Out2, Out3, NonConvergence] = fastica_nwb(mixedsig, varargin) % NWB adjusted to output "NonConvergence=1" if fastica_symm does not converge (which causes issues with ICA cleaning) %FASTICA - Fast Independent Component Analysis % % FastICA for Matlab 7.x and 6.x % Version 2.5, October 19 2005 % Copyright...
94c70572c8e3d7167f64285f1548a33be72d5546f20a52d28352d42325374ef0
MATLAB
19,480
545
function [outputs] = CHO_v21(signal, srate, param) % CHO_v16() - Return detected bounding boxes of oscillations, 1/f fitting output, % and the std of the input signal % % * Each bounding box has following attributes: % center_fp: center frequency % center_tp: middle ...
d58d5f829108d97d2e3e5c0ab0fcc6274baa4bd870f5c6e27918bc874a00a5c7
MATLAB
19,551
456
function [data] = femdata_spec_TR(mesh,t,dt,varargin) % FEMDATA_SPEC_TR Returns time-resolved photon fluence rate for the % 'spectral' FEM mesh in NIRFAST format. This function generates sparse % matrices representing the FEM problem (the time-resolved 'mass' % mastrices and sparse sources vectors). Then, it call...
84c4b072ae64c2a354fd54a0ae412366be7c0f6a126ca312607d4388e76a1a9f
MATLAB
19,558
635
%go_calib_optim_iter % %Main calibration function. Computes the intrinsic andextrinsic parameters. %Runs as a script. % %INPUT: x_1,x_2,x_3,...: Feature locations on the images % X_1,X_2,X_3,...: Corresponding grid coordinates % %OUTPUT: fc: Camera focal length % cc: Principal point coordinates % al...
d2955a8986f668586a350efdbe1ce29b2afc18b57a4734de369bfc6f27eb0c56
MATLAB
19,570
513
function varargout = DPABI_RESLICE_TOOL(varargin) % DPABI_RESLICE_TOOL MATLAB code for DPABI_RESLICE_TOOL.fig % DPABI_RESLICE_TOOL, by itself, creates a new DPABI_RESLICE_TOOL or raises the existing % singleton*. % % H = DPABI_RESLICE_TOOL returns the handle to a new DPABI_RESLICE_TOOL or the handle to %...
79e116f12540584251b0c77b3278b051ae6d06221885d1b12d0282babc30988e
MATLAB
19,581
493
function mri = ft_defacevolume(cfg, mri) % FT_DEFACEVOLUME allows you to de-identify an anatomical MRI by erasing specific % regions, such as the face and ears. The graphical user interface allows you to % position a box over the anatomical data inside which all anatomical voxel values will % be replaced by zero. You ...
a3461a01e7a126cf18a968afd160cf158106c42a162cbded4bc0bf2e71c85f85
MATLAB
19,581
493
function mri = ft_defacevolume(cfg, mri) % FT_DEFACEVOLUME allows you to de-identify an anatomical MRI by erasing specific % regions, such as the face and ears. The graphical user interface allows you to % position a box over the anatomical data inside which all anatomical voxel values will % be replaced by zero. You ...
35602a2cbaa940d6ee4beb0aae1ea49be37282db8a0507515bfa74e865cab0a0
MATLAB
19,594
532
classdef Kld<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: BSD 3 cla...
988c93cf8938c9914fe0dc5e2c0d8d5d638b9871254111a1f8509cc9388718bb
MATLAB
19,601
648
function lan_setref_micromed(LAN) % <*LAN)<] toolbox % v.0.0.8 % % Pablo Billeke % Francisco Zamorano % 12.12.2014 compatibility with lantoolbox.m GUI % 10.01.2014 add "add coord" button (PB) % 16.11.2013 add delete channles and aunto ref and buttons, and add warning % when there is no ...
fc5a9d2bde960e5335432781846f6362aaa87930b8d7703d77e94c2958bfedcf
MATLAB
19,630
408
function [p_sr_IpsiContra,p_sr_BilaSum,W_sr_IpsiContra,W_sr_BilaSum] = plotUniWingPitch(uStimLeft,uStimRight,meta,fNum) close all ipsi = [uStimLeft.uLE;uStimRight.uRE]; contra = [uStimLeft.uRE;uStimRight.uLE]; bi = [uStimLeft.bE;uStimRight.bE]; ipsi_avg = nanmean(ipsi); contra_avg = nanmean(contra); bi_avg =...
9adf4fa131a39c6052dc44f3963453e400a032f970559e1a9823eba8543c4aa0
MATLAB
19,676
297
function event_related_results_FIR(stat_path,exp_folder,q_level,ground_truth) % ======================================================================== % Ruslan Masharipov, July, 2024 % email: ruslan.s.masharipov@gmail.com % ======================================================================== load([stat_path fil...
84310ad773e9034860e2dbefe13db85908ecd472996bfe203a26e5b81d83904e
MATLAB
19,694
487
%% for baclofen injections through the grids, analyzes the baseline, saline, baclofen, and recovery data % clear; close all; clc %paths to the relevant data sets baclofen %Mouse 1 paths to baseline data, saline injection, baclofen, and recovery dataPaths{1,1} = 'D:\InVivo\S1-Baclofen\2022-02-10_Baclofen\3-basel...
0a3da4a892553864e13ec088e2e21d008bec6cec99fe3153a3bdd632ac52d628
MATLAB
19,695
475
function [backgroundColor, API, windowClipPanelWidth] = ... createWindowClipPanel(hFlow, imgModel) %createWindowClipPanel Create windowClipPanel in imcontrast tool % outputs = % createWindowClipPanel(hFig,imageRange,imgHasLessThan5Levels,imgModel) % creates the WindowClipPanel (top panel in contrast tool) in ...
4b0aaf3656407e4c62167a5713cc0f6595ef711ee17b1ce6a8e5674dac332bde
MATLAB
19,696
548
function [outputs] = CHO_v22(signal, srate, param) % CHO_v16() - Return detected bounding boxes of oscillations, 1/f fitting output, % and the std of the input signal % % * Each bounding box has following attributes: % center_fp: center frequency % center_tp: middle ...
69108a61fb46ad6066a606350b73908ee906b3ef7541e4847fcc9417f815fa97
MATLAB
19,725
656
function Answer=inputdlgWithBrowse(Prompt, Title, NumLines, DefAns, Resize, BrowseInfo) %INPUTDLGWITHBROWSE Input dialog box. % ANSWER = INPUTDLG(PROMPT) creates a modal dialog box that returns user % input for multiple prompts in the cell array ANSWER. PROMPT is a cell % array containing the PROMPT strings. % % IN...
a2f6f689324999004472a131ef1b27852611ee5cd577d61fa69bbca3dd24fab2
MATLAB
19,779
369
% TrioEEGPipelineCall.m % % call trioEEGPipeline with the epochInfo and flagInfo saved here as a % record. clc; clear all; close all; %% ITI sectionsToRun = struct( 'convert', 0,... % convert ov2mat 'load', 0,... % trioEEGLoad (incl trigger stuff) 'merge', 0,....
330fac541b0587cbace82a511917f8d82e3630fe0d3ac3dc59446b86542b3d98
MATLAB
19,788
591
function compute3Dfrom2D(savefile,frontviewvideofile,sideviewvideofile,... frontviewmatfile,sideviewmatfile,kinematfile,dosave,experiment_name) % outdated. moving to maintaining only _KB. compute3Dfrom2D_KB(savefile,frontviewmatfile,sideviewmatfile,kinematfile,... '/tmp/front.trk','/tmp/side.trk'); return; %% ...
5dd301b7174721666ee79d82a52c9bff6c800697415a55fc0cb6e9f1424a04b2
MATLAB
19,790
481
function varargout = DPABI_BIDS_Converter(varargin) % DPABI_BIDS_CONVERTER MATLAB code for DPABI_BIDS_Converter.fig % DPABI_BIDS_CONVERTER, by itself, creates a new DPABI_BIDS_CONVERTER or raises the existing % singleton*. % % H = DPABI_BIDS_CONVERTER returns the handle to a new DPABI_BIDS_CONVERTER or t...
73e3f14353dbe303fbaded56aafaeb2c1d00ea151255ca40bfe917d50dec9c90
MATLAB
19,794
539
function hs = ft_plot_sens(sens, varargin) % FT_PLOT_SENS visualizes the EEG, MEG or NIRS sensor array. % % Use as % ft_plot_sens(sens, ...) % where the first argument is the sensor array as returned by FT_READ_SENS or % by FT_PREPARE_VOL_SENS. % % Optional input arguments should come in key-value pairs and can incl...
f1df02b07c0acd1416b5667e869feb1c7024180a8cd64c5c225cae08ce8c920e
MATLAB
19,826
485
function linescanVelocityAnalysis(fname, prefs) % % line scan analysis - use radon transform on linescan stripes (from RBC % shadow) to detect RBCV % Patrick Drew code from github, adapted by Dori, Kira & Orla, July 2017 % updated May 2018 by Kira % NB this code now removes bad frames, so no need to manually de...
2ed6be4465394038652b662c51a264f1e2ad652d386ca32145979029d0991688
MATLAB
19,837
507
% Address the basic question, when x is the salient category, what % percentage of units are tuned to x. function SlidingTimeDPrime(config,varargin) [varargin,DateName] = Utilities.ProcVarargin(varargin,'DateName',[]); [varargin,Pmethod] = Utilities.ProcVarargin(varargin,'Pmethod','fdr'); [varargin,saveF...
d3b9ded05834aa8d3b030c08aab6352ded3e4155dad54907e441d58f07220379
MATLAB
19,887
407
%% Get statistics from data function [ xhatStats, xhat_Stats, ... xhatTable, xhat_Table] = GetDataStats(xhat, xhat_, dataType) % Extract mean, within individual standard error and between individual % standard error for xhat and xhat_ and store in structs. Also format % tables to display the relevant sta...
1d32062f99da7658a842cd88db263d973024c27fa9f8edf9ef311bf6bb41db44
MATLAB
19,947
406
% LIP choice decoder including/excluding Tin, Tout, Min populations - % time-dependent <-- % Renames from calc_whatDecoder_acrossTPTs load(fullfile(saveLoc, 'par_sess')) winSize = 0.05 ; winCenter = 0.001 : 0.005 : 0.6; winStart = winCenter - winSize/2; winEnd = winCenter + winSize/2; winCenter = mean([win...
8e906ff27f05c0325b08c989b406a1479cc613a6c54fc824bbde4dafba4d4868
MATLAB
20,000
520
function test_Path() for platform = enumeration('apt.Platform')' if platform == apt.Platform.windows nativePathAsString = 'C:\foo\bar\baz'; expectedPathAsString = '''C:\foo\bar\baz'''; % Expect quoted version correctNativePathAsList = {'C:', 'foo', 'bar', 'baz'} ; else nativePathAsString = '/foo/b...
3dda47faab1ef4be6c16c7620a80e4508232984b3c7066d102e1fa9fb2cc746e
MATLAB
20,019
596
//======================================================================== // GLFW 3.4 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org> // // This software is provided 'as-is', without any express or implied // ...
45366dc3e614deb0e9c2ef7436bd358d619d8b69996bc247fc89edca0e43a465
MATLAB
20,031
478
function [cfg] = ft_clusterplot(cfg, stat) % FT_CLUSTERPLOT plots a series of topographies with highlighted clusters. % % Use as % ft_clusterplot(cfg, stat) % where the input data is obtained from FT_TIMELOCKSTATISTICS or FT_FREQSTATISTICS. % % The configuration options can be % cfg.alpha = num...
c2f1f8f28e3d8f7f2543321daa49daf0c38f41e4b04af0a8287931a7a5588a38
MATLAB
20,033
540
%% Load the trained network. load('./data/hfopt_.mat') net.layers(1).transfun = @(x) x; net.layers(1).Doperator = @(y) ones(size(y)); net.layers(2).transfun = @ tanh; net.layers(2).Doperator = @(y) 1.0-y.^2; net.layers(3).transfun = @(x) x; net.layers(3).Doperator = @(y) ones(size(y)); inv_trans_fun = net.layers(2).inv...
d3ac0bf44c38e3c986386c68277dc89ed6052e3f0220927b8c3191179977d4c4
MATLAB
20,053
422
function [mappedA, mapping] = compute_mapping(A, type, no_dims, varargin) %COMPUTE_MAPPING Performs dimensionality reduction on a dataset A % % mappedA = compute_mapping(A, type) % mappedA = compute_mapping(A, type, no_dims) % mappedA = compute_mapping(A, type, no_dims, ...) % % Performs a technique for dimension...
0b6d14186272957ec0acb71cfa1070847d72a47fb7e3ad1ba42765ac38e2b8e1
MATLAB
20,054
540
function [theta_opt, objfun] = hfoptimizer(net, init_conditions_ntrials, inputs_ntrials, targets_ntrials, varargin) %% This code is created based on David Sussillo's implementation (https://github.com/sussillo/hfopt-matlab). % Initial settings. do_parallel = false; save_path = './'; % Save snapshots for hf iterations....
19483547f8e60bde67cb93aebd69d170bee66fed0dc9361881d3f98239430eba
MATLAB
20,054
448
function [data, result]= readtext(text, delimiter, comment, quotes, options) % Usage: [data, result]= readtext(source, delimiter, comment, quotes, options) % % Whatever text (file) you give it, readtext returns an array of the contents (or send me a % bug report). Matlab can't read variable length l...
41c330fa16d3b922f3ba5c353237f30b3a0397458df15682a9570b12efa31bf3
MATLAB
20,054
694
%% Minfunc demo % PMTKinteractive % PMTKslow %% % This file is from pmtk3.googlecode.com f = 1; options.Display = 'none'; %% Huber robust regression % Generate linear regression data set with outliers nInstances = 400; nVars = 1; [X,y] = makeData('regressionOutliers',nInstances,nVars); % Least squares solution wL...
29653128ce6405778bfb6f2f2f972c092aafd9fa7bd02c74985eb5b8203beade
MATLAB
20,103
472
function [headmodel, cfg] = ft_prepare_headmodel(cfg, data) % FT_PREPARE_HEADMODEL constructs a volume conduction model from the geometry % of the head. The volume conduction model specifies how currents that are % generated by sources in the brain, e.g. dipoles, are propagated through the % tissue and how these resul...
e3a0cf2e5b37d292b0f1ec99953f0891d86ee2c6d299acf448dc3abbda7946dd
MATLAB
20,145
544
function varargout = SMA_settings(varargin) % SMA_settings MATLAB code for SMA_settings.fig % SMA_settings, by itself, creates a new SMA_settings or raises the existing % singleton*. % % H = SMA_settings returns the handle to a new SMA_settings or the handle to % the existing singleton*. % % ...
a798750246d6b5eeb51e6ba383cf3f8626918f22a7129583f558c9d7f341747a
MATLAB
20,200
375
function model = runMonteCarlo(model,varargin) % Requires % MCmatlab.mex (architecture specific) % % See also plot, runMonteCarloFluorescence, simulateHeatDistribution %%%%% % Copyright 2017, 2018 by Dominik Marti and Anders K. Hansen % % This file is part of MCmatlab. % % MCmatlab ...
49c5b801213b29fb838c424af3ab4035f77f5fb32f7a0f6b583554dd8077641f
MATLAB
20,212
587
function [outputs] = CHO_v24(signal, srate, param) % CHO_v24() - Return detected bounding boxes of oscillations, 1/f fitting output, % and the std of the input signal % % * Each bounding box has following attributes: % center_fp: center frequency % center_tp: middle ...
3e8a94dcd024ee022f1a2b625b2b6dfa14130cdd5df5a1ad2fb7f10787a81e1a
MATLAB
20,261
269
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
807ebaa970b7f3bf9b975031d6e2c8cf0c8acdad1f92a4af2cea296113fc97a0
MATLAB
20,279
514
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% disp(['Making Figure: ',FigName]) figure('name',FigName) set(g...
d2328a691e9513c7ed1722b45774458e99f3181d189e1d1059da7a42a9586784
MATLAB
20,280
673
%%% WARNING!!! This code is not in working condition yet. %%% AS A RESULT, IT IS NOT SUPPORTED!!! %%% -Jean-Yves Bouguet %go_calib_optim_iter_weak % %Main calibration function. Computes the intrinsic andextrinsic parameters %for the weak perspective camera model %Runs as a script. % %INPUT: x_1,x_2,x_3,...: Feature lo...
71c0d41d5b75c12502d8e34782a1df819aa923f502198ecc33a89f8835b436ba
MATLAB
20,293
544
% Function where all the parameters are set up for the simulation, which is % coded in the file 'EIF1DRFfastslowSyn.c' (C code for computation time). % Code based on Chengcheng Huang's code: % https://github.com/hcc11/SpatialNeuronNet % https://github.com/hcc11/FI_SpatialNet % I modified and drastically simplified the...
093b60f75e596e2a8de97c2c0f60a0bd8178fd682cce4d20d39a6c031f942c0e
MATLAB
20,298
403
function [varargout] = read_plexon_plx(filename, varargin) % READ_PLEXON_PLX reads header or data from a Plexon *.plx file, which % is a file containing action-potential (spike) timestamps and waveforms % (spike channels), event timestamps (event channels), and continuous % variable data (continuous A/D channels). % %...
82ab216548c05c65bcc195b52e75cde2c184858a87e8f6450acf2519de5facc2
MATLAB
20,305
538
function [S,NlogL,optimInfo]... =gmcluster(X,k,start,reps, CovType,SharedCov, RegV, options) %GMCLUSTER Gaussian mixture fit. % S = GMCLUSTER(X,K) fits a K-component Gaussian mixture model to the % data. The fit maximizes the log-likelihood of the data using % Expectation Maximization (EM). Rows of X corresp...
d7dabfe1e01e5e6de716552912f98db2bd3d6e609f6604af38affa6d01341100
MATLAB
20,309
531
classdef DataCollection < handle % A DataCollection is a collection of several Datasources. Data-collections % and datasources are explained in broad terms here: % <a href="matlab:dspace.help('dspace.resources.docs.Introduction_to_Dataspace')">Introduction to Dataspace (Dataspace Help)</a> % %...
aa5a503bbeb1badbe67a323da8a527c7be3edf1983497059269bb20432c0cbff
MATLAB
20,329
493
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% disp(['Making Figure: ',FigName]) figure('name',FigName) set(g...
462357daafb863762c486fb6590daf0d51a5493464cc1668900559ea87b51e9c
MATLAB
20,407
533
% Set up format of simulation data to match mediation analysis medA = load(fullfile(saveLoc, 'for_plots_mediation_norm_to_se')); sim_dat = load(fullfile(saveLoc, 'race_model_simulation')); load(fullfile(saveLoc, 'par_sess')) % Add time point 0.2s (0) sim_dat.diffusionPaths = [zeros(60000, 1) sim_dat.diffus...
4510bb3ac0079c9a95aaac438c30005624cfd9268fb0eabcfc40df029d7a4dd3
MATLAB
20,489
431
function EpisodicImageChecker(StatusFig,LastIndexNumber,Temp_ImageArray_FirstImages,Peak_TempDeltaF,End_TempDeltaF,MeanStartingFluorescenceVector,Peak_TempDeltaFMaxVector,End_TempDeltaFMaxVector) warning on all warning off verbose warning off backtrace OS=computer; if strcmp(OS,'MACI64') ...
214f8ebd5efd34b696e85007e46917f94cdc3fad45da71b0c1c2c8ff990c7972
MATLAB
20,504
677
% 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...
89f7300a85be745d03bad87e9def448782819d35affe0b11c70e20ee05b3bcfd
MATLAB
20,583
498
function [d,si]=abfload(fn,varargin) % ** function [d,si]=abfload(fn,varargin) % loads and returns data in the Axon abf format. % Data may have been acquired in the following modes: % (1) event-driven variable-length % (2) event-driven fixed-length % (3) gap-free % Information about scaling, the time base and t...
62944fe0da84b9e8ecd3cc137c9c7c31f62624741a5f49c0f08f39703116c575
MATLAB
20,601
504
function res = mapper(X, options) % Main function to run the Mapper Algorithm on (time x features) data % % Mapper is running multiple steps, named and defined below as % transformations on the data: % % input data X % % -> [1] (optional) preprocessing % % -> [2] distance: pair-wise distance calculation % % ->...
87ce0130653723d7a4bb33f1f02509e75e322043ce5b6fbddf1067111a658722
MATLAB
20,616
666
function varargout = scnlab_outlier_id(varargin) % Methods (modes of operation) % % :Setup: % % Run this method first to generate an options structure OPT % that can be passed in along with any data vector for speedy % processing % % :Usage: % :: % % OPT = scnlab_outlier_id('setup', 'tr', 2, 'sperses...
f48e592f53155b57f54cba44c8a8e4196d12b23999f14426bf342544f9d8f87b
MATLAB
20,617
731
function [A] = meg_nonparametricTest(data1,data2,nPerm,stat,variableName,condName,t) % MEG_NONPARAMETRICTEST() % % performs nonparametric testing on time series data with two conditions (Maris & Oostenveld 2007) % - ttest data1, data2 % - randomly permutes data into 2 conds nPerm times % - ttest on random permu...
5bb076f87dc1054e8c2bf56ce4c47af268226b995542d838d6ff494b59fcf2c3
MATLAB
20,622
549
% Function where all the parameters are set up for the simulation, which is % coded in the file 'EIF1DRFfastslowSyn.c' (C code for computation time). % Code based on Chengcheng Huang's code: % https://github.com/hcc11/SpatialNeuronNet % https://github.com/hcc11/FI_SpatialNet % I modified and drastically simplified the...
6763c624c758e907dcb5d356317d64b0b8c06bf8616707b165cc42b00fc1b0e8
MATLAB
20,653
427
function [PO_to_PrefO_count,... bin_centers,... PO_bin_frac_sig_ofTuned,... comp_type_label,... ratio_conTOdiv,... ratio_conTOdiv_CI,... dPOsig_perint,... dPOsig_perint_all,... output]... = StripeRearing_stability(data,timepoint_labels,varargin) p = inputParser(); p.KeepUn...
ad7fdab900c4a3ed0d50790be9362068e642f8096824afb4c3704b26dfbe56fe
MATLAB
20,654
443
function [] = CreateCompilationVideo_new(meta,Data,body,wings) close all flyID = meta.flyID; nTrials = numel(flyID); DLC_model = meta.DLC.model; DLC_dataSubFold = meta.DLC.subFold; cc = distinguishable_colors(9); tracked_ptLabel = meta.trackedptLabel; rotMatX = @(theta) [1 0 0; 0 cosd(theta) -sind(theta); 0...
1db7c677af4d96f314c3f8beb07a512230180d8817b4e80ad77910849861dadd
MATLAB
20,655
585
function tfrview(tfr,sig,t,method,param,p1,p2,p3,p4,p5); %TFRVIEW Visualization of time-frequency representations. % TFRVIEW(TFR,SIG,T,METHOD,PARAM,P1,P2,P3,P4,P5) % allows to visualize a time-frequency representation. % TFRVIEW is called through TFRQVIEW from any TFR* function. % % TFR ...
38eabd29928c431d1914ca7037491d9892f88e4ca2b94f7332a005e24e2393ef
MATLAB
20,672
663
function [comparison,means,h,gnames] = multcompare_ZN(stats,varargin) %MULTCOMPARE Perform a multiple comparison of means or other estimates % MULTCOMPARE performs a multiple comparison using one-way anova or % anocova results to determine which estimates (such as means, % slopes, or intercepts) are significantly...
0fa14da4ae057b32153b4786f11f32546b31c3163d4057019ce75361beb2eb61
MATLAB
20,673
406
function [log_odd] = extract_ground_truth_info(folders,option,method,shuffles,ripple_zscore_threshold,p_val_threshold) % Input: % Folders: Each Folder is data for a session % method = 'linear' or 'wcorr' or 'spearman' or % p_val_threshold = If you want to extract events at specific p value, % set the p value threshold...
d9ee3fa97bb87b948acb968b047a9c45024e7657a91ec394bf7a1fc381ff52b9
MATLAB
20,673
574
function [output] = ft_singletrialanalysis_aseo(cfg, data, erp_fft) % FT_SINGLETRIALANALYSIS_ASEO executes single-trial analysis, using the % ASEO algorithm (Xu et al, 2009) % % Use as: % [output] = ft_singletrialanalysis_aseo(cfg, data_fft, erp_fft) % where data_fft is the observed data in the frequency domain, erp_...
92586074bfe52bcec7bd5d76675d0485c128843586f9d956e723378bf258fea9
MATLAB
20,674
594
function varargout = DPABI_QC_TOOL(varargin) % DPABI_QC_TOOL MATLAB code for DPABI_QC_TOOL.fig % DPABI_QC_TOOL, by itself, creates a new DPABI_QC_TOOL or raises the existing % singleton*. % % H = DPABI_QC_TOOL returns the handle to a new DPABI_QC_TOOL or the handle to % the existing singleton*...
4ddc2f9646b4b1ce8c0d64f76c404944fa720f7d3766e6535498413d12e83c04
MATLAB
20,678
293
%% Analysis of the functional data using RSA % Defining parent directories (each containing a separate directory for each subject) all_subjects_GLM_files_dir = 'C:\Users\michaelpeer1\Google Drive\bar_mord_shared_files\Experiment_data\GLM_files'; % The per-run GLM results all_subjects_RDMs_dir = 'C:\Users\...
c968346cbf4d1d142d5d6a103a6e81e32b757aaaf8b1f229035a46ebe8cd6447
MATLAB
20,693
436
function DataStructure=PowerFit_Custom_ZN1(Xdata,Ydata,Power,FitOption) %Newer version includes different fit methods if size(Xdata,1)<=1&&size(Xdata,2)<=1&&size(Ydata,1)<=1&&size(Ydata,2)<=1 warning('Need to provide more than one data point to fit!') DataStructure=[]; elseif size(Xdata...
098686d2ef110523b3abbca9af9952023d603c7af487522e13bff00865f7ebf5
MATLAB
20,700
513
%% SDO Multi-Mat % Data Class for holding and manipulating multiple sdoMat classes. Designed % for use within the SDO Analysis Toolkit. % % Used to rapidly compute multiple SDOs at once. % Can be exported to 'sdoMat' class for analysis. %_______________________________________ % Copyright (C) 2023 Trevor S. Smith % ...
63800d0ff87e38975a89b319e070ffb64f7d679515e30d046aa03d98030d9957
MATLAB
20,726
510
function [cfg] = ft_clusterplot(cfg, stat) % FT_CLUSTERPLOT plots a series of topographies with highlighted clusters. % % Use as % ft_clusterplot(cfg, stat) % where the input data is obtained from FT_TIMELOCKSTATISTICS or FT_FREQSTATISTICS. % % The configuration options can be % cfg.alpha = num...
126d45366d084a2887b293cae9f53619fc14da84bcaa16e9c43628fda7c87d93
MATLAB
20,727
670
function invert = spm_cfg_eeg_inv_invertiter % Configuration file for configuring imaging source inversion reconstruction %__________________________________________________________________________ % Copyright (C) 2010 Wellcome Trust Centre for Neuroimaging % Vladimir Litvak % $Id: spm_cfg_eeg_inv_invertiter.m 7660 20...
c9e2107f4c1b2b1c531192094d5a5fb270ccd2a36bf43224391d13547cb11400
MATLAB
20,733
580
function [ FIFF ] = fiff_define_constants() % % [ FIFF ] = fiff_define_constants() % % Defines structure containing the FIFF constants % % % Author : Matti Hamalainen, MGH Martinos Center % License : BSD 3-clause % % Revision 1.23 2009/03/30 11:37:37 msh % Added copying of measurement info blocks fro...
408c48017de62e99be10cdaa21416fd4e538c0c58d1da928b69d886f3d3fd531
MATLAB
20,736
464
%% function bodyData_openBody = TOP(videoName,opMatName,frames2use,ptCloudDir,mkvSourceDir,alignDepth,verbose) if ~exist("frames2use","var") frames2use = 0; end if ~exist("verbose","var") verbose = 1; end if ~exist("mkvSourceDir","var") mkvSourceDir = [];...
48461bd0599345a61d01d28583f06d9585f22f976df7e9139d76b126616b18bc
MATLAB
20,744
685
%% Load Unit Data datRoot = '/Volumes/LaCie/Farries recordings/'; load([datRoot 'unitDat_final_culled.mat']) uName = arrayfun(@(u) strsplit(u.name), unit, 'UniformOutput', false); uRat = cellfun(@(u) u{1}, uName, 'UniformOutput', false); uSes = cellfun(@(u) u{2}, uName, 'UniformOutput', false); uTrode = cellfun(@(u) ...
25780c7940c14cb158ae69db7ad4d192dc4d3629000fba51c04022795c24f2ea
MATLAB
20,765
753
function fit = barsP(data,dataRange,trials, bp) % Usage: fit = barsP(data,dataRange,trials, bp) % data: a vector of count data. Data must be equally spaced along x % dataRange: the x values for the first and last point of the data % trials: number of repeats that gave rise to these count data % bp (optional): ...
04b48a9afedf9a70645ed2d47855cc98103f5a7d018492c94c60005b6763c2c4
MATLAB
20,766
631
%% BROAD categories of consonants: spatiotemporal map [~, stim_names ]= xlsread([DIRscript, '/event_file_name_sound_both_v1.2eh_resorted.xlsx'],'E3:E590'); categories = xlsread([DIRscript, '/event_file_name_sound_both_v1.2eh_resorted.xlsx'],'G2:AB590'); [~, labels ] = xlsread([DIRscript, '/event_file_name_sound_both_v1...
fc53a2e3950d4b2517e7d3bae7c75e5a6166fe2c255ebf066a39cf521613a628
MATLAB
20,767
688
% 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 = Mus...
8d86386acfadfc62fbb4d8cd15c19becf382c3aa26384b94ee8c24749cd3445d
MATLAB
20,774
491
function [headmodel, cfg] = ft_prepare_headmodel(cfg, data) % FT_PREPARE_HEADMODEL constructs a volume conduction model from the geometry % of the head. The volume conduction model specifies how currents that are % generated by sources in the brain, e.g. dipoles, are propagated through the % tissue and how these resul...
8f7a3c8979d2742a48b7cf372ff4cb7a26b454ba4d049bf1cc8f37d1cf2897aa
MATLAB
20,790
585
function [h, T2] = ft_plot_slice(dat, varargin) % FT_PLOT_SLICE plots a 2-D cut through a 3-D volume and interpolates if needed % % Use as % ft_plot_slice(dat, ...) % or % ft_plot_slice(dat, mask, ...) % where dat and mask are equal-sized 3-D arrays. % % Additional options should be specified in key-value pairs an...
6fe555b70f006637576e295a21344d0507f0020311a43ed6f4aa76304801d71e
MATLAB
20,807
666
%% ===================================================================== % This code produces the simulation results and figures in the manuscript % "A Computational Framework for Understanding the Impact of Prior % Experiences on Pain Perception and Neuropathic Pain" by authors Malin % Ramne (Chalmers University of ...
26bf66488f727f8b480ed03253d0c48badc3a369ffb6457fd4e865f8631b60b0
MATLAB
20,830
417
% AUTHORSHIP % Math Lead & Primary Developer: Connor Meehan <connor.gw.meehan@gmail.com> % Secondary Developer: Stephen Meehan <swmeehan@stanford.edu> % Bioinformatics Lead: Wayne Moore <wmoore@stanford.edu> % Provided by the Herzenberg Lab at Stanford University % License: BSD 3 clause % function [red...
dd4ce9ede5d8caa1d30b350c9129c8d99507d9b53af10654a36721366b25ae1e
MATLAB
20,847
486
% This object is used to represent physiological data. The object uses the % design_matrix() class to for the data set and has additional fields for the % sampling frequency. % % :Usage: % :: % % physio_data: data class for creating a physiological data object % % :Inputs: % % **dat:** % M x N numeric mat...
113ae9aeeb90f57bd3d134b8e3bc1de1abe13acc3fd28cfd94c149400e2c8a08
MATLAB
20,870
629
classdef LabelCoreController < handle % Labeling controller base class % % Owns all graphics handles for labeling: point markers, text labels, % skeleton edges, occluded box points. Receives GUI callbacks (axis clicks, % key presses, mouse motion) and delegates data logic to LabelCoreModel. % Listens to model events an...
5f1f32debc736d894cf002cac4bcaa15af499d44dedf2f42c19b9ef7db360d45
MATLAB
20,884
477
function [ seg8t, tis, vx_vol, trans] = boney_segment_get_segmat(out,job_ouput_writevol,normCT,verb) %boney_segment_get_segmat. Get and evaluate SPM preprocessing structure. % % [seg8t, tis, vx_vol] = get_spm8(P) % % P .. one image % seg8t .. spm8 structure without larger fields % tis .. measures ...
c2ad3fd7ac78b4ad316a062a09ed03ed623639df2a2f95cb36db04a46d3bb3a2
MATLAB
20,885
560
function varargout = manually_warp_images(varargin) % MANUALLY_WARP_IMAGES, is a GUI which shows the controlpoint grid used % during registration of two images, allowing the user to drag control % points to get a better initial alignement before pressing the start % registration button. % % Example, % Istatic=im2do...
42c82491d80687f03b86a19b5919f12cd207fe91f44fd70cad3cd55753017b9c
MATLAB
20,917
757
function summary = barsP(data,dataRange,trials, bp) % Usage: fit = barsP(data,dataRange,trials, bp) % data: a vector of count data. Data must be equally spaced along x % dataRange: the x values for the first and last point of the data % trials: number of repeats that gave rise to these count data % bp (optiona...
42b7fe4a2bc18735be9511c566bab1fdee17a986a3ea2ef1c7211ca959ffb5e0
MATLAB
20,942
655
function [hh,hii]=showmri_test(mri,para,varargin); % shows mri-slices eventually plus sources % usage: [hh,hii]=showmri(mri,para,source1,source2,...); % % input: % mri in general complicated structure containing information about % the mri. The necessary fields are mri.data, a variable with % 3 indices c...
965783c69d2146e893f80939df88098ae9284a37879e13658c07e607fc45b36f
MATLAB
20,959
618
% load data % contact Lead Author for data %% CELL SEQUENCE % 3B-C %%%% COMMON CELLS BETWEEN AO1 - VS1 df = cat(2, allDfofs_1{1,1,:}); fields = cat(2, allFields_1{1,1,:}); seq1 = df.*fields; df = cat(2, allDfofs_1{2,1,:}); fields = cat(2, allFields_1{2,1,:}); seq2 = df.*fields; iidx = find(...
427a2651381b0c751310de778ac074b9c92b5077e0152f385f2598d03d9e8e6e
MATLAB
20,964
361
%% Script for analysis of FlyTracker output of free-walking experiments (Sapkal et al 2024 Fig. 1) % This only works with speicific folder,subfolder arrangement as in % superfolder/genotype subfolders/fly folders/tracking data % add path of edmond.de folder % run each section in order from start to end, one section...