sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
90846367a29dcc6b67cd3fe965ca76f118f38504b409738e8bc00bb7d58917d8
MATLAB
28,497
508
%_______________________________________________________________________ % % Configuration for running StateSwitch experiment %_______________________________________________________________________ % % Output % % expInfo | configuration for state switch word version (struct) % Written by Julian Kosciessa (kosciessa@m...
3f72cc9f328b690e172af09857c01d93a5228efe5983300f8a79676355762d0d
MATLAB
28,637
797
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 ...
136550a5dc167cfb10f0c52978987764bbdd1e9eb4080a1ff69d4485dfa7f549
MATLAB
28,738
690
function [ avw, machine ] = avw_img_read(fileprefix,IMGorient,machine,verbose) % avw_img_read - read Analyze format data image (*.img) % % [ avw, machine ] = avw_img_read(fileprefix,[orient],[machine],[verbose]) % % fileprefix - a string, the filename without the .img extension % % orient - read a specified orientatio...
a75628e923bffee8b09d87cc72053b4ba84339029bfa445533ee60b7f64295a2
MATLAB
28,844
470
%% muscle GCaMP 1P imaging for seeing inhibition of high pre-stim activity as in Extended Data Fig. 8b-c % This works with folder arrangement as in glue muscle imaging subFolders = dir(pwd); realSubFolders = subFolders([subFolders.isdir]'); realSubFolders = realSubFolders(3:end); % remove unwanted folders like...
0ce491d09dfd47bd5c5ae5ed06bbee7f6947873ff385afa3392e8d5d95519a99
MATLAB
28,874
968
function mwizard(file) %MWIZARD - M2HTML Graphical User Interface % MWIZARD launches a Matlab GUI front-end to edit parameters % that are then used by M2HTML to generate HTML documentation. % MWIZARD(FILE) allows to specify a mat-file FILE from which % default parameters are extracted and can be updated. % % For...
ca7b3446f602f78b811d477e6db4dee10231be9b210aa2606048a37a3e31f957
MATLAB
28,906
1,039
%% input args DATASET = 'sh'; switch DATASET case 'bub' ppbasefile = 'ppbase.mat'; outdir = 'mftsbub_out_20181101T090301'; ppbase = load(ppbasefile); lblfile = ppbase.lblfile; ld = load(lblfile,'-mat'); hmdirs = ppbase.lblfilehmdirs; case 'sh' outdirs = { 'out_1_90_20181108T083...
4001f931960a1236830ee5f66a57a04a2ff4d6f374da3cce890b7c81d794881e
MATLAB
28,911
655
function [EEG] = PAA(EEG,ChOI,badData,allSleepStages,badSleepstages,lightsTags) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This function performs Period Amplitude Analysis (PAA) on EEGlab data to % detect and measure slow waves. The events are marked on the EEG, saved % as a new da...
f861c2417a4473fcfc7bf7d240a87be475c4e5658fdabff1de25c2f9e772795b
MATLAB
28,942
513
%_______________________________________________________________________ % % Configuration for running StateSwitch experiment %_______________________________________________________________________ % % Output % % expInfo | configuration for state switch word version (struct) % Written by Julian Kosciessa (kosciessa@m...
c64727145cf1682ed50404369f8ec8f7bff21a08d44a65f99ba2dbc6fd357708
MATLAB
29,012
542
%To Do %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
49641589b30182ed3549ad39db98e00401155ea2c4ef4762bebdb48c1d01367b
MATLAB
29,020
810
%EXPORT_FIG Exports figures suitable for publication % % Examples: % im = export_fig % [im alpha] = export_fig % export_fig filename % export_fig filename -format1 -format2 % export_fig ... -nocrop % export_fig ... -transparent % export_fig ... -native % export_fig ... -m<val> % export_fig ... -r<val...
a267cbec080e24359ebdb1857b699e9a7c716da411e096ff2a3cf90946290862
MATLAB
29,028
623
function boney = tbx_cfg_boney % Configuration file for boney toolbox batches. % _________________________________________________________________________ % ###### Please write more about this ... % _________________________________________________________________________ % Robert Dahnke 2023 % %#ok<*AGROW,*INUSD> g...
8cae71a5a93b59b3665c5235db58a3a246879f34c50d91c6add451bcb093a84a
MATLAB
29,098
859
function [group,fittedP,stats] = meg_plotPhaseHistogram(mdlFit,paramNames,figDir,mdlFitType) % function meg_plotPhaseHistogram(mdlFit,figDir,mdlFitType) % mdlFitType can be 'separate' 'yoked_fixedFreq' 'yoked' %% Setup plotFigs = 1; saveFigs = 1; edges = 0:pi/24:2*pi; % 24 bins, try 12 bins -pi to pi? to match the bo...
e2f65ce61afe16b7808be1a0e5cabc948309bd38e99a21ce532390b1c37cd139
MATLAB
29,111
601
% This function takes a subregional spike and port structure and first % creates a GLM predictor variable matrix containing the levels of the % Sample Identity, Choice Identity, and Outcome Identity predictor % variables for each neuron based on the session that neuron came from. % It also creates a 200ms time bin ...
65af41fbd03eecfc2586962da9f217db678a5e1fbe2ba3b1123b788fef166131
MATLAB
29,171
906
function MakeQTMovie(cmd,arg, arg2) % function MakeQTMovie(cmd, arg, arg2) % Create a QuickTime movie from a bunch of figures (and an optional sound). % % Syntax: MakeQTMovie cmd [arg] % The following commands are supported: % addfigure - Add snapshot of current figure to movie % addaxes - Add snapshot of curre...
97c23947b8b356f6881eb38f2f3193babb7813ce726ffca084f47604c3e45e14
MATLAB
29,253
767
% 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 WebDo...
5e5af281b33e41caa6e95cfdd667cb64f25fc1872754808ee037bc3a5e7509f2
MATLAB
29,263
839
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....
0d97b819f03110194df7796d44a73be495ce6e419f039a085209b7b86d658d05
MATLAB
29,307
637
function [S] = Paradigm_MRI(S) % Usage: [S] = Paradigm_MRI(S) % % Inputs: % : S - struct containing very important info (screen, subject, colors, % textures, trigger, response box, eyetracker, etc) % % Outputs: % : S - struct containing time of start, end and trigger of the % stimulation, key presses...
d9ab34a611c71f7f4db0faa13dc12f7440aedfa79ca165b1877658729f7a2e37
MATLAB
29,333
727
classdef meshWrapper < surfaceFitting.surfaceFitter % Generate a SurfaceOfInterest object with atlas containing conformal % charts from an externally produced triangular mesh representation of % a surface. %--------------------------------------------------------------------- % license ...
613d86dd891d8d48b458810aa0307f3a5625c7ac19b07571cc6d9a294b95479c
MATLAB
29,370
747
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...
3f859c087dba452e222b4cf8aff3955765bda19c2d77db0eb4d8f2f2c13a933e
MATLAB
29,404
690
function varargout = DPABINet_GTA(varargin) % DPABINET_CONSTRUCTION MATLAB code for DPABINet_GTA.fig % DPABINET_CONSTRUCTION, by itself, creates a new DPABINET_CONSTRUCTION or raises the existing % singleton*. % % H = DPABINET_CONSTRUCTION returns the handle to a new DPABINET_CONSTRUCTION or the handle t...
5a9456387fbbae2b2c5a1d75f4b35744ff62df2607291c763866cc70a2c9e6c4
MATLAB
29,405
578
function [log_odd] = log_odd_bayesian_analysis(folders,timebin,posbin) % 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 -> 1 position bin per track...
ccdf743c31070d530c2da65cc95227cc4e02613ed0d73d22ded51c1930556c08
MATLAB
29,405
963
function ConvertSpykingCircus2Neurosuite(basepath,basename) % Converts hdf5 files from SpykingCircus into klusters-compatible % fet,res,clu,spk files. Works on all shanks of a recording. Assumes a % 16bit .dat and an .xml file is present in "basepath" (home folder) and % that they are named basename.dat and basename...
1ceca47593e2f093e86e9dc85273583b825633d58f603b562e7fe22861e0ce07
MATLAB
29,445
526
%_______________________________________________________________________ % % Configuration for running dotsExperiment % Note that this is the configuration script for a single attribute during % the training/psychophysics phase of the experiment. % JQK July 2017 (kosciessa@mpib-berlin.mpg.de) %_________________________...
f4a9ad51b349a9373f3639e51e55d92d5422ddf463ae92a35a0c5004054121e4
MATLAB
29,468
803
%EXPORT_FIG Exports figures suitable for publication % % Examples: % im = export_fig % [im alpha] = export_fig % export_fig filename % export_fig filename -format1 -format2 % export_fig ... -nocrop % export_fig ... -transparent % export_fig ... -native % export_fig ... -m<val> % export_fig...
7963dbbc0701f55d34f6e112f4d5f82f09f3efe58d6e9525965591fd71ed1883
MATLAB
29,519
838
function avw_img_write(avw, fileprefix, IMGorient, machine, verbose) % avw_img_write - write Analyze image files (*.img) % % avw_img_write(avw,fileprefix,[IMGorient],[machine],[verbose]) % % avw.img - a 3D matrix of image data (double precision). % avw.hdr - a struct with image data parameters. If % ...
a647d7f299018eb55b1539c9f67efa858c9f00a27a4402adb58771db37150b09
MATLAB
29,523
1,092
clear srcinfo ns = 4000; srcinfo.sources = rand(3,ns); srcinfo.charges = rand(1,ns); nt = 3999; targ = rand(3,nt); eps = 1e-5; ntests = 54; ipass = zeros(ntests,1); errs = zeros(ntests,1); ntest = 10; stmp = srcinfo.sources(:,1:ntest); ttmp = targ(:,1:ntest); itest = 1; % Test sources to sources, charge, pot pg ...
5a0e6be865c1eab16519dddb7ddb33c54d669b3c20f67c08568a2f5f87da42ae
MATLAB
29,537
696
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 ...
9b067dceed8e106a0fa9e0f41b2dfa67a9fbc226fdf819548329f90ca9b322a3
MATLAB
29,574
679
function [accuracy,accuracy2,responseData_group] = group_analysis (subjects,runs,dates, plotLevel) rootDir = pathToExpt; nSubj = length(subjects); responseData_group = []; if ~exist('dates','var') date = []; end if ~exist('plotLevel','var') plotLevel = 3; % 1 plot everything --> 3 plot minimal end for n = 1...
7639ae866df1341071f8b72fc5ce9b15ab523d52fa62c636fa65f3e7b20ad339
MATLAB
29,576
522
%_______________________________________________________________________ % % Configuration for running StateSwitch experiment %_______________________________________________________________________ % % Output % % expInfo | configuration for state switch word version (struct) % Written by Julian Kosciessa (kosciessa@m...
b613cc5c236ddb8d9939800f775daead11f417f58ab6fca911ec391c87c08c0c
MATLAB
29,638
844
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% analyze and calibrate random weight and random input dataset (through lay1) load('random_lay01_preprocessed.mat'); nitall = 100000; pd_sz = [5 10]; led_sz = [8 8]; nmask = 10; nsamp = 20; target_neg3 = target_neg2-reshape(zeroim_o...
18879842a619cc88690af883eca0d7c6c0a27e83caebae2780b318a255da817b
MATLAB
29,639
699
function [cfg] = ft_multiplotTFR(cfg, data) % FT_MULTIPLOTTFR plots the time-frequency representations of power or coherence % in a topographical layout. The plots of the indivual sensors are arranged % according to their location specified in the layout. % % Use as % ft_multiplotTFR(cfg, data) % % The data can be a...
72ee6efaf03e73ae261c22e91831408df02eee74d677b38fdba0a22fff362aba
MATLAB
29,679
551
function dualColour_Module() % Use data and listbox as global variables (access from anywhere). global data listbox % Make a new figure, and set its properties. figure(); set(gcf,'name','Colocalization Module','NumberTitle','off','color','k','units','normalized','position',[0.25 0.2 0.5 0.6],'menubar','none','...
3dffc8b87f820d50bb19486a5e7ab7d8b00d597663416144d357bf684f07d836
MATLAB
29,717
767
function AnalyzeFaceScratchMotor() Convert(); % Possible args: {'SUA','Pop','ERA','Decode'}; AllAction(); end function Convert() %% Body spec fn ={}; tl = {}; % filename = {... % '20150318-120247-120401-TextTraining',... % '20150318-120247-121134-TextTraining',... % '20150427-103200-1033...
1804f27b6f7597c04f8c018a172caaa10fa12a0b4d4579e53be8a98a91aa514d
MATLAB
29,761
629
% Example 1 % Script #1 % % Script_01_IMAP_Beta_v2_2c.m % % This script does the following (*): % % - Applies the function RA_equaltrials_Beta_GH001.m to your % previously epoched datasets. % - Creates both individual (equated)averaged ERPs and the grand averaged ERP. % - Exports counting stats per both con...
0a9fd228641d815f92ccd81794e175e1b415ce334716673cbf264e177e2d5e88
MATLAB
29,813
576
function Behavior = LickTaskBehavior(seizurePaths, seizureCell, params, varargin) % this function extracts all the behavioral infromation used later for % analysis. The notation [n] refers to the length n of arrays when % applicable. % INPUTS: % - seizurePaths [nSeizures]: a string array with the full paths to the % ...
3fba21961f036f78c280f4bec865146e3131b8ba6396751916a0ba7505b65b99
MATLAB
29,853
838
function avw_img_write(avw, fileprefix, IMGorient, machine, verbose) % avw_img_write - write Analyze image files (*.img) % % avw_img_write(avw,fileprefix,[IMGorient],[machine],[verbose]) % % avw.img - a 3D matrix of image data (double precision). % avw.hdr - a struct with image data parameters. If % ...
4ee49fd09274688124cbbcec8b8f99c86bcc521f3bd5bac45c04b8d042c0abfe
MATLAB
29,884
881
function jbm_synapsescoringengine(tag,handles) global jbm; global h_img3; global synScore; jbm.scoringData.versionInfo.version = '2.0'; jbm.scoringData.versionInfo.conventions = ['\n\n0 = absent \n1 = shaft (blue) \n2 = spine (purple) \n3 = unsure (cyan) \n4 = spine no psd (yellow) \n\n']...
cb3d3c96ab1e9742f344147a5de7404a55ef6fff3fdf6f5f280ec14af0e40381
MATLAB
29,891
653
function model = simulateHeatDistribution(model) % Simulates temperature evolution due to absorption of light and % diffusion of heat through the cuboid based on output of runMonteCarlo.m. % Also calculates Arrhenius-based thermal damage. % % checking on macOS whether the mex-file is quarantined and cl...
4a9e17bdb6c57f4b4b3988f45caff70ce074169e20adca8eb97edb2cc47c61e6
MATLAB
29,905
873
%% data locations % % DATASET = 3; % % switch DATASET, % % case 1, % experiment_name = '7_7_13_47D05AD_81B12DBD_x_Chrimsonattp18__fly_0019_trial_002'; % % frontviewmatfile = fullfile('/groups/branson/bransonlab/projects/flyHeadTracking/CNNTrackingResults20160409',sprintf('%s.mat',experiment_name)); % ...
2ef44db7588441053ae5a1f31b0756b3e90fbd1945385d80ed3dc5ff483dd9ed
MATLAB
29,976
401
% ---------------------------------------------------------------------------- % % RELAX-Jr EEG CLEANING PIPELINE, Copyright (C) (2024) Aron Hill & Neil Bailey % ---------------------------------------------------------------------------- % % This program is free software: you can redistribute it and/or modify it ...
7540978240184ca5fe61d3c1b84ab393b42262b9ced9ad6f412d1790fd471e54
MATLAB
29,980
630
function [selectedVars,Wlsq,varargout] = bolasso(X,y,varargin) % Use the Bolasso (bootstrap-enhanced least absolute shrinkage operator) to % perform model selection, i.e. to select relevant variables. Once % selected, fit a model using unregularized least squares regression % using only the selected variables. % % Th...
fca3fbbbd22d16ebbae4c2465d45cb281fabdf49dd58659e8415089a05e0bf5a
MATLAB
30,015
666
function plot_ground_truth_compare_test(folders,option,method) total_number(1:3) = 0; for nfolder = 1:length(folders) cd(folders{nfolder}) load decoded_replay_events [~,time_range]=sort_replay_events([],'wcorr'); for event = 1:length(decoded_replay_events(1).replay_events) event_time = deco...
2022ce112e81c731876f0852251711e89d31806b3f7f21514ae3434e290445cf
MATLAB
30,037
506
function R = weightedcorrs(Y, w) % % WEIGHTEDCORRS returns a symmetric matrix R of weighted correlation % coefficients calculated from an input T-by-N matrix Y whose rows are % observations and whose columns are variables and an input T-by-1 vector % w of weights for the observations. This function may be ...
2b54cdd71e46c4240c622f2aee19e4d09727f40849beb4de24ac2873dbf2a968
MATLAB
30,122
743
function chantype = ft_chantype(input, desired) % FT_CHANTYPE determines for each individual channel what chantype of data it % represents, e.g. a planar gradiometer, axial gradiometer, magnetometer, % trigger channel, etc. If you want to know what the acquisition system is % (e.g. ctf151 or neuromag306), you should n...
b5f362dff1c8ca0a0bababb561a58ec93831a5b7c7bfe8616eac99d569a3194b
MATLAB
30,161
1,116
%% load aligment directories cd ..\ load('anatomicalDistance_2.mat'); cd('NNNearNeighbor_uni_uniqueCells') %% CELL ANATOMY - AO1 vs VS1 folders = folders_audio_vs_visual; % % distancesInfos = nan( length(folders), 3 ); % AO1 vs VS1 % AOtoAO % AOtoVS % VStoAO % VStoVS % allROIs = cell( leng...
843b15397a5b383469652adbbcbf489fb75616907caf459a2fdc84e757262cf1
MATLAB
30,175
661
function [FitDetails]=Multi_3D_Fitting(TempXData,TempYData,TempZData,XLabel,YLabel,ZLabel,Title,FigSaveDir,ScratchDir,... Azimuth,Elevation,Save3DFitFigs,FigurePosition_3D,AxesPosition_3D,AxesStandardFontSizes,SilentColor,UpperLimitBuffer,AdjustRatio,MovieFits,SubPlotSize,FigurePosition_AllFits,SurfaceFitAlpha) ...
58b4effe408644adc6b3cb52d359404d2cd760d761cc94870b9055390d381c24
MATLAB
30,294
718
function behaviorAnnotator( fName, aName, tName ) % Caltech Behavior Annotator. % % Can only be used to annotated seq files. To annotate other types of video % files, they need to be converted to seq files first. For example, to % convert an avi file into an seq file, use the following command: % seqIo([seqName],'frIm...
09c4a73ec55a1327ba1b89affb6386ab10654f8af9ca127e0fe832904228d87d
MATLAB
30,319
666
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....
8ec0138496123853cfc8126b02d26c030132c1ef2a519d74e7658eb265740ac3
MATLAB
30,377
683
function [] = plot_ground_truth_compare_spearman(folders,option,method) % spearman_analysis(folders); 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).r...
044e7ecfd78c43392a5e7058907c675872682fd1c941b2df033439255232098d
MATLAB
30,468
592
function [frac_sig_bothtuned,... dT_bin_labels,... ratio_conTOdiv,... ratio_conTOdiv_CI,... dPOsig_perint_binned,... dPOall_perint_binned,... output] = ... eval_PO_stability(data,varargin) p = inputParser(); p.KeepUnmatched = false; p.CaseSensitive = false; p.StructExpand = fal...
b3ee4cbff4615822671f35a0610a588bcec440d577f19570a2a22e71ffab35dc
MATLAB
30,478
829
function TrioEEGAnalyseByTrials(timelock); % Analyse EEG data that can be split by the result.data trial information. % This requires that the same number of trials are found in the EEG % recordings and in the result.data structure, which may not be the case % due to missing triggers or aborted trials (use TrioEEGAnaly...
cd727a5d001b56d2f738957957c43d646d80aeb82238700612f061db9c27f006
MATLAB
30,483
640
% pipeline_fluorescence_analysis.m %% 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'; % Output directory name bases parameters.dir_b...
a848763114ed07d0fa0b6d87b4071753fd25cc1956671668aedb0f05d6b21655
MATLAB
30,522
902
% NOTE: there is no Fig. 1 ver. 6 % Changes: log-scale plots for B and D % Waveforms for example cells % Box-and-arrows diagram for Fig. 1A % Changes/removal of tagging panel % Avg rate/CV bars for D (labeled rate-CV plot) %% Load Unit Data datRoot = '/Volumes/LaCie/Farries recordings/'; load([datRoot 'unitDat_fina...
cca0be7f87625043acab74a3c6abff6708af1948e009499f9c6123070a959ba0
MATLAB
30,529
413
function significant_replay_events = number_of_significant_replays(p_value_threshold,ripple_zscore_threshold, method, rexposure_option) % Establish significance for the replay events that are above a set ripple power threshold. % The output will therefore have less replay events than the structures that have been load...
428a357d539ae69c6739dbb1c9b45708aa95d3b6295681efa3b6afa16425b234
MATLAB
30,543
886
% 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 PopU...
c67f3fac01f737f1dfe57e6ec524090fb33efe589eb1d84246a9ac5686e655c7
MATLAB
30,563
652
%% Supervised learning using non-parametric discriminative models in pmtk3 % % %% Kernel functions % % One common form of basis function expansion % is to define a new feature vector $\phi(x)$ by comparing the input % $x$ to a set of prototypes or examplars $\mu_k$ as follows: %% % $$\phi(x) = (K(x,\mu_1), ......
49e18ea14b36b97df6ae266edff5b6531ae5584652e23282831e5a0f7157ac8c
MATLAB
30,595
928
%% load aligment directories: contact lead author for data %% CELL ANATOMY - AO1 vs VS1 % folders = folders_audio_vs_visual; % % distancesInfos = nan( length(folders), 3 ); % AO1 vs VS1 % AOtoAO % AOtoVS % VStoAO % VStoVS % allROIs = cell( length(folders), 2 ); if 0 ntry = 100; for f...
07c28a94310eb24830b5998af9a97e3d99a1e07552931c4e3c0240177c18c200
MATLAB
30,602
814
% 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 Plot...
4a383a714bbdae0b54d583011e79a61501101121f3c60d720e73ab4b0fe5907f
MATLAB
30,604
1,064
%% stl_file = './functions/Intermediate Assembly 231108.stl'; tr = stlread(stl_file); stlverts = tr.Points*10; stlfaces = tr.ConnectivityList; stlverts2 = stlverts; stlverts2(stlverts2(:,2)>-55,:) = NaN; stlverts2(stlverts2(:,2)<-90,:) = NaN; stlverts2(stlverts2(:,1)>120,:) = NaN; stlverts2(stlverts2(:,1)<80...
7cde52b2217da3570d8942dfd5774ef90b5c21a3612a303a06902c74f80d7e72
MATLAB
30,972
1,041
function mwizard(file) %MWIZARD - M2HTML Graphical User Interface % MWIZARD launches a Matlab GUI front-end to edit parameters % that are then used by M2HTML to generate HTML documentation. % MWIZARD(FILE) allows to specify a mat-file FILE from which % default parameters are extracted and can be updated. % % For...
347de4493b2bac3456637d788d9475394e610b511c9a3806dd63069b2d07c7e3
MATLAB
31,001
1,139
function [] = VBA_spm_dcm_explore(P) % build GUI for DCM results reviewing if ~nargin [P, sts] = VBA_spm_select(Inf,'^DCM.*\.mat$','select DCM_???.mat'); if ~sts, return; end nf = size(P,1); P0 = P; P = cell(nf,1); for i=1:nf [pathstr,name,ext] = fileparts(P0(i,:)); P{i} = [pat...
35792791059a5f746abb4e504359731a5fc6f3367d1427ad37b2d1f2d7888ec4
MATLAB
31,047
762
% Author: Birgit Nierula % nierula@cbs.mpg.de function ga_amplitudeAndLatency_allSubjects(subjects, condition, srmr_nr) savepath_ga = getenv('GADIR'); if ~exist(savepath_ga,'dir'), mkdir(savepath_ga); end % get condition info [cond_info] = get_conditionInfo(condition, srmr_nr); cond_name1 = cond_info.cond_name; nerv...
aceb43006ec16f97c042fade733cbbdf581e6d205d8bca4cc215ba686c210790
MATLAB
31,094
708
function [cfg] = ft_multiplotTFR(cfg, data) % FT_MULTIPLOTTFR plots the time-frequency representations of power or coherence % in a topographical layout. The plots of the indivual sensors are arranged % according to their location specified in the layout. % % Use as % ft_multiplotTFR(cfg, data) % % The data can be a...
919a0a217c68e5759281f6961f910dca34ae5350417cd2cfeb0e522a68e2c83b
MATLAB
31,102
806
classdef MovieManagerController < handle properties (SetAccess=private) parent_ % scalar LabelerController that created this object hFig % scalar handle to MovieManager fig labeler % scalar labeler Obj mmm_ % scalar MovieManagerModel ref; weak by convention (Labeler owns it) listeners % cell arr...
e4bc0c7f85b9be79b05e6e09e97d35439d576b1d49fe140a0363d73415cff4e9
MATLAB
31,117
927
classdef LabelCoreSeqMAController < LabelCoreController % Multi-animal sequential labeling controller % % Owns all graphics for multi-animal sequential labeling mode. Receives GUI % callbacks, extracts GUI state (mouse position, modifiers), delegates data % logic to LabelCoreSeqMAModel, and syncs graphics in response t...
33231ff20c7035621df7a79e71f9d90d4130075fef76c34a0924d85a0d61ea05
MATLAB
31,325
648
classdef BioSigKit < handle %% ============== BioSigKit ================== % BioSigKit is a set of useful signal processing tools that are either % developed by me personally or others in different fields of biosignal % processing. BioSigKit is a wrapper with a simple visual interface that % gathers this tools under...
d02573b93caf43f4189aa11e812d30f3e879c2d3c56d7e47bf199296dbdea180
MATLAB
31,336
755
function ft_plot_cloud(pos, val, varargin) % FT_PLOT_CLOUD visualizes spatially sparse scalar data as spheres or % spherical clouds of points and optionally 2D slices through those clouds % % Use as % ft_plot_cloud(pos, val, ...) % where the first argument are the positions and the second argument are the values % f...
fbb8ba3fab7de0b9d9a009eaf2b818df8263c74619990cb6f1cfca7df9103287
MATLAB
31,414
766
classdef CellsReader < SurpassObjectReader % CellsReader Read Imaris ims file Cells object data % % © 2015–2016, Peter Beemiller (pbeemiller@gmail.com) % % See also ImarisReader | SurpassObjectReader properties (SetAccess = 'immutable', GetAccess = 'public', Transient = true) ...
f650e0f4d0b5a97285bb1d6382d39d045840c4c2979704c7d1897f1aa1fb927b
MATLAB
31,458
628
function [] = plot_ground_truth_compare_jump_distance_backup(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)...
1485e0a17d7952ac4df72508ced457ce00ed203c917a467ba3d9f4efdaf239f7
MATLAB
31,534
1,227
function GLAN = erp_stata(GLAN,cfg) % <*LAN)<] % v.0.1.1.2 % %ERP_STATA 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. %...
8532b2d918861462fe9c0698653466dcab42aeb93e0c6aa3d22c1947deffe887
MATLAB
31,577
692
% TSMATCH Searches TSdata for matches to matchcode combinations. % TSMATCH (TSDATA, MATCHCODES) searches the TSDATA for matches to % matchcode combinations specified in matchcodes. Works like a search % engine or a regular expression engine. Match codes are row vectors of % TS event codes which represent a ...
3c877b8aa1a1c073c40ea68643dd217eec922fdc9cbba695563795b4b67a562f
MATLAB
31,608
414
% Analysis of individual questions instead of whole runs %% Starting brainvoyager from Matlab bvqx = actxserver('BrainVoyager.BrainVoyagerScriptAccess.1'); %% Defining working directories and general parameters subjects_analysis_dir = 'E:\Social_networks_analysis\Analysis_2mm_smoothing\'; % A directo...
0da31201031205a458a5885d2a5389ed02e77cc1c720d38079ab65c451c7210c
MATLAB
31,620
760
function ft_plot_cloud(pos, val, varargin) % FT_PLOT_CLOUD visualizes spatially sparse scalar data as points, spheres, or % spherical clouds of points and optionally 2D slices through the spherical % clouds. This is for example useful for spectral power on depth (sEEG) electrodes. % % Use as % ft_plot_cloud(pos, v...
6d9c17b8c8052d57c262a9daa0a28f51f435870ac11d71d7fd32f0a0686f3cc1
MATLAB
31,818
742
function varargout = VBA_spm_XYZreg(varargin) % Registry for GUI XYZ locations, and point list utility functions % % ---------------- % % PointList & voxel centre utilities... % % FORMAT [xyz,d] = spm_XYZreg('RoundCoords',xyz,M,D) % FORMAT [xyz,d] = spm_XYZreg('RoundCoords',xyz,V) % Round spe...
8212078b31f8de4434641e93c8d710ddf6c815a77f6aabee24b1a0b64be394c5
MATLAB
31,931
1,108
%% GUI for supervising vesicles segmentation % Author: Antonio Martinez-Sanchez function varargout = vesseg(varargin) % VESSEG MATLAB code for vesseg.fig % VESSEG, by itself, creates a new VESSEG or raises the existing % singleton*. % % H = VESSEG returns the handle to a new VESSEG or the handle to % ...
c94da14da5f9973119b3aa4f7857a470316ac3643891feaed954d227e711ae11
MATLAB
31,951
601
function estimated_position = log_odd_bayesian_decoding(place_fields_BAYESIAN,bayesian_spike_count,place_field_index,timebin,posbin,option,modify,save_option) % INPUTS: % place fields: matrix or []. Place fields to use as a template in the decoding. If empty, it will load place fields for the whole session (extracted_p...
45f70cbc0704cd5c5687093cda73c27ba3f8a238f9d2f00c6d4de02f690cfa2b
MATLAB
31,967
1,139
clear clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 4; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.a1; x0(2) = NineMuscleMorphParaInitial{G, 1}.M...
24282f0e08c64e852a7fbaae7e14e1a952daac6f72087f44965e9040847cace1
MATLAB
31,990
938
function bnd = prepare_mesh_manual(cfg, mri) % PREPARE_MESH_MANUAL is called by PREPARE_MESH and opens a GUI to manually % select points/polygons in an mri dataset. % % It allows: % Visualization of 3d data in 3 different projections % Adjustment of brightness for every slice % Storage of the data points in an e...
219a8d9d06b626a2dc7935a2b42ebe0020dc32bdf788b4d21d76676a7f86ca69
MATLAB
32,003
1,136
clear clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 8; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.a1; x0(2) = NineMuscleMorphParaInitial{G, 1}.M...
b765f1c3760987c27d52b7a57fbcae51871f39030bb5648d0bf8227c90ab6066
MATLAB
32,007
1,135
clear clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 1; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.a1; x0(2) = NineMuscleMorphParaInitial{G, 1}.M...
0c659f9cc5658f242e304862fb4afabbb9cc9b65acc5581248100d3437cb450a
MATLAB
32,035
1,140
clear clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 2; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.a1; x0(2) = NineMuscleMorphParaInitial{G, 1}.M...
35773d201b682f20264ee3cf60d64a83237a1f7496cc1c60fd1ab58754b1d17f
MATLAB
32,291
411
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
f8c6a3008a03514a10fda52ec1af18c5992fc24c395bb7ac6d7576657963cd6c
MATLAB
32,295
954
%% 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) ...
c77920a4c608f7e7ffa8ad53228c37801dc05d7b3227285e80adbff8ba1d504a
MATLAB
32,300
825
function [x,fval,exitflag,output,grad]=fminlbfgs(funfcn,x_init,optim) %FMINLBFGS finds a local minimum of a function of several variables. % This optimizer is developed for image registration methods with large % amounts of unknown variables. % % Optimization methods supported: % - Quasi Newton Broyden–Flet...
575044a0db6841ff2c8353ad22ab37bc6804670578ef1e40eb5036c3ac47412f
MATLAB
32,331
733
function [elec_realigned] = ft_electroderealign(cfg, elec_original) % FT_ELECTRODEREALIGN rotates, translates, scales and warps electrode positions. The % default is to only rotate and translate, i.e. to do a rigid body transformation in % which only the coordinate system is changed. With the right settings if can app...
861baa1c27347e768d9d371203ced73ff7ad1ec7740aaa72e6bf902b355b7508
MATLAB
32,354
660
function plot_ground_truth_compare_normalisation(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...
e6cb3d0db16eaff0ced72a3aadaf30daabd4f9bc867181b14b27cab61803775f
MATLAB
32,437
741
function [elec_realigned] = ft_electroderealign(cfg, elec_original) % FT_ELECTRODEREALIGN rotates, translates, scales and warps electrode positions. The % default is to only rotate and translate, i.e. to do a rigid body transformation in % which only the coordinate system is changed. With the right settings if can app...
fbc58cf4694ef8d4b23a0161caf2c5f96c3c225c85dfe98ee5535d890a44e74e
MATLAB
32,481
1,020
% clear % clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 5; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.OW.a1OW; x0(2) = NineMuscleMorphParaInitia...
bc8636b5e2a3f35624fcc611ee3f0806986e2e6de458f3c8c7e66460ea63459a
MATLAB
32,523
838
function AnalyzeFaceScratch() Convert(); % Possible args: {'SUA','Pop','ERA','Decode'}; BodySpec(); BodySpecC(); ActionType(); end function Convert() %% Body spec fn ={}; tl = {}; filename = {'20170222-120530-120650-TextTraining',... '20170222-120530-121309-TextTraining',... '20170315-10461...
f46446e3e11773aa8815246a0a85bc3efdb0bc61c52d94e3b173144300ddd78e
MATLAB
32,539
718
function [] = plot_replay_score_vs_log_odds_difference(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;...
782ea9d4e08fd93e454808e0850482fb9da735510e2198ad502d14724ca71f1b
MATLAB
32,589
904
function [comp] = ft_componentanalysis(cfg, data) % FT_COMPONENTANALYSIS performs independent component analysis or other % spatio-temporal decompositions of EEG or MEG data. This function computes % the topography and timecourses of the components. The output of this % function can be further analyzed with FT_TIMELOC...
be19aec23ca9768c12a524b8ec6a0a1532e747f2ecebc4a4611333cf300be9ee
MATLAB
32,590
904
function [comp] = ft_componentanalysis(cfg, data) % FT_COMPONENTANALYSIS performs independent component analysis or other % spatio-temporal decompositions of EEG or MEG data. This function computes % the topography and timecourses of the components. The output of this % function can be further analyzed with FT_TIMELOC...
ba7d5d2ce161f6a7198ae066c7dadaaccab3cfc7a631ea5fcd605ad856cac08f
MATLAB
32,638
803
function chantype = ft_chantype(input, desired) % FT_CHANTYPE determines for each individual channel what chantype of data it % represents, e.g. a planar gradiometer, axial gradiometer, magnetometer, % trigger channel, etc. If you want to know what the acquisition system is % (e.g. ctf151 or neuromag306), you should n...
56358ab9bd9781050fb87be76241bf8555cbf88ad50375d9fac0228a74707b50
MATLAB
32,658
1,041
% clear % clc NineMuscleMorphParaInitial = load('NineMuscleMorphParaInitial.mat'); NineMuscleMorphParaInitial = NineMuscleMorphParaInitial.NineMuscleMorphParaInitial; G = 5; % Muscle Group Number (G = 1 to 9) x0(1) = NineMuscleMorphParaInitial{G, 1}.MorphologicalParameters.OW.a1OW; x0(2) = NineMuscleMorphParaInitia...
8faa4a5429e1fac6af14ac824186bc80499dce67eab7af81a7dda460f2654cfd
MATLAB
32,700
523
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fprintf('Merging All Episode QuaSOR Coordinates...') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for EpisodeNumbe...
6c6c1baaa1f089f8f395466d55d6cd5012be267afb856b138d81e5f5ed5424ce
MATLAB
32,736
941
function stack = tiffread(file_name, indices, varargin) % tiffread, version 3.32 - November 23, 2018 % % stack = tiffread; % stack = tiffread(filename); % stack = tiffread(filename, indices); % % Two options can be specified: 'ReadUnknownTags' and 'DistributeMetaData', eg: % stack = tiffread(filename, [], 'ReadUnknown...
2227d9a8abf06fad62c5973c1cd8b6e6f2a4627ec04910f9dbd0d281ce1958f8
MATLAB
32,778
415
%% %# Citation for DISCOVER-EEG-2.0.0 %# If this code contributes to a project that leads to a scientific publication, please acknowledge this work by citing the following paper: %# Gil Ávila C, Bott FS, Tiemann L, Hohn VD, May ES, Nickel MM, Zebhauser PT, Gross J, Ploner P. DISCOVER-EEG: an open, fully automated EEG p...
c210e8268bbc433074cdf4ec56acc5fa69446e37daf98b7295fd6aa4e5adb8da
MATLAB
32,794
961
function bnd = prepare_mesh_manual(cfg, mri) % PREPARE_MESH_MANUAL is called by PREPARE_MESH and opens a GUI to manually % select points/polygons in an mri dataset. % % It allows: % Visualization of 3d data in 3 different projections % Adjustment of brightness for every slice % Storage of the data points in an e...
7bce9ad9dfc8d1112238b938f8089b981a25cfb6c1cc471cc4841887f0d90ac3
MATLAB
32,819
740
% encoderFindBehaviorPeriods.m % Sarah West % 10/11/21 function [parameters] = encoderFindBehaviorPeriods(parameters) % Inputs fps = parameters.fps; frames = parameters.frames; periods_long_threshold = parameters.periods_long_threshold; periods_long = parameters.periods_long; pe...
12b2a275aa5ba1477efd223221bbae0d44036dbc9a55509d11a186f0c3023d25
MATLAB
32,823
1,073
%% Diffraction crosstalk from a point source through a Gaussian aperture % analytical solution % single source through two pinholes - coherent vs incoherent summation lambda = 520e-9; k = 2*pi/lambda; sp = 7.4250e-5; % spacing between weights pds = 2.5e-3; % spacing between pds x_grid = 2e-5; x = -5e-3:x...