sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
9360c2fc3f8afa9581e05d7796e82ccb09a7af379239de9ec419d4963ed6b332
MATLAB
25,577
807
% clear % clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 7; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.OW.a1OW; x0(2) = NineMuscleMorphParaInitia...
f088843f067a0f5150a960cb28c85f16a3ce70e0c5329204e503f0f047611a29
MATLAB
25,579
627
function varargout = eval_gv(net, condition, v_u_t, m_target_t, v, lambda, forward_pass) %% Setup. % Network structure. [n_Wru_v, n_Wrr_n, m_Wzr_n, n_x0_c, n_bx_1, m_bz_1] = unpackRNN(net, net.theta); [V,T] = size(v_u_t); [M,N] = size(m_Wzr_n); % Transfer functions. rec_transfun = net.layers(2).transfun; out_transfun ...
6c3cd0191c5b3410b82d9285e05a3ec29340bd47f25a307cf6bcd874922a3c34
MATLAB
25,598
524
%% This file generates all figures and tables of results to the fitting of the connectome data. % Be sure to run FitConnectome first. %% Create Brain figures PATH = pwd; fontsize = 10; diff_time19 = (19 - 8/3)/1000; diff_time49 = (49 - 8/3)/1000; image1Sub = 'sub_003_rescan'; image1slice = 71; image2Sub = ...
ef0a3d67d3f6012bd349a2401019bcda7ee76d1888b164e3d4f86265dbf1aa8f
MATLAB
25,603
471
% Get behavior related information % Edit by Jerry. 09/20/2022 function Behavior = GetBehaviorInfo_220920... (szCell,szDir,szTiming,params,SaveDir) %********************************************************************* % this function extracts all the behavioral information % The notation [n] refers to...
8cf269b3d7ef93b4e86eb8edb5b586512141ea457947e0e14ab649e602b05871
MATLAB
25,616
778
function stack = tiffread(filename, indices) % tiffread, version 2.91 Nov 1, 2010 % % stack = tiffread; % stack = tiffread(filename); % stack = tiffread(filename, indices); % % Reads 8,16,32 bits uncompressed grayscale and (some) color tiff files, % as well as stacks or multiple tiff images, for example those produced...
d09eadb299352107654b2616a012c6ae8653b96e17dc7fdecd99056d29a94b46
MATLAB
25,618
649
%% ppDataCell % OOP-based class for handling of point-process datatypes. Designed for use % within the SDO Analysis Toolkit. % TODO: Modularize Plotters % 8.12.2024 - Added Validation to the import method to ensure that the % arrangement of data corresponds to expectations %_______________________________________ %...
f294014a740ccbabd7e24071918f72b4da9120e8cb5c5451ba6046ada9a5d408
MATLAB
25,664
598
function [headmodel, sens] = ft_prepare_vol_sens(headmodel, sens, varargin) % FT_PREPARE_VOL_SENS does some bookkeeping to ensure that the volume % conductor model and the sensor array are ready for subsequent forward % leadfield computations. It takes care of some pre-computations that can % be done efficiently prior...
403b9b001018b444ac07853377fe9e4678ef06ce5a027c8e4f6f7edeb24ed72c
MATLAB
25,677
1,015
function GLAN = erp_stata(GLAN,cfg) % <*LAN)<] % v.0.0.996 % % REALIZA ESTADISTICA NOPARAMETRICA A ERP % % cfg. % subject = [{}{}{}] % comp = [n1 n2]; % INDEX OF THE CONDITION TO COMPARED % matdif = [-1 1 -2 2] % MATRIZ DE DIFERENCIAS, DEL MISMO TAMAGNO QUE cfg.comp. % ...
bbbc2c9b7ac7068ce05f0145cf850b783b71ef7c03e62fa21eba8d05612bea8f
MATLAB
25,685
750
function y = symbolise_ed_vectorised(x, dim, dly, ties) % SYMBOLISE_ED_VECTORISED encodes Difference Patterns of a given time % series. Patterns are encoded using vectorisation. The entries of the % output vector are casted to the smallest admittable unsigned integer % class (uint8, uint16 or uint32). % % Y =...
cf63cd44fd6bc866d7a9b6ff467f4071186e7965ca13f31f31aa609d3fa5a3e3
MATLAB
25,697
397
function remapping_classification_bootstrap(folders) parameters= list_of_parameters; master_folder= pwd; cell_remapping= table; % load('cell_remapping.mat'); for this_folder=1:size(folders,1) cd([master_folder '\' folders{this_folder,1}]); disp([master_folder '\' folders{this_folder,1}]) tic; load...
594b255ad44b9d87f740d65598a5b47ebba0a21b9191628f43c9dab471410705
MATLAB
25,747
525
function [log_odd] = ground_truth_log_odd_analysis_partial(folders,timebin,posbin,BAYSESIAN_NORMALIZED_ACROSS_TRACKS) % Input: % Folders: Each Folder is data for a session % Timebin: 0.02 or 1 % 0.02 -> 20ms time bin % 1 -> 1 event time bin % posbin: [] or 1 % [] -> 20 position bin per track (will load extracted_place_...
91ebf203335e63e7837c518f5d35c64bcc1e133d49cbdfbbd8e72ed5827848cc
MATLAB
25,762
813
% clear % clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 6; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.OW.a1OW; x0(2) = NineMuscleMorphParaInitia...
4525a67b2af936fa096a4e513c86f72e7c0758d4241f712f13699d18d6975418
MATLAB
25,781
683
function [Y, infos, problem_description] = low_rank_dist_completion(problem_description) % Perform low-rank distance matrix completion w/ automatic rank detection. % % function Y = low_rank_dist_completion(problem_description) % function [Y, infos, out_problem_description] = low_rank_dist_completion(problem_descri...
b95368e133186c1f1956071cf653c8394b4d3c204c941a85cebf035929b8d3b5
MATLAB
25,785
827
% clear % clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 7; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.OW.a1OW; x0(2) = NineMuscleMorphParaInitia...
679f245bbe0f4c8a3d7066c1de0249a8847c746ff254205a3ea868106a3ca1de
MATLAB
25,946
522
function [ session ] = load_beh_shef( varargin ) %LOAD_beh GUI for aligning .tif files to .mat files % % PARAMETERS % tif_frame_counts ([]) - The number of frames in each .tif to be % aligned. If left empty, tif_filepaths must/will be assigned and the % frame counts will come from the files. % tif_filep...
8340765ed66db64f280cbec97610d7d03e6c58bc0114b6dbdafc93d25537a643
MATLAB
25,971
834
% clear % clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 6; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.OW.a1OW; x0(2) = NineMuscleMorphParaInitia...
0d5fe0e82b255ab1ff48d62379ec1c3d266731affd40935c1b1c452e15fd0893
MATLAB
25,979
583
function fg=y_spm_image(op,varargin) % image and header display % FORMAT y_spm_image %_______________________________________________________________________ % % y_spm_image is an interactive facility that allows orthogonal sections % from an image volume to be displayed. Clicking the cursor on either % of the ...
43a83f66870f605f3de6b05f3265c8448526ea90c414c0522829d5c4f2f4d336
MATLAB
25,997
865
%% 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) ...
b405fedca088d688d300fcc5a471cb073d0ecd61f36f8c581cbd5df9404576e7
MATLAB
26,029
518
classdef ProjectSetup < handle % Widget properties properties (Access = private, Transient) fig_ matlab.ui.Figure project_name_label_ matlab.ui.control.Label project_name_edit_ matlab.ui.control.EditField number_of_keypoints_label...
560b48d7907a6d69ac4f1034cff5849e1bb960f23d2d9e72b402384b2d9b11f3
MATLAB
26,038
670
% [MeanContrast, SigContrast, pValue] = PermutationTest( ... % Data, Data2, nPerms, pValue, Paired, OneSided, TMaxDims, ... % MultipleComparisons) % % One- or two-sample, paired or unpaired random permutation test of the % null hypothesis that the samples in arrays Data and Data2 along the last % dimension come f...
c6dbcb6d6ffb6e5197a4a2cf0412c2582bdfa7767008c3c4dc0bf83cfbc26f85
MATLAB
26,080
469
function shape_classification_plot_distribution(dataClass,ClassesDistance) fig = clf(figure()); set(fig,'name','Class distribution','NumberTitle','off','color','w','units','normalized','position',[0.275 0.175 0.4 0.4],'menubar','none','toolbar','none') CurrentAutomaticAxes = 1; CurrentBox = 0; CurrentGrid = 0;...
8001742f172f311f6866c5a8571043eea6cab8733276a9e323f8a4049556d3f7
MATLAB
26,102
773
function [pipeline] = ft_analysispipeline(cfg, data) % FT_ANALYSIPIPELINE reconstructs the complete analysis pipeline that was used to create % the input FieldTrip data structure. The pipeline will be visualized as a flowchart. % In the future it will be possible to output the complete pipeline as a MATLAB script % or...
59c45660e4b0e35be990a43aff09e3935025414558b84c7a26ecc3c188598046
MATLAB
26,104
520
%_______________________________________________________________________ % % Run random dot motion experiment defined in createDotInfo %_______________________________________________________________________ % % Input % % expInfo | experiment configuration (struct) % setup.subj | identifier of subject (string) % con...
affcde97f3af8e19dc2e272d6768061c294f2f4d052d3aaaa8e2d570242167c7
MATLAB
26,134
618
function [status] = ft_hastoolbox(toolbox, autoadd, silent) % FT_HASTOOLBOX tests whether an external toolbox is installed. Optionally % it will try to determine the path to the toolbox and install it % automatically. % % Use as % [status] = ft_hastoolbox(toolbox, autoadd, silent) % % autoadd = 0 means that it will ...
24f197917699727921935f20708ffa2e1a6142b119d66d5bc6cc3ea1c7e0853b
MATLAB
26,150
779
function [varargout] = ft_qualitycheck(cfg) % FT_QUALITYCHECK performs a quality inspection of a given MEG/EEG dataset, % stores (.mat), and visualizes the result (.png and .pdf). % % This function segments the data into 10-second pieces and performs the % following analyses: % 1) reads the properties of the dataset ...
d8c4947780c47c36cb1cc4d7eed877511464b2d8d06ce91f2811c2ecbf5175fc
MATLAB
26,155
779
function [varargout] = ft_qualitycheck(cfg) % FT_QUALITYCHECK performs a quality inspection of a given MEG/EEG dataset, % stores (.mat), and visualizes the result (.png and .pdf). % % This function segments the data into 10-second pieces and performs the % following analyses: % 1) reads the properties of the dataset ...
e0e094b8983965b30b6d6d1060862b1f39d32d09c9fff398c07ad62c9f9461ee
MATLAB
26,172
558
%% cytoarchitecture % author: Casey Paquola % email: casey.paquola@gmail.com % feel free to get in touch if you have any questions for init_project = 1 % set directories GH = '/Users/cpaquola/Documents/GitHub/'; % github repo location homeDir = [GH '/DMN']; ...
38940f4f0673c6f3dc9d64db17a44990bdecf535f4bcdd2008276128c118dfd5
MATLAB
26,179
589
function [cfg] = ft_interactiverealign(cfg) % FT_INTERACTIVEREALIGN allows the user to interactively translate, rotate and scale an % individual geometrical object to a template geometrical object. It can for example be used % to align EEG electrodes to a model of the scalp surface. % % Use as % [cfg] = ft_interacti...
1d45611715500236256be225c89406d3e8a9619148831bcdafca2f118164332b
MATLAB
26,205
613
function [headmodel, sens] = ft_prepare_vol_sens(headmodel, sens, varargin) % FT_PREPARE_VOL_SENS does some bookkeeping to ensure that the volume % conductor model and the sensor array are ready for subsequent forward % leadfield computations. It takes care of some pre-computations that can % be done efficiently prior...
ed6f1083cbd070913eb66bc1f4678b4c31ee385b821ca4d1bdcb9349e3e4ac48
MATLAB
26,206
457
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
84240e02397e14080a11db2d11b76acb69a07e08a9fe52fa4dcbf25c983478b8
MATLAB
26,242
537
clear all; clc % Change directory to path where sosp_vaso git has been cloned cd /home/amonreal/Documents/PhD/PhD_2023/AROMA/publications/sosp_vaso/github/3D_SOSP_fMRI/ addpath(genpath("./pulseq/functions")) %% Adding paths addpath(genpath("./pulseq/functions")) % Functions to...
fb6a51d79d42b2c557d0a7f89216f1ae3db6b66963f8573d97cbbbf9b6f2a195
MATLAB
26,298
951
function output=model_ToRORd_Land(t,X,flag_ode, cellType, ICaL_Multiplier, ... INa_Multiplier, Ito_Multiplier, INaL_Multiplier, IKr_Multiplier, IKs_Multiplier, IK1_Multiplier,IKCa_Multiplier, IKb_Multiplier,INaCa_Multiplier,... INaK_Multiplier, INab_Multiplier, ICab_Multiplier, IpCa_Multiplier, ICaCl_Multiplier...
d75f5302879c99e61993f8f682abf704ebb9b97365b1f4fd6285f78b71da6228
MATLAB
26,354
576
% PLSR_forRunAnalysis.m % Sarah West % 6/6/22 % A wrapper that runs the Matlab function plsregress_fullcode via RunAnalysis.m function [parameters] = PLSR_forRunAnalysis_Inverted(parameters) % *** Inputs *** % parameters.dataset.explanatoryVariables -- % parameters.dataset.responseVariables -- % pa...
e509c9b9718eec88e51642d5ace0f684ae78dd1d7d7c2c31906854785d2f852d
MATLAB
26,374
590
function fg=y_spm_image(op,varargin) % image and header display % FORMAT y_spm_image %_______________________________________________________________________ % % y_spm_image is an interactive facility that allows orthogonal sections % from an image volume to be displayed. Clicking the cursor on either % of the ...
0e09a94860c709c8c6af1b6618397ef8d350f8b069db89b165748b124e4d8c97
MATLAB
26,388
819
function [xfinal,ffinal,exitflag,xstart] = rmsearch(fun,optname,x0,LB,UB,varargin) % RMSEARCH: Randomly multistarted overlay to several optimizers % usage: [xfinal,ffinal,exitflag,xstart] = RMSEARCH(fun,optname,x0,LB,UB) % usage: [xfinal,ffinal,exitflag,xstart] = RMSEARCH(fun,optname,x0,LB,UB,prop1,val1,prop2,val2,...)...
b137224244a5d0e4f96fe96d096de06e70a911a2a0bc198ca43122deaa8055da
MATLAB
26,400
718
% create_conditions_names.m % Sarah West %% Parameters for directories clear all; % Time for continued time chunks, in seconds. continued_chunk_length = 1; experiment_name=['Random Motorized Treadmill\']; dir_base='Y:\Sarah\Analysis\Experiments\'; dir_exper=[dir_base experiment_name '\']; dir_out=dir_exper; mkdi...
0776d7a3f419b086a8951a01c1a46a13bc8a7fc3e88bdd9181872b8fe1defb65
MATLAB
26,436
592
function [cfg] = ft_interactiverealign(cfg) % FT_INTERACTIVEREALIGN allows the user to interactively translate, rotate and scale an % individual geometrical object to a template geometrical object. It can for example be used % to align EEG electrodes to a model of the scalp surface. % % Use as % [cfg] = ft_interacti...
75e38fe9f4c04a8da7ddaad47a68b501ef6d0bcc7cc74c019831ca59428ae51d
MATLAB
26,503
776
function [pipeline] = ft_analysispipeline(cfg, data) % FT_ANALYSIPIPELINE reconstructs the complete analysis pipeline that was used to create % the input FieldTrip data structure. The pipeline will be visualized as a flowchart. % In the future it will be possible to output the complete pipeline as a MATLAB script % or...
451cc123305c5a1f4ce4e46983856bd73639644678d0135067dc7c7f9166b61d
MATLAB
26,533
541
function [header] = read_4d_hdr(datafile, configfile) % hdr=READ_4D_HDR(datafile, configfile) % Collects the required Fieldtrip header data from the data file 'filename' % and the associated 'config' file for that data. % % Adapted from the MSI>>Matlab code written by Eugene Kronberg % Copyright (C) 2008-2009, Centre...
a9da8f098b63327bfc98124a9e4d84974d15929d3e901abe4b8b279757a7be35
MATLAB
26,540
662
classdef ScrollingPanel < uix.Container & uix.mixin.Panel %uix.ScrollingPanel Scrolling panel % % p = uix.ScrollingPanel(p1,v1,p2,v2,...) constructs a scrolling panel % and sets parameter p1 to value v1, etc. % % A scrolling panel is a standard container (uicontainer) that shows % one i...
ac1df58ad6e44cd946a057a1871c50bd65ad54fe747cf4c235727e4d336b0e0f
MATLAB
26,551
958
function output=model_ToRORd_Land_diffusion_current(t,X,flag_ode, cellType, ICaL_Multiplier, ... INa_Multiplier, Ito_Multiplier, INaL_Multiplier, IKr_Multiplier, IKs_Multiplier, IK1_Multiplier,IKCa_Multiplier, IKb_Multiplier,INaCa_Multiplier,... INaK_Multiplier, INab_Multiplier, ICab_Multiplier, IpCa_Multiplier...
7fb4da30845fac3eea9814167a824e30633d43d9a5eed5ba57d9997d7a14d990
MATLAB
26,584
728
function prepro_proto(LAN) global fig_eeg; global fig_chan; global fig_control; global fig_tsm; time_win = 1; time_start = 0; time_trial = 1; chansel = 1:LAN.nbchan; chansel_ts = 1:LAN.nbchan; str_chan = cat(2,'1:',num2str(LAN.nbchan)); chanhighlight = 0; gapsize = 3* mean( std(LAN.data{1},[],2) , 1); resizefact = 1;...
e93877aaa28b58b49575f2ab23402d729ef532d48d1143d53ae7e17e8ec8159b
MATLAB
26,599
726
function elife_BH_test clear all num_events = 10000; num_cells = 10; noise = 0; % Generate random neuronal sequence with each neuron firing 1,2 or 3 spikes for i=1:num_events spikes1 = []; s = RandStream('dsfmt19937','Seed',i); % Set random seed for resampling spikes1 = randperm(s,num_cells); spike...
6155656509ceff7c8cc678725d3ad8b5f9fa829bae6bd709137b8fbd6e1b5c4f
MATLAB
26,735
529
function print2eps(name, fig, export_options, varargin) %PRINT2EPS Prints figures to eps with improved line styles % % Examples: % print2eps filename % print2eps(filename, fig_handle) % print2eps(filename, fig_handle, export_options) % print2eps(filename, fig_handle, export_options, print_options) % %...
427bd395e48611a53c4ceb59787da0b0948d0aa9b876748cc4ccc24cd701c351
MATLAB
26,760
953
function output=model_ToRORd_step_stimulus(t,X,flag_ode, cellType, ICaL_Multiplier, ... INa_Multiplier, Ito_Multiplier, INaL_Multiplier, IKr_Multiplier, IKs_Multiplier, IK1_Multiplier,IKCa_Multiplier, IKb_Multiplier,INaCa_Multiplier,... INaK_Multiplier, INab_Multiplier, ICab_Multiplier, IpCa_Multiplier, ICaCl_M...
0dd5a7d6bf127d134b45df5e04116904795cb6cd0f4bc9859ad9d6dca2986612
MATLAB
26,803
954
function output=model_ToRORd_diffusion_current(t,X,flag_ode, cellType, ICaL_Multiplier, ... INa_Multiplier, Ito_Multiplier, INaL_Multiplier, IKr_Multiplier, IKs_Multiplier, IK1_Multiplier,IKCa_Multiplier, IKb_Multiplier,INaCa_Multiplier,... INaK_Multiplier, INab_Multiplier, ICab_Multiplier, IpCa_Multiplier, ICa...
5bd1844b79cc29e5182b079913cc34f5d72d40cb3111788615229342f8e6b6af
MATLAB
26,822
954
function output=model_ToRORd_step_stimulus(t,X,flag_ode, cellType, ICaL_Multiplier, ... INa_Multiplier, Ito_Multiplier, INaL_Multiplier, IKr_Multiplier, IKs_Multiplier, IK1_Multiplier,IKCa_Multiplier, IKb_Multiplier,INaCa_Multiplier,... INaK_Multiplier, INab_Multiplier, ICab_Multiplier, IpCa_Multiplier, ICaCl_M...
99f7d1935dff3a154dbddb6728d19c301adb0d3fed5893e91d8a1ce089ca51d9
MATLAB
26,844
698
function varargout = DPABI_DCMSORTER_TOOL(varargin) % DPABI_DCMSORTER_TOOL MATLAB code for DPABI_DCMSORTER_TOOL.fig % DPABI_DCMSORTER_TOOL, by itself, creates a new DPABI_DCMSORTER_TOOL or raises the existing % singleton*. % % H = DPABI_DCMSORTER_TOOL returns the handle to a new DPABI_DCMSORTER_TOOL or t...
508a88afd65ae0aa5a024d3cac1ccb53bde1fce92c78b19f5b5ec75ff1ad3eee
MATLAB
26,850
954
function output=model_ToRORd_step_stimulus_rescaled_IKs_60_percent_GKr(t,X,flag_ode, cellType, ICaL_Multiplier, ... INa_Multiplier, Ito_Multiplier, INaL_Multiplier, IKr_Multiplier, IKs_Multiplier, IK1_Multiplier,IKCa_Multiplier, IKb_Multiplier,INaCa_Multiplier,... INaK_Multiplier, INab_Multiplier, ICab_Multipli...
411e2e6189ce29991f24446a4c615edb5df06aa5047df85d3ba4c206759e183d
MATLAB
26,854
631
%{ Copyright (c) 2025 Axion BioSystems, Inc. Contact: support@axion-biosystems.com All Rights Reserved %} classdef AxisFile < handle & matlab.mixin.CustomDisplay %AXISFILE: Class that holds all Data for a loaded Axion 1.X File % % Calling A = AxisFile('filename.raw') or AxisFile('filename.spk') ...
b4cf7f705fa3ce604dd4396aa210cae8ca1ddfca5a45ff3a2947dd38d06d7015
MATLAB
26,883
554
function [O_error, O_grad]=bspline_registration_gradient(O_grid,sizes,Spacing,I1,I2,options,MaskI1,MaskI2,Points1,Points2,PStrength) % Function registration_gradient. This function will calculate a registration % error value and gradient after b-spline non-rigid registration % of two images / volumes. % % [error, ...
14f234a5905426a7a4897c1d41421e95c5ef47abe4b6aedf0cda9956bc92ccac
MATLAB
27,018
600
function [out,pkLocOn_all,unilateralStim,fNumOut] = plotObs(obs_allFlies,meta) warning('off','signal:findpeaks:largeMinPeakHeight') gender_allFlies = meta.gender; stimIntensity_allFlies = meta.stim.Intensity; stimFileName_allFlies = meta.stim.FileName; stimColor_allFlies = meta.stim.Color; flyID_allFlies = repm...
11051d18eaeead39d243eee8972b840f6c437b5b51739dc47d723e881620d12d
MATLAB
27,041
712
function varargout = DPABI_ICC_TOOL(varargin) % DPABI_ICC_TOOL MATLAB code for DPABI_ICC_TOOL.fig % DPABI_ICC_TOOL, by itself, creates a new DPABI_ICC_TOOL or raises the existing % singleton*. % % H = DPABI_ICC_TOOL returns the handle to a new DPABI_ICC_TOOL or the handle to % the existing singleton...
de8a590ef2ed248c4884605a76ab31331a64fec6bc208ae27c79fa8ecd8bc0c5
MATLAB
27,058
780
classdef BoxPanel < uix.Panel & uix.mixin.Panel %uix.BoxPanel Box panel % % p = uix.BoxPanel(p1,v1,p2,v2,...) constructs a box panel and sets % parameter p1 to value v1, etc. % % A box panel is a decorated container with a title box, border, and % buttons to dock and undock, mini...
521f196dfe695eb1cb557e1e7549acedb6b5025333b4e38891f56afb7dae319c
MATLAB
27,083
956
function output=model_ToRORd_diffusion_current_rescaled_IKs(t,X,flag_ode, cellType, ICaL_Multiplier, ... INa_Multiplier, Ito_Multiplier, INaL_Multiplier, IKr_Multiplier, IKs_Multiplier, IK1_Multiplier,IKCa_Multiplier, IKb_Multiplier,INaCa_Multiplier,... INaK_Multiplier, INab_Multiplier, ICab_Multiplier, IpCa_Mu...
8e35c878bd3f76cd80b6bcefbc50c9847784b45f2ee0b4e9c17a0f9026b962e6
MATLAB
27,094
541
%% % ================= SACCADE ANALYSIS ================= %% clear all; close all; clc; addpath('C:\toolbox\edfImport1.0.5\') ET_details = {}; %% for s = 1:21 if s < 10 sub = strcat('P0',num2str(s)); else sub = strcat('P',num2str(s)); end dir_files = strcat(...
f96cd6047b2f891a591efa2a1b7f7be4d62b05e3abe10cd86d8e52ee82bc9d1b
MATLAB
27,098
956
function output=model_ToRORd_diffusion_current_rescaled_IKs_60_percent_GKr(t,X,flag_ode, cellType, ICaL_Multiplier, ... INa_Multiplier, Ito_Multiplier, INaL_Multiplier, IKr_Multiplier, IKs_Multiplier, IK1_Multiplier,IKCa_Multiplier, IKb_Multiplier,INaCa_Multiplier,... INaK_Multiplier, INab_Multiplier, ICab_Mult...
9df058deb2264405e08d6ef8d3a6b60987bc7caad411a834af26fa3443d230e3
MATLAB
27,123
602
classdef Quattrodlg < matlab.apps.AppBase % Properties that correspond to app components properties (Access = public) UIFigure matlab.ui.Figure pathname matlab.ui.control.EditField CheckBox_M4 matlab.ui.control.CheckBox CheckBox_M3 matlab.ui...
2bc00fc7bea9b0a965e055d4af08c5302230c7cf0e11625b5680ca117b09370a
MATLAB
27,138
642
function [source] = ft_dipolefitting(cfg, data) % FT_DIPOLEFITTING perform grid search and non-linear fit with one or multiple % dipoles and try to find the location where the dipole model is best able % to explain the measured EEG or MEG topography. % % This function will initially scan the whole brain with a single ...
8a6b5015b4e049fd45fc5f160fd32933c38f3aa1924677b4ff9cdf27ffc69dda
MATLAB
27,176
580
function varargout = FieldmapFormat(varargin) % FIELDMAPFORMAT MATLAB code for FieldmapFormat.fig % FIELDMAPFORMAT, by itself, creates a new FIELDMAPFORMAT or raises the existing % singleton*. % % H = FIELDMAPFORMAT returns the handle to a new FIELDMAPFORMAT or the handle to % the existing singleton...
5c6c46b27135d7c68f53ba4a9cdd747c77c5a858f6625ffabb32453c3951033b
MATLAB
27,191
642
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...
c58f74a3e0a75f880fd1683e89b313ef21c28dea00b74860aa27bde2605223ba
MATLAB
27,201
662
classdef ScrollingPanel < uix.Container & uix.mixin.Panel %uix.ScrollingPanel Scrolling panel % % p = uix.ScrollingPanel(p1,v1,p2,v2,...) constructs a scrolling panel % and sets parameter p1 to value v1, etc. % % A scrolling panel is a standard container (uicontainer) that shows %...
81e32851108bcec563223456be7a5cbb3efe6dacb83d90124b821cfb5042f430
MATLAB
27,204
637
function [cfg] = ft_multiplotER(cfg, varargin) % FT_MULTIPLOTER plots the event-related potentials or event-related fields verus % time, or the oscillatory activity (power or coherence) versus frequency. Multiple % datasets can be overlayed. The plots are arranged according to their location % specified in the layout....
a1fee73d2afe28e8b473bcf5552449f3546837c955dc908110a83ee14f8da760
MATLAB
27,205
923
% Copyright (c) Hugo Gävert, Jarmo Hurri, Jaakko Särelä, and Aapo Hyvärinen. % 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 vers...
369e05cfa7911711a1bb718d9f06ef4aafa0044a523b29f4a94004f44ad38078
MATLAB
27,260
698
function [interp] = ft_sourceinterpolate(cfg, functional, anatomical) % FT_SOURCEINTERPOLATE interpolates source activity or statistical maps onto the % voxels or vertices of an anatomical description of the brain. Both the functional % and the anatomical data can either describe a volumetric 3D regular grid, a % tri...
705e1c1f60673bd02c5dc120867dd859f139962cc425d17495d559d42a5ce619
MATLAB
27,265
843
function [z,s,exitflag] = smoothn(varargin) %SMOOTHN Robust spline smoothing for 1-D to N-D data. % SMOOTHN provides a fast, automatized and robust discretized spline % smoothing for data of arbitrary dimension. % % Z = SMOOTHN(Y) automatically smoothes the uniformly-sampled array Y. Y % can be any N-D noisy a...
7060fa9c6216f6e4d52876f0285a418d989ad5a399ecb1d182f8290635e185cb
MATLAB
27,282
775
function [cfg] = ft_checkconfig(cfg, varargin) % FT_CHECKCONFIG checks the input cfg of the main FieldTrip functions % in three steps. % % 1: It checks whether the cfg contains all the required options, it gives % a warning when renamed or deprecated options are used, and it makes sure % no forbidden options are used....
4dfb29be5261f7b63eba80a5ead496693e8deceb6e5bfd53348e79fb4ed6a8a7
MATLAB
27,303
652
classdef CompareTrackersController < handle % Owns the figure, dropdowns, threshold edit, and listbox for the % Compare Trackers... window. properties (Access=private, Transient) % private by convention labelerController_ % parent controller labeler_ % Labeler model_ % CompareTrackersModel fi...
3bf494a014b654eae68d8fc2d97fc46fb76c66102d4a78984522885764423cf6
MATLAB
27,312
586
function headshape = prepare_mesh_cortexhull(cfg) % PREPARE_MESH_CORTEXHULL creates a mesh representing the cortex hull, i.e. % the smoothed envelope around the pial surface created by FreeSurfer % % This function relies on the FreeSurfer and iso2mesh software packages % % Configuration options: % cfg.headshape =...
e878308691c67aa144534c1a7dc7e8f587041538b79b9995d76c7a27ffdb4675
MATLAB
27,313
680
function [dipout] = beamformer_dics(dip, grad, headmodel, dat, Cf, varargin) % BEAMFORMER_DICS scans on pre-defined dipole locations with a single dipole % and returns the beamformer spatial filter output for a dipole on every % location. Dipole locations that are outside the head will return a % NaN value. % % Use as...
033a1f0c44c2ac41d8f7b668c20069735ba4427c42a34f6aee2273ecaf656c4b
MATLAB
27,322
774
function varargout = VBA_spm_mesh_render(action,varargin) % Display a surface mesh & various utilities % FORMAT H = spm_mesh_render('Disp',M,'PropertyName',propertyvalue) % M - a GIfTI filename/object or patch structure % H - structure containing handles of various objects % Opens a new figure unless a 'p...
aba76c4e72142d518666b6233a7756a782b5a0cbe1904cad27980d476cb1bb4d
MATLAB
27,346
723
function varargout = combat_settings(varargin) % COMBAT_SETTINGS MATLAB code for combat_settings.fig % COMBAT_SETTINGS, by itself, creates a new COMBAT_SETTINGS or raises the existing % singleton*. % % H = COMBAT_SETTINGS returns the handle to a new COMBAT_SETTINGS or the handle to % the existing si...
245898a65197133dbcd758c5994395e051f485f5379085d534c7e508a4983bf6
MATLAB
27,380
442
function [] = spearman_shuffled_data_re_analysis(folders,option) if strcmp(option,'global_remapped') data_folders = 'global_remapped'; elseif strcmp(option,'place_field_shifted') data_folders = 'place_field'; elseif strcmp(option,'spike_train_shifted') data_folders = 'spike_train'; elseif strcmp(option,'cr...
2817fc3ee763045548bcc291a6761eaa2fb95876edf3c019aa2e52f14907279a
MATLAB
27,425
630
function populateSOI(this, SOI, varargin) % populate SOI for spherelikeFitter % % populateSOI(SOI) % populateSOI(SOI, t) % % if SOI is dynamic, time needs to be provided % populate SOI object by computing desired charts and arrange them in % the strucutres from the diffgeometry sec...
5d0f3f3e340f2323621c5accb62cd43f82689a630611255547da654ddfe93174
MATLAB
27,589
936
%% close all force; clear classes; clc %% addpath f:\repo\apt6\gt addpath f:\repo\apt6\gt2sh\ %% Load GT results and KB orig GT tables tGT = loadSingleVariableMatfile('cpr_gtres_v00.mat'); sgt = load('SelectedGTFrames_SJH_20180603.mat'); tFrms2Lbl = sgt.frames2label; %% assert(strcmp(tGT.Properties.VariableNames{1},...
6a73c1f4faf1ef27194fd48c4409f77111803bf6354afb09fbf8548cee3612c0
MATLAB
27,594
364
function DPABI_TDA_run(Cfg) % FORMAT DPABI_TDA_run(Cfg) % Perform temporal dynamics analysis and concordance analysis % Input: % Cfg - the parameters for temporal dynamics analysis. % Output: % The processed results that you want. %___________________________________________________________________________ % Writte...
338c1d7b5ccfa6d88d7348b2f6995d1267fe034d9b7c42e9a4652536114091ec
MATLAB
27,693
696
%% xtDataCell Class (OOP) % Class for manipulating X(t) and interconverting. % Designed for use within the SDO Analysis Toolkit % xtDataCell class used here to contain/operate on time series type data; %_______________________________________ % Copyright (C) 2023 Trevor S. Smith % Drexel University College of Medic...
04399b65718f746f47446594c64634e9d8c6acbd43e8422ae054f02eaaf8b3bb
MATLAB
27,707
687
function [cfg, Lag] = runGLAD(cfg) % This function runs the Lagrangian postprocessing. addpath('./analyzeFlows','./Inverse','./Sensitivities',genpath('./utilities')); %% fprintf('\n =============== Lagrangian Post-processing Starts ===============\n') fprintf('_________________________________________________________...
59fd65c2f603fac3487a7c091ec2336b2c89fd4df204ee813a60f9c05f7de42c
MATLAB
27,719
685
function [dipout] = beamformer_dics(dip, grad, headmodel, dat, Cf, varargin) % BEAMFORMER_DICS scans on pre-defined dipole locations with a single dipole % and returns the beamformer spatial filter output for a dipole on every % location. Dipole locations that are outside the head will return a % NaN value. % % Use as...
0bbf600b74553909c7a68a85f93661bab87e35f34afc1ac0a78e8bda9c5731a4
MATLAB
27,725
492
function [] = ground_truth_log_odd_analysis(folders,timebin,BAYSESIAN_NORMALIZED_ACROSS_TRACKS) % Input: % Folders: Each Folder is data for a session % Timebin: 0.02 or 1 % 0.02 -> 20ms time bin % 1 -> 1 event time bin % posbin: [] or 1 % [] -> 20 position bin per track (will load extracted_place_field_BAYESIAN) % 1 ->...
1b3fed6745927db56fbb6f4abf4982181daf20559c82274d9fe9d20a7fe8c09f
MATLAB
27,834
591
classdef ThorlabsPowerMeter < matlab.mixin.Copyable %ThorlabsPowerMeter Matlab class to control Thorlabs power meters % Driver for Thorlabs power meter % It is a 'wrapper' to control Thorlabs devices via the Thorlabs .NET % DLLs. % % User Instructions: % 1. Download the Optical Pow...
d1c2973dc0c04fdc41bebe4d43b0215ddaeabd7b3e8199a6f97f6ce5f357ebf6
MATLAB
27,864
679
function RT = lan_detect_freq_event(LAN, cfg ) % v.0.1.4 % % detect frequiency events in some % channels : cfg.chan = [ch1 ,...] ; e.g. [3 4 5 ] % frequency band : cfg.freq = [f1 f2] ; e.g. [80 200] % minimun time duration : cfg.time = [ms] ; e.g [20] % power threshould ...
4801efed97280e84472d659bfba5dd9b16a6b81791f2864876ae1af8bced401e
MATLAB
27,873
533
function EpisodicImageChecker1(StatusFig,Flagged_Episodes,LastEpisodeNumber,Temp_ImageArray_FirstImages,Temp_ImageArray_Peak_DeltaF,Temp_ImageArray_End_DeltaF,MeanStartingFluorescenceVector,Temp_ImageArray_Peak_DeltaFMaxVector,Temp_ImageArray_End_DeltaFMaxVector) warning on all warning off verbose warning ...
e532c693cd60c9794db5528f6dabd9cd9580121777412b5cd382cde66dde2727
MATLAB
27,908
804
function [hImage, hText, hXText] = heatmap(mat, xlab, ylab, textmat, varargin) % HEATMAP displays a matrix as a heatmap image % % USAGE: % [hImage, hText, hTick] = heatmap(matrix, xlabels, ylabels, textmatrix, 'param', value, ...) % % INPUTS: % * HEATMAP displays "matrix" as an image whose color intensities refl...
758b55a935fe20668c19a6ecb66821a2501808dabdda6d56fe6dfd4797e8c36f
MATLAB
28,019
575
% pop_runica() - Run an ICA decomposition of an EEG dataset using runica(), % binica(), or another ICA or other linear decomposition. %% NWB adjusted to output "NonConvergence=1" if fastica_symm does not converge (which causes issues with ICA cleaning) % Usage: % >> OUT_EEG = pop_runica( EEG ...
1723f0ddb4edb4d7e9775cc9aaa4c34de85dfcce487abdfccfb1deec7fc82cc8
MATLAB
28,054
853
function [samples, stats, structArray] = matjags(dataStruct, jagsFilenm, initStructs , varargin) % MATJAGS, a Matlab interface for JAGS % Version 1.1. Tested on JAGS 3.0.0, Windows 64-bit version % % This code has been adapted from MATBUGS that was written by Kevin Murphy and Maryam Mahdaviani % % [samples, stats...
9a0c07fa8293a50b432ff837e4c9416acf545777c44fa3f26787c5247cac3402
MATLAB
28,124
496
%_______________________________________________________________________ % % Configuration for running StateSwitch experiment %_______________________________________________________________________ % % Output % % expInfo | configuration for state switch word version (struct) % Written by Julian Kosciessa (kosciessa@m...
3292c651ab730fdd976439ca20308e0e88d6b76c207ebd8cbe680c42c29e1cc0
MATLAB
28,137
839
function im = metamerSynthesis(params,seed,m,opts) % %----------------------------------------- % metamerSynthesis(params,seed,m,opts) % % generates an image matched to a set of % statistical parameters computed within % a set of tiling regions defined by window functions % (see metamerParams.m and metamerAnalysis.m) ...
6e1299a24ee26fc3acf0853e8c6b1a1ab533d2e2dfcb578f3a7e32c57379ee3a
MATLAB
28,176
681
function [stat, cfg] = statistics_wrapper(cfg, varargin) % STATISTICS_WRAPPER performs the selection of the biological data for % timelock, frequency or source data and sets up the design vector or % matrix. % % The specific configuration options for selecting timelock, frequency % of source data are described in FT_T...
7c7ffcab1ab84e0260bb6c82ebb229908faf20504d4fc4f2550ccac483906665
MATLAB
28,176
681
function [stat, cfg] = statistics_wrapper(cfg, varargin) % STATISTICS_WRAPPER performs the selection of the biological data for % timelock, frequency or source data and sets up the design vector or % matrix. % % The specific configuration options for selecting timelock, frequency % of source data are described in FT_T...
1e103248a5f9e0e41d0c01012a7b684048d5c62f58c8661ae1e2d8ea941f4bd8
MATLAB
28,193
669
function varargout = DPABISurf_ROIList(varargin) % DPABI_ROILIST MATLAB code for DPABI_ROIList.fig % DPABI_ROILIST, by itself, creates a new DPABI_ROILIST or raises the existing % singleton*. % % H = DPABI_ROILIST returns the handle to a new DPABI_ROILIST or the handle to % the existing singleton*. ...
eb24a414c375d99ee25210e83938f65444d4f21ddea9b56d2caf36874470a95c
MATLAB
28,269
562
function interpret_PLS(result, numSubj, numCond, numGroups, numTrials, numSources, numSamples, numDataPoints, network, fb_interest) %% if network.pls.method == 1 || network.pls.method == 4 if network.pls.method == 4 [task_range,~]=size(result.TBv{1,1}); u=result.u(:,1:task_range); v=result...
971fc718b7970830b4a200ffd4030b20fd1dd306722a1c7dc1d37c12ed5cf5ce
MATLAB
28,297
498
%_______________________________________________________________________ % % Configuration for running dotsExperiment %_______________________________________________________________________ % % Output % % expInfo | configuration for state switch MAT (struct) % Written by Julian Kosciessa (kosciessa@mpib-berlin.mpg.de...
80d6b0a8770b3e059f64d9afbd14d3ae13e696c95650578a1246090153c22ffe
MATLAB
28,304
668
function [status] = ft_hastoolbox(toolbox, autoadd, silent) % FT_HASTOOLBOX tests whether an external toolbox is installed. Optionally % it will try to determine the path to the toolbox and install it % automatically. % % Use as % [status] = ft_hastoolbox(toolbox, autoadd, silent) % % autoadd = 0 means that it will ...
de5c499336ee7c402c011204bc4e891789e1cc2ff8dab77d7720aeddb63a8789
MATLAB
28,413
620
%{ Copyright (c) 2025 Axion BioSystems, Inc. Contact: support@axion-biosystems.com All Rights Reserved %} %DATASET: Handle by which data is laoded from an Axion File. % VersionMajor: Writing version (Major number) that was used to % serialize this BlockVector. % % VersionMinor: Writing version (Minor...
064a7e32be0913a37babcd3816050bddf165408e5314ca66b8c6f87dcd933c9d
MATLAB
28,452
657
function [source] = ft_dipolefitting(cfg, data) % FT_DIPOLEFITTING perform grid search and non-linear fit with one or multiple % dipoles and try to find the location where the dipole model is best able % to explain the measured EEG or MEG topography. % % This function will initially scan the whole brain with a single ...
2a330d43045170d3ff562e10c4a6d53ec2f88c5a5ab5d2ef9172cf02b20bd517
MATLAB
28,459
740
classdef ParameterSetupModalController < handle % Controller for the modal dialog used to set training or tracking % parameters. The dialog is modal, but the constructor returns as soon as % the dialog is up. When the user clicks Apply, the dialog writes the new % parameters to the Labeler itself; on Cancel t...
fe4823e95052abcf4d6569ca8322f002d01b231b0402831e9a1b869cb19656b9
MATLAB
28,465
570
function interpret_PLS(result, numSubj, numCond, numGroups, numTrials, numSources, numSamples, numDataPoints, network, fb_interest) %% if network.pls.method == 1 || network.pls.method == 4 if network.pls.method == 4 [task_range,~]=size(result.TBv{1,1}); u=result.u(:,1:task_range); v=result...
0d47f8989549ed36c4a1bc6e6d41cd12de42bd407c8e8ba79967483185dde163
MATLAB
28,486
692
classdef CompareTrackersModel < handle % Holds computed data about bouts of frames where a reference tracker % and a test tracker disagree, for the current movie. properties (Access=private) quantileThreshold_ = 0.99 % scalar double, the quantile threshold (0-1) for filtering bouts. matchDistanceTh...
8761b34359f9ea6a83b48873ca3ad52fce837d314c424c91819c43c229ea5213
MATLAB
28,496
664
function [Ireg,O_trans,Spacing,M,B,F] = image_registration(Imoving,Istatic,Options) % This function image_registration is the most easy way to register two % 2D or 3D images both affine and nonrigidly. % % Features: % - It can be used with images from different type of scans or modalities. % - It uses both a rigi...