sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
026cf674524614bb8a1be89ad930b54e819efd827d3e0246f6e8832ee36a074f | MATLAB | 40,382 | 936 | function [BOUNDARY,BOUNDARY_ROI_ID,ROI_COMPONENTS] = findROIboundaries(vertices,faces,vertex_id,boundary_method)
% This script will plot the boundaries defined by some parcellation/ROIS on
% a surface projection. It can also alter the colormap so regions that do
% not have any information are coloured grey.
%
% ... |
8c3c93bebc75273e8a3459cafb0f382038da34f1d93228b29601c3596a63ca6b | MATLAB | 40,466 | 839 |
%% unit quality gui: plot various quality metric plots for single units
% toggle between units with the right and left arrows
% the slowest part by far of this is plotting the raw data, need to figure out how
% to make this faster
% to add:
% - toggle next most similar units (ie space bar)
% - individual raw waveforms... |
e746a6ce609be9a9ae8189429780da212136dccd851fdb76939d2d39b8312895 | MATLAB | 40,658 | 838 | %% Load data
load('data_fig4.mat');
%% Make mean respiratory epoch for overlay before plotting spectrogram
for sub = 1:6 % first 6 subs are normosmic
resp_epochs_Intentional_bySub{sub} = squeeze(zscore(G_EpochTS(data_fig4.resp_intentionalSniff{sub}, data_fig4.sniffonsets_intentional{sub}, [-1,5]*srate)));
resp... |
04d3a0fa2d2734851af89ece9f197ddc0424efe7f8cf6a774df9d7b1d41d581b | MATLAB | 40,694 | 819 | function varargout = openNEV(varargin)
% openNEV
%
% Opens an .nev file for reading, returns all file information in a NEV
% structure. Works with File Spec 2.1 & 2.2 & 2.3.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use OUTPUT = openNEV(fname, 'noread', 'report', 'noparse', ... |
8d8c42ef91a64ac35a8e26a4491b0c47eefebb807ad2a1259e64a2dff15e8938 | MATLAB | 40,723 | 923 | %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% *CPC METACOGNITION TUTORIAL 2019*
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%
% Written by O. Faull and S. Fleming 2019
%
%
%
% *INSTRUCTIONS:*
%
% Run through this tutorial at your own pace. It is suggested that you c... |
7eda87aedd5b0d3ab56308b4b9894c2091d3d04cdaa01bec4f631c2de83a7bda | MATLAB | 40,794 | 1,050 | % runicatest() - Perform Independent Component Analysis (ICA) decomposition
% using natural-gradient infomax - the infomax ICA algorithm of
% Bell & Sejnowski (1995) with the natural gradient method
% of Amari, Cichocki & Yang, the extended-ICA algorithm
% of Lee, Girolami... |
09ab327d34f0f35a7d04453699cbe9d628b2bcf0bbab348f64aafa64ea6b6907 | MATLAB | 40,887 | 837 | %% a1_behav_archoices_bci
% Runs behavioural analyses for the simple choices stage.
%
% Input:
% - analysis level: 1 for individual analyses, 2 for group analyses.
% Lvl 1 must be run before lvl 2 (lvl 2 uses output saved during lvl 1).
%
% Output:
% - none. Runs function of corresponding... |
7b27edbb0491745469f197cc1096dc9cdc6af3a94018127ba645b63fbc8d5b94 | MATLAB | 40,990 | 895 | function [tractset]=ea_discfibers_optimize(tractset, app, command, optFile, mode)
% Function to optimize parameters for fiber filtering using a Surrogate
% Optimization Algorithm. The app input is optional but can be used to
% live-view tuning of parameters.
%% The surrogate optimization algorithm alternates between ... |
17eb7ad65a45bd707dcb8df44e69a85b04c8f078302b7b5a61499438b29172a0 | MATLAB | 41,106 | 974 | % spectopo() - Plot the power spectral density (PSD) of winsize length segments of data
% epochs at all channels as a bundle of traces. At specified frequencies,
% plot the relative topographic distribution of PSD. If available, uses
% pwelch() from the Matlab signal processing t... |
e970d37493d544e79d21884cd69dd4b1508415736c9f605fbe4af99935ee2d72 | MATLAB | 41,439 | 1,009 | function [atlases,colorbuttons,atlassurfs,atlaslabels] = ea_showatlas(varargin)
% This function shows atlas data in the 3D-Scene viewer. It
% reads in all atlases found in the atlases folder, calculates a
% convex hull around the nonzero area and renders this area as 3D surfaces.
% For a small part of contact statistic... |
0a0326952bbe4b2cbefec1ef5a9fac36d80d796c17df3cb5e67d14f980752f5a | MATLAB | 41,524 | 1,026 | classdef mixture < iosr.dsp.audio
%MIXTURE Class of sound source separation mixture.
%
% iosr.bss.mixture objects contain information about a mixture of sound
% sources.
%
% IOSR.BSS.MIXTURE is a subclass of IOSR.DSP.AUDIO.
%
% IOSR.BSS.MIXTURE properties:
% azi_sep - The azimuthal separation o... |
efa134466a4bb26ea047cb5d1ace320a002460f13117464321a4f0ecbe2604ea | MATLAB | 41,622 | 1,048 | function RT_moco()
% Display and save motion information at real time. It also shows images and the
% progress of scanning, and allows to check motion information for previous
% series/patients.
%
% To make this work, you will need:
% 1. Set up shared folder at the computer running RT_moco.
% The folder default t... |
4c2d146f83e93dc7279c2ac2a96406f9850728cf75e783c5a565e073e58c3421 | MATLAB | 42,182 | 734 | classdef basic_DS < handle
% basic_DS implements the basic functions of a
% datasource (DS) object, namely, it takes binned data and labels,
% and through the get_data method, the object returns k
% leave-one-fold-out cross-validation splits of the data which can subsequently
% be used to train and test a class... |
674d934e5f14489c4d0996a7327dd014c4de10aa8b4b65099597a98ba62d1615 | MATLAB | 42,214 | 735 | classdef basic_DS < handle
% basic_DS implements the basic functions of a
% datasource (DS) object, namely, it takes binned data and labels,
% and through the get_data method, the object returns k
% leave-one-fold-out cross-validation splits of the data which can subsequently
% be used to train and test a class... |
a77926ac2b2a152a8587b7d76ee80d1483c7a3a012fb28326c77cda5d5f248c0 | MATLAB | 42,261 | 926 |
%This script uses files generated by TSprocessSpikes
%(animalshank#_units_outputtrack)and clusters MEC units into excitatory units and
%inhibitory units using the value c from the waveform for each cluster (see
%Mizuseki 2009). Used k means clustering to find the split initially, then
%hard coded it as a paramete... |
18f6c4199130ec5e5d8dca23fd061ff44985f984d32347f9734c7149e7ae1109 | MATLAB | 42,615 | 1,086 | % runica() - Perform Independent Component Analysis (ICA) decomposition
% of input data using the logistic infomax ICA algorithm of
% Bell & Sejnowski (1995) with the natural gradient feature
% of Amari, Cichocki & Yang, or optionally the extended-ICA
% algorithm of Lee, Giro... |
3d5dfee9e12888c1563921ccbb4aa8388c6d55be5721e819721257fc123cde65 | MATLAB | 42,818 | 1,116 | % timef() - Returns estimates and plots of mean event-related spectral
% perturbation (ERSP) and inter-trial coherence (ITC) changes
% across event-related trials (epochs) of a single input time series.
% * Uses either fixed-window, zero-padded FFTs (fastest), wavelet
% 0-padded D... |
614a3fe1ee47e442ce9cfb8b4537fc253d440e0274b423ba71254ea1f053758c | MATLAB | 42,897 | 671 | classdef plot_standard_results_object
% This object allows one to plot the results that are saved when running
% the standard_resample_CV.run_cv_decoding method. The results are plotted
% as a function of time using results when the classifier was trained and tested
% at the same time.
%
% The constructor ... |
cf323eacc84a3aa93606d6ea1e20b7c3f0d980f12df0633b13eb35f456241053 | MATLAB | 42,941 | 670 | classdef plot_standard_results_object
% This object allows one to plot the results that are saved when running
% the standard_resample_CV.run_cv_decoding method. The results are plotted
% as a function of time using results when the classifier was trained and tested
% at the same time.
%
% The constructor ... |
1dc53ae890bfe057cd0f2d6565b646040ab3af681d57936aaffc1e2ffac7de85 | MATLAB | 43,293 | 904 | classdef ea_explorerclass < handle
% Discriminative fiber class to handle visualizations of discriminative fibers in lead dbs resultfig / 3D Matlab figures
% A. Horn
properties (SetObservable)
M % content of lead group project
resultfig % figure handle to plot results
ID % name / ID ... |
7669507f2642d3912acb2e79c9ddfa1bf10ce5509c049ab4eb0f56390c4bf9dd | MATLAB | 43,331 | 1,101 | % runica() - Perform Independent Component Analysis (ICA) decomposition
% of input data using the logistic infomax ICA algorithm of
% Bell & Sejnowski (1995) with the natural gradient feature
% of Amari, Cichocki & Yang, or optionally the extended-ICA
% algorithm of Lee, Giro... |
650c78565bb735ec1cc416f24a07647bd59303b27de84e214a7917ccbf7ae384 | MATLAB | 43,390 | 885 | %% Multivariate MVPA prediction with between and within component interpretation
% This tutorial addresses how to use the canlab multilevel PCR method for
% multivariate analysis using canlab tools (it can also be invoked directly
% though using mlpcr2.m in canlabCore on raw data without any canlabCore
% dependencies... |
364d3756aa69b7d63eedf3d978bb7d98b4ab08476323d0eadba85b0552f297bd | MATLAB | 43,480 | 1,101 | % runica() - Perform Independent Component Analysis (ICA) decomposition
% of input data using the logistic infomax ICA algorithm of
% Bell & Sejnowski (1995) with the natural gradient feature
% of Amari, Cichocki & Yang, or optionally the extended-ICA
% algorithm of Lee, Giro... |
cb2d713e169dd398e7191f2dc481dda6745cc4acab6a414bf8c9f67fce7c9755 | MATLAB | 43,641 | 1,055 | %%% Figure 2A-I
% Structure:
% 1) Compute all data for monkey X and C
% 2) Plot Fig. 2A-I
% 3) Save Prediction XX.mat / Prediction CC.mat and final panel-level Zenodo MAT files
%
% Notes:
% - No local functions are used.
% - No per-monkey Fig2H/Fig2I source MAT files are saved.
% - Only intermediate files r... |
3f20e0ed4c1b5a2975ce4e54af06aea6a6c38f68a7735a70db943bdbd4fcfd65 | MATLAB | 44,220 | 626 | function [Ihat,Ihat_train_global,val_struct,actualimprovs] = ea_compute_fibscore_model(numTestIt,adj_scaler, obj, fibsval, Ihat, Ihat_train_global, patientsel, training, test, Iperm,vals,usedidx)
if obj.useExternalModel == true
S = load(obj.ExternalModelFile);
if ~strcmp(S.connectome,ea_conn2connid... |
07b84d0fb7d9525ab9baa02d72cc43c27b3d918e6197f5e480f150ad325d098c | MATLAB | 44,579 | 1,412 | %% neuroDemo4
%
% neuroDemo4 reproduces the small network simulations. Note, the scratch
% directory in the simulations folder will be used to save data.
% These simulations will take up about 1.5 hours to run and it will
% require about 60 GB of space.
%
% Other m-files required: modeltype4, instinfo, inver... |
0f3050f4985eec3f978da636f9daa9e1c268f9e2aeaebc4fc0611a7499ab6a88 | MATLAB | 44,633 | 1,333 | %% neuroDemo3
%
% neuroDemo3 reproduces the Izhikevich network simulations. Note, the
% scratch directory in the simulations folder will be used to save data.
% These simulations will take up about 2 hours to run and it will
% require about 0.5 GB of space.
%
% Other m-files required: modeltype3, instinfo, ... |
132849834e76038160d76d0395d1eb51216b30413d97e67ae9864561310dfbf7 | MATLAB | 44,909 | 971 | function [testResults,trajClass, testResults_actinCutOff, inputParam] = ...
smactinAggMov(tassm, matchindx, smactinFlag, propVect1, propVect2, ...
maxNumPropVect, mvrgAggMatFlag, cutOffInput, outlierParam)
%SMACTINAGGMOV Data analysis of multiple single-molecule and actin movies
%
%SYNOPSIS: [testRe... |
612431f6cb3f6bbfdeae58c9895be12a266f5d139c240a80b907bfef6658ead7 | MATLAB | 44,921 | 947 | function simulatedColoc = runColocalizationAnalysisSimulation(simulationType,numTarDetect,varargin)
%RUNCOLOCALIZATIONANALYSISSIMULATION generates simulated data and runs colocalization analysis
%
%SYNOPSIS simulatedColoc = runColocalizationAnalysisSimulation(simulationType,numTarDetect,varargin)
%
% Function compiles... |
9e64576d9d9c4ccdea5c96c318bb7270c44dfb822377b3218ccc9e131341e2a0 | MATLAB | 45,138 | 1,108 |
%This function:
%Calculates and plots CSD for each animal
%Plots summary plots by group
%Saves CSD data to a file for each animal
%Inputs: Cell array of animal IDs, filter name (currently supports 'theta',
%'fast_gamma', 'slow_gamma'), region = 'HIPP' or 'MEC'.
%This function calls the pre_CSD function and b... |
764abafea0de253711e0c46613ccde42deb6c87a8d190c3aefd844df2848ad41 | MATLAB | 45,674 | 1,216 | function resultfig=ea_elvis(varargin)
% This function is the main 3D-visualization function of lead DBS. It
% reads all atlases found in the lead_root/atlases folder, calculates a
% convex hull around the nonzero area and renders it as 3D surfaces.
% Resulting figures are interactive and objects can be hidden. This
% f... |
f1905c961284a23e6e29a3691c318592aeb4b9422db564f08193eb30fb555994 | MATLAB | 45,788 | 1,020 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% generate_paper_figures_supp_Nature.m
%%%
%%% MATLAB script to generate the final Supplementary figures of the paper
%%%
%%% NOTE : The configuration of your computer (e.g., screen resolution)
%%% affects how the figures created will ... |
728d47c4377fa47a3e58ce7158718e33e3590bf1d032cc9d86fa712e4f3ad632 | MATLAB | 46,341 | 1,002 | %% Load data
load data_supp
%% Fig S2A - Odor vs. Image spectrograms
% CUE TASK ODOR
% Calculate spectrogram - concatenated 6 subs
tic
ts = data_supp.lfpData_cueSniffOdor_combinedSubs;
sniffonset_conds = { data_supp.sniffonsets_cueOdorSniff_combinedSubs };
para = [];
para.freq = logspace( log10( 1), log10( 200), 100)... |
7123d93c4c1589bcbd0adc45ab72ab65de9f4618e1457bf3c08f006ed122cc32 | MATLAB | 46,593 | 824 | function [smPropPerTimeInt,threshMet, summaryNumTrackAll, numPassDecomptrackAll, intensityModelInfoPerMov] = ...
smPropPerTimeInterval(utrackPackPaths, smConditions,qfsmPackPaths, ...
diffModeDividerStruct, smSpanRadius, intensityInfoBackUp)
%SMPROPPERTIMEINTERVAL reads data from u-track analysis folders and ca... |
0f9764b5f31862d2554a4a66790d0552597d9679abecf69da1d7cc3fb1fdc50c | MATLAB | 46,713 | 1,108 | % animals = {'AD-WT-44-1' '3xTg132' '3xTg136' 'WT162' 'WT78-0' '3xTg75-1' 'WT77-0' '3xTg79-0' 'WT89-0' 'WT98-0' '3xTg77-1' 'WT158' 'WT153' 'WT157' '3xTg125' 'WT126' 'WT45-1' 'WT45-2' 'WT47-0' '3xTg48-0' '3xTg49-2' '3xTg49-1' 'AD-WT-1-0' '3xTg1-1' 'WT159' 'WT105-0' 'WT69-1' 'WT173' '3xTg165' '3xTg177' '3xTg148-1' 'WT181... |
8aed657936a763d56fd42c0ddb22d7cc010d2790628021bb3a8b6430cb579dea | MATLAB | 46,843 | 1,202 | function [SWR] = detect_swr(Filebase, Channels, Epochs, varargin)
% DETECT_SWR Detect Sharp Wave Ripple in epochs of continuous data. This
% code is designed for linear probes, with at least one shank
% that simultaneously records across the pyramidal cell layer
% i.e. the s... |
a0ba05927319ee68b54780f151c00be4dbc08535e778aa0feceeaf1cc3609ea5 | MATLAB | 47,202 | 1,346 | function varargout = ea_convis(varargin)
% EA_CONVIS MATLAB code for ea_convis.fig
% EA_CONVIS, by itself, creates a new EA_CONVIS or raises the existing
% singleton*.
%
% H = EA_CONVIS returns the handle to a new EA_CONVIS or the handle to
% the existing singleton*.
%
% EA_CONVIS('CALLBACK',hO... |
c0ee59e86bd352349aee73836f06f5761fa4de5fd02684f08a341391d3873d65 | MATLAB | 47,265 | 1,237 | function PROVTABLE = LaBGAScore_prov_resolve_retrospective(projdir, varargin)
%
%
% *USAGE*
%
% Reconstructs, for analyses that were ALREADY run, which commit of each
% dependency was checked out at the time. Use it to document existing
% projects, where no provenance was recorded when the scripts ran.
%
% It works bec... |
c7cf5060e7e512f31ed28f34d71e9a7248b7283390a929a75908ea7b696e7d24 | MATLAB | 47,733 | 1,246 | %
% envtopo() - Plot the envelope of a multichannel data epoch, plus envelopes and
% scalp maps of specified or largest-contributing components. If a 3-D
% input matrix, operates on the mean of the data epochs. Click on
% individual axes to examine them in detail. The black lines ... |
07dbee1231b9aec60511bfee61a2512481689d3b15c61cce0e929374c16c19d5 | MATLAB | 47,753 | 1,449 | function NSx = openOpE(file)
% openOpE : Openephys To NSx File Converter
%
% Open and read OpenEphys file then returns a blackrock compatible NSx structure.
% Use OUTPUT = openOpE(path2file).
%
%%%%%%%%%%%%
% Input:
% path to ".XML" files
%
% Output:
% NSx structure
% Note: Electrode: ... |
43a0d56717f5141fd7d25b828339d65a392bc50bdcbae97e2742fcf712ce0f77 | MATLAB | 48,090 | 1,072 | %% prep_3_calc_univariate_contrast_maps_and_save.m
%
%
% *USAGE*
%
% This prep script
%
% # calls a_set_up_paths_always_run_first, then loads DAT/DATA_OBJ/DATA_OBJsc
% from image_names_and_setup.mat/data_objects.mat/data_objects_scaled.mat
% if not already in the workspace (falling back to prep_1/prep_1b/prep_2
% ... |
826315beebba4e355738df78e8c9e2fbce7371a36a3b571b12b5f7e70b7c1f50 | MATLAB | 48,266 | 1,193 | %%% Figure 6
% Active vs passive repetition-related and deviance-related responses.
%
% Structure:
% 1) Compute/load all data needed for Figure 6A-G
% 2) Draw all panels
% 3) Save one independent MAT file per panel for Zenodo
%
% Notes:
% - No local functions.
% - Heavy passive prediction bootstrap is cached ... |
96ab788c3ff284ed08cf8436791d54921bb5ffecca68a6f9ef9d78e6b3846b8e | MATLAB | 48,622 | 1,169 | function [d,si,h]=abfload(fn,varargin)
% ** function [d,si,h]=abfload(fn,varargin)
% loads and returns data in ABF (Axon Binary File) format.
% Data may have been acquired in the following modes:
% (1) event-driven variable-length (currently only abf versions < 2.0)
% (2) event-driven fixed-length or waveform-fixe... |
53ae212be28f2a734027ae48a968707bf821d760b9f69923900147e8d81dc1f3 | MATLAB | 48,867 | 1,321 | function [P,units] = StructDlg(struct_def,title,dflt,fig_pos,visible,present_val)
% StructDlg - A structure based definition of an input GUI. Allows for a quick and
% convenient text based definition of a GUI
%
% StructDlg(struct_def, title, default_values, position)
%
% StructDlg creates a modal d... |
86909369fb08fe2b40ecbbad0a6a6b2e6b97fda84997c57556060f4db4e69ebe | MATLAB | 48,971 | 1,205 | function [sortedFiles, returnCode] = ea_nifti_to_bids(niiFiles, dataset_folder, subjID, preset)
% Function creates a GUI in order to select which files should be used to create a BIDS compliant dataset and
% which files should be used by lead-dbs. After selection, a rawdata folder will be created and selected files wi... |
c72d5e2314f483411efe8a2c355d7f4ee508e698266e644ff9b4ec9d4797ac94 | MATLAB | 49,148 | 1,133 | function [numObsPerBinP,binCenterP,modeParam,errFlag,fitRes] = ...
fitHistWithGaussians(observations,alpha,variableMean,variableStd,...
showPlot,numModeMinMax,binStrategy,plotName,logData,modeParamIn,ratioTol)
%FITHISTWITHGAUSSIANS determines the number of Gaussians + their characteristics to fit a histogram
%
... |
a13715805c74a6966ad429d101900590eab53e01358255fa641de5aedc22c9a3 | MATLAB | 49,433 | 778 | function CFA_MakeRes
if ~isempty(dir('SetUpPara.mat'))
load('SetUpPara.mat');
load('Setup_TempAndPara.mat');
else
[fil PG] = uigetfile('*.mat',pwd,'SetUpPara.mat');
load(fullfile(PG,fil));
load(fullfile(PG,'Setup_TempAndPara.mat'));
cd(PG);
end
outdir = [SetUpPara.Outdir,filesep];
if isempty(di... |
5d9b39ee00b59d13f2daa16e68cb6e3ca27cd76d05e47bfe3684b17e67622bfa | MATLAB | 49,504 | 446 | %% a2_set_default_options.m
%
%
% *USAGE*
%
% * Sets default options used by the core secondlevel scripts included in
% CANlab_help_examples (LaBGAS fork), organized into one section per
% script (see below)
% * Automatically called by many other scripts, including
% a_set_up_paths_always_run_first, so it does no... |
edd6b71ddf3468dc7ac34dda701a9370356eb191f904b677b54249be72b44c66 | MATLAB | 49,621 | 1,159 | clc
clear all
close all
%% Initialization
Folder="624" % >>> Enter your sample number <<<< (which is also the folder name containing the binary files for this sample)
directory='C:/Users/username/Box/..../Experimental_Folder/Samples/'; %direcotry of the binary files for the Midshaft, distal, or proximal ROI
... |
d711222251d01ebcd5c5db89232e56698f70dc7f03374b91038a1873e5bfae90 | MATLAB | 49,965 | 1,483 | function mesoGT_tool(varargin)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% % mesoGT_tool(commandstr1,varargin1,commandstr2,varargin2,.....)
% %
% %
% % Marco Reisert, Medical Physics, University Hospital Freiburg
% % 03/10
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
c9564fee25f79cb6c5ca107ee746732d07631062d4cace143cdcceedc0bd1cb0 | MATLAB | 50,441 | 1,267 | function varargout = nii_tool(cmd, varargin)
% Basic function to create, load and save NIfTI file.
%
% rst = nii_tool('cmd', para);
%
% To list all command, type
% nii_tool ?
%
% To get help information for each command, include '?' in cmd, for example:
% nii_tool init?
% nii_tool('init?')
%
% Here is a ... |
e2c0b78dcf34ed15680c490d510e5d708e08baca372dcf469307d26d54a60e90 | MATLAB | 50,688 | 1,033 | function varargout = openNEV(varargin)
% openNEV
%
% Opens an .nev file for reading, returns all file information in a NEV
% structure. Works with File Spec 2.1 & 2.2 & 2.3 & 3.0.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use OUTPUT = openNEV(fname, 'noread', 'report', 'noparse', 'n... |
7fd4be979d70c0f1d472c17ffb207e55b7b4cba6d8e37512ad224176d1e4079e | MATLAB | 51,081 | 355 | function varargout = ea_runslicer(options, task)
%% Function to launch slicer and load *.nii files
% Last Revision: 21/05/2018
% Thushara Perera (c) 2018 Bionics Institute
% Input:
% - lead dbs options struct
% - task integer ID to tell function which files to open
% (see inline comments for more detail)
% ... |
74fa7a9552855a98a31f32d72b29a66f10ba578d082d324b4021408337eb982b | MATLAB | 51,497 | 1,191 | function [] = roiGUI(varargin)
% roiGUI Load ScanImage .tif for roi drawing.
% [] = readSCIMtif(varargin)
% loads .tif into GUI for drawing and saving ROI
%
% Additional input arguments:
% 'inputFileName' --> loads specified .tif file
% '1' --> loads specified channel, replace with desired ch... |
c8fe72028a79a5f49af84460f73aa01d84057c203e4ab4b79083a6e3d23e2241 | MATLAB | 51,722 | 1,141 | function varargout = ea_trajectorycontrol(varargin)
% EA_TRAJECTORYCONTROL MATLAB code for ea_trajectorycontrol.fig
% EA_TRAJECTORYCONTROL, by itself, creates a new EA_TRAJECTORYCONTROL or raises the existing
% singleton*.
%
% H = EA_TRAJECTORYCONTROL returns the handle to a new EA_TRAJECTORYCONTROL or t... |
624913d64a6bdf25cccd6e7d367ff8ab0fb666e1abafd8ef94a3abc368887a7f | MATLAB | 51,888 | 1,191 |
% arrow() - Draw a line with an arrowhead.
%
% Usage:
% >> arrow('Property1',PropVal1,'Property2',PropVal2,...)
% >> arrow(H,'Prop1',PropVal1,...)
% >> arrow(Start,Stop)
% >> arrow(Start,Stop,Length,BaseAngle,TipAngle,Width,Page,CrossDir)
% >> arrow demo %2-D demos of the capabilities of arrow()
% >> arrow demo... |
7452d88ccdd197af582d068d0212a4c6082c60e688224271850a4412a1e4096a | MATLAB | 52,066 | 959 | % pop_chanedit() - Edit the channel locations structure of an EEGLAB dataset,
% EEG.chanlocs. For structure location and file formats,
% see >> help readlocs
%
% EEG.chanlocs. For structure location and file formats,
% see >> help readlocs
%
% Usag... |
6941c0910f20025cc8d83bf69d938f0c9977e58eeb3f00d82d0c1d9946b66b58 | MATLAB | 52,481 | 1,172 |
%% Multivariate prediction with Bayesian hyperparameter estimation
% This tutorial addresses two distinct but complementary problems. The
% first is on how to use the canlab multilevel PCR method for multivariate
% analysis. The second is to address the use of Bayesian optimization for
% hyperparameter selection, whi... |
ba702ae54cd96422bda56496e573317b77feab9e5ba5e913930ab6bb2500e8e8 | MATLAB | 53,003 | 1,596 | function [res, errStr, res2]= ftrstruct_query(varargin)
%function [res, errStr, res2]= ftrstruct_query(ftrStruct, commandStr[, op1[, op2[... [, opN]]]])
%
% General method query a infomations and data from a ftrStruct
%
% ftrStruct: should contain a valid ftrStruct
% command: {'vox' | 'getVer' | 'trackParam' |... |
307516deb88e97100b55f01111159b2b278ab05173a9b133fe7c783c82c6edc1 | MATLAB | 53,738 | 1,518 | function varargout = leadMD(varargin)
% LEADMD MATLAB code for leadMD.fig
% LEADMD, by itself, creates a new LEADMD or raises the existing
% singleton*.
%
% H = LEADMD returns the handle to a new LEADMD or the handle to
% the existing singleton*.
%
% LEADMD('CALLBACK',hObject,eventData,handles,... |
c09b0cad00105d5bea62344fe8429b5a9074b1d29cfdd8d706b015801c323807 | MATLAB | 54,272 | 1,205 |
%% unit quality gui: plot various quality metric plots for single units
% This function is very messy - don't attempt to modify. Send me an email or raise an issue :)
%
% toggle between units with the right and left arrows
% the slowest part by far of this is plotting the raw data, need to figure out how
% to make thi... |
7c08d48d75d35fc396a653fd4073b8a37ec758cf195f638939061cac4e4335bd | MATLAB | 54,586 | 1 | function [h,yy,zz] = arrow(varargin)
% ARROW Draw a line with an arrowhead.
%
% ARROW(Start,Stop) draws a line with an arrow from Start to Stop (points
% should be vectors of length 2 or 3, or matrices with 2 or 3
% columns), and returns the graphics handle of the arrow(s).
%
% ARROW uses the mouse (cl... |
83e8eea6ea6f171d0371f4215db9afcc61a5eaa02c9a10f0158b1492c01a7d6a | MATLAB | 54,588 | 1,483 |
function [ripples] = bz_DetectSWR(Channels, varargin)
% bz_DetectSWR Detect Sharp Wave Ripple in epochs of continuous data. This
% code is designed for linear probes, with at least one shank
% that simultaneously records across the pyramidal cell layer
% i.e. the superficia... |
cc3a34864d4973e6d8d93a37669354f4a965e2b96e8578a2257504e8b5d53c62 | MATLAB | 55,006 | 776 | %% Fig 1H, discrimination spectrogram from 250225_OBE_AS_5
load('/Volumes/Lab_Common/OBEControl/250225_OBE_NMH_AS_5/Preproc_Discrimination/preproc_discrimination.mat');
% Save data used for plot as new variable
data_fig1h.lfp = macro_data(2,:);
data_fig1h.resp = resp;
data_fig1h.sniffonsets = hard_secondsniffonsets;
... |
2cd62ccd1be649b7804b3bc72836f565461ecb0325c280a66f50aa3daf50beeb | MATLAB | 55,349 | 1,680 | function varargout = wave_browser(varargin)
% WAVE_BROWSER M-file for wave_browser.fig
% WAVE_BROWSER, by itself, creates a new WAVE_BROWSER or raises the existing
% singleton*.
%
% H = WAVE_BROWSER returns the handle to a new WAVE_BROWSER or the handle to
% the existing singleton*.
%
% WAVE_BR... |
9101fc99e15757ac59a5c752c35cd7bcd5d547668f45adb335f6e03010c1876f | MATLAB | 56,374 | 1,763 | function [h, c, clusts, clustinfo, options] = G_Imagesc( img2plot, varargin)
% Imagesc with contour lines and overlays
%
% Syntax
% [h, c, clusts, clustinfo] = G_Imagesc( img2plot)
% % Set optional parameters using key-value pairs
% [h, c, clusts, clustinfo] = G_Imagesc( img2plot, 'xaxis', t, 'yaxis', frequency)... |
0aea2806b298fea62ef61d0f8cd83c5d9072f60946fb15825d9b599b0fcf1832 | MATLAB | 56,961 | 1,322 | %% INSTINFO - instantaneous information analysis
% Calculates various information theoretic quantities for trial based or
% single trial data. Single trial data are analyzed through time, while
% trial based data are analyzed across trials at each time bin.
%
% Syntax: [InfoVal,p,s,MCInfoVals] = instinfo(StatesRaster, ... |
dc5c2e24a99c27922ee3ac5deda3eff95cbe8a9044529ff4cd9d6c2092e6614a | MATLAB | 57,029 | 1,680 | function varargout = wave_browser(varargin)
% WAVE_BROWSER M-file for wave_browser.fig
% WAVE_BROWSER, by itself, creates a new WAVE_BROWSER or raises the existing
% singleton*.
%
% H = WAVE_BROWSER returns the handle to a new WAVE_BROWSER or the handle to
% the existing singleton*.
%
% ... |
8862b269c65c35cff496e689cb6b13b371f061d8debed5032ef3c3fc5116ea33 | MATLAB | 57,132 | 1,102 | %% LaBGAScore_firstlevel_s2_fit_model.m
%
%
% *USAGE*
%
% This script does everything to fit and diagnose first level models,
% more specifically
%
% 1. checking dependencies, cloning CANlab Github repos if not yet present,
% and adding all necessary (sub)folders to Matlab path if needed
%
% 2. creating the first lev... |
7ea903ef7880115de528ccf3e98d302c16e003562f2b7255c4cd7f7cb23f4785 | MATLAB | 57,183 | 1,280 | function obj=draw(obj,do_redraw)
% draw Draws the plot in the current figure
%
% syntax: gramm_object.draw()
% Call draw on an array of gramm objects in order to have
% multiple gramms on a single figure.
% An optional logical argument can be given. Use
% gramm_object.draw(false) in order to allow the nex gramm plot to... |
54f6b8e36e531566d2ced18fd3f8eb3e0ae67d5209983851a6fad2b254048e79 | MATLAB | 59,132 | 1,049 | function impexp_NiftiMrStruct = impexp_cfg_NiftiMrStruct
%_______________________________________________________________________
%
% This toolbox contains various helper functions to convert NifTI images
% to and from mrStructs.
%
% This toolbox is free but copyright software, distributed under the
% terms of the GN... |
5775dae63eba221f89c63c744cc01b5f7538e07f82b09b55c8606e8a695a21eb | MATLAB | 59,295 | 1,446 | % crossf() - Returns estimates and plots event-related coherence (ERCOH)
% between two input data time series (X,Y). A lower panel (optionally)
% shows the coherence phase difference between the processes.
% In this panel, output by > crossf(X,Y,...);
% 90 degrees (orange) means X l... |
d46086435a74a3000385621ffa13eec85dd9b4a389b4ac775c21beebffa7ec23 | MATLAB | 59,499 | 948 | % pop_clustedit() - graphic user interface (GUI)-based function with editing and plotting
% options for visualizing and manipulating an input STUDY structure.
% Only component measures (e.g., dipole locations, scalp maps, spectra,
% ERPs, ERSPs, ITCs) that have been compu... |
5dfeddd33a50dd5de0b6ec416417ba4f6cbd3f0fd4d4f17ef07b4dc2e6aca1c2 | MATLAB | 59,561 | 1,460 | function [h,yy,zz] = arrow(varargin)
% ARROW Draw a line with an arrowhead.
%
% ARROW(Start,Stop) draws a line with an arrow from Start to Stop (points
% should be vectors of length 2 or 3, or matrices with 2 or 3
% columns), and returns the graphics handle of the arrow(s).
%
% ARROW uses the mouse (cl... |
ead478f0e8c9933608c5cb5305726e6a1d2732a5d61f63f46720135deaa9e2d8 | MATLAB | 60,108 | 1,619 | function AutoStereota()
%
% Main function
%
% Define global varibles
global currentPositionX currentPositionY currentPositionZ
global pausePositionX pausePositionY pausePositionZ
global surgIdx isPause isFinished isStop isAutozlim
global isMotorStop stopMotor
global useEncoderX useEncoderY useEncoderZ
globa... |
202c2334fed9390be1b76a73059474b83f24523c59e3ddbb7d7dbc6f9fd3396d | MATLAB | 61,011 | 1,379 | % FPA - Fiber Photometry Analysis.
%
% fpa = FPA(time, signal, reference, configuration);
% Subtract photobleaching, correct for motion artifacts,
% normalize, filter, detect peaks of spontaneous activity in user defined
% epochs, display trigger averages of user defined events.
%
% Units for time and frequen... |
5b3a45ea6c5a35a076ff6cc1b101dafc86a7519e1b2d5b5f66d5b924d23e5cd6 | MATLAB | 61,106 | 1,669 | function [PL,thresh]=ea_cvshowfiberconnectivities(resultfig,fibersfile,seedfile,targetsfile,thresh,sides,options,stimparams,changedstates,mode,showregs,showlabs)
% This function shows fiber-connectivity from a volume defined by a nx3
% point-list (volume). If stimparams.showconnectivities is set, connected
% areas to t... |
fde7549351c055e3f7604129ab11c5273e49b3c30ad7ad0aa067bbc03c7227e5 | MATLAB | 61,455 | 1,281 | % dipplot() - Visualize EEG equivalent-dipole locations and orientations
% in the MNI average MRI head or in the BESA spherical head model.
% Usage:
% >> dipplot( sources, 'key', 'val', ...);
% >> [sources X Y Z XE YE ZE] = dipplot( sources, 'key', 'val', ...);
%
% Inputs:
% sources - structure a... |
560375687f76e4baf7988c0f400942ea651c631c20c0f3e81ba6dff2f0418b54 | MATLAB | 61,596 | 1,353 | function dict = dicm_dict(vendor, flds)
% Return dicom dictionary for specified vendor.
%
% dict = DICM_DICT(vendor, dicmFields);
%
% The vendor is used to assign those vendor-specific private tags for SIEMENS,
% GE and Philips. Other vendors can be added easily into the file.
%
% If only partial dictionary ... |
087fa34c8dd83593a2ef6b308fae436754118ecb9333c9199ecd3b99f5e4c3e6 | MATLAB | 61,652 | 1,445 | function [rew,raw]=ea_mcdcov(x,varargin)
%MCDCOV computes the MCD estimator of a multivariate data set. This
% estimator is given by the subset of h observations with smallest covariance
% determinant. The MCD location estimate is then the mean of those h points,
% and the MCD scatter estimate is their covarian... |
b636809ebc4f2f04dfc8e6bee08bc0349aead426320837730dcd107b88cf3569 | MATLAB | 61,747 | 1,573 | %% c2f_run_MVPA_regression_single_trial.m
%
%
% *USAGE*
%
% This script runs MVPA regression analysis on a continuous outcome Y
% (default pcr, but can easily be adapted to pls or other machine learning
% algorithms) on an fmri_data_st object created by
% prep_3f_create_fmri_data_single_trial_object.m. That script shou... |
c61b2cb0094a1d202ee61ea26a672fa31c0a1ae1b07f14fe4f2ed45037050c97 | MATLAB | 61,843 | 1,982 | function out = uipickfiles(varargin)
%uipickfiles: GUI program to select files and/or folders.
%
% Syntax:
% files = uipickfiles('PropertyName',PropertyValue,...)
%
% The current folder can be changed by operating in the file navigator:
% double-clicking on a folder in the list or pressing Enter to move furthe... |
35cb4513e00cef4eaa276410a85dad6b151fc3e1703592223e276a0538cf8552 | MATLAB | 62,624 | 1,566 | function varargout = lead_or(varargin)
% LEAD_OR M-file for lead_or.fig
% LEAD_OR, by itself, creates a new LEAD_OR or raises the existing
% singleton*.
%
% H = LEAD_OR returns the handle to a new LEAD_OR or the handle to
% the existing singleton*.
%
% LEAD_OR('CALLBACK',hObject,eventData,handl... |
587a6bdc597d712ae0b033482fc06a38b21c2bf4735d7e303338fb1dc44d3e61 | MATLAB | 62,674 | 1,029 | %% LaBGAScore_prep_s1_write_events_tsv_multisess_multitask.m
%
%
% *USAGE*
%
% This script reads logfiles, extracts the onsets, durations, and ratings for
% different conditions, and writes events.tsv files to the BIDS dir for
% each subject, for a multi-session, multi-task design. It also contains an
% option to write... |
0c2350ccb18e351b59f09fc8aaf5ebaac06fc4f9e95172e8e2745a3818ff1fbf | MATLAB | 62,951 | 1,492 | % runica() - Perform Independent Component Analysis (ICA) decomposition
% of input data using the logistic infomax ICA algorithm of
% Bell & Sejnowski (1995) with the natural gradient feature
% of Amari, Cichocki & Yang, or optionally the extended-ICA
% algorithm of Lee, G... |
e2945932fb43dea82cc65a47bf13c7c1772e36bc4d45109b50434c7b6c954d06 | MATLAB | 63,870 | 1,455 | % newcrossf() - Returns estimates and plots event-related coherence (ERCOH)
% between two input data time series. A lower panel (optionally) shows
% the coherence phase difference between the processes. In this panel:
% In the plot output by > newcrossf(x,y,...);
% 90 degrees (orang... |
e17bcec60f0c4cc50395c78d1fc0de1c8571c1b98bbdb38873d696e064bb93b7 | MATLAB | 64,279 | 1,577 | function [s, info, dict] = dicm_hdr(fname, dict, iFrames)
% Return header of a dicom file in a struct.
%
% [s, err] = DICM_HDR(dicomFileName, dict, iFrames);
%
% The mandatory 1st input is the dicom file name.
%
% The optional 2nd input can be a dicom dictionary returned by dicm_dict. It may
% have only par... |
62c1dc07c9ec1a4d54801d496ef7622e0799b4d01c85450910eb318a62f803ed | MATLAB | 64,868 | 1,554 | % runica() - Perform Independent Component Analysis (ICA) decomposition
% of input data using the logistic infomax ICA algorithm of
% Bell & Sejnowski (1995) with the natural gradient feature
% of Amari, Cichocki & Yang, or optionally the extended-ICA
% algorithm of Lee, G... |
3ada2989144c1cdec92d2437cf573d783011b24cf9141d95b2ea610bb0f16c90 | MATLAB | 65,258 | 1,397 |
%This script uses files generated by TSprocessSpikes
%(animalshank#_units_outputtrack)and clusters Hippocampus units into excitatory units and
%inhibitory units using thresholds for firing rate, mean autocorrelation and CSI.
%Then makes phase locking polar plots separated by age x genotype groups for each
%reg... |
b03e015758b8d7a1fdb3a24a50796257100f3e4072f32410f4c98a0e53654d97 | MATLAB | 65,743 | 1,431 | function [type] = ft_filetype(filename, desired, varargin)
% FT_FILETYPE determines the filetype of many EEG/MEG/MRI data files by
% looking at the name, extension and optionally (part of) its contents.
% It tries to determine the global type of file (which usually
% corresponds to the manufacturer, the recording syst... |
7785337e5b9c433755f4dad91706449a5a9d00fb040bb37c5fd8187223e2d8a1 | MATLAB | 66,007 | 1,338 | function varargout = openNSx(varargin)
% openNSx
%
% Opens and reads an NSx file then returns all file information in a NSx
% structure. Works with File Spec 2.1, 2.2, 2.3, and 3.0.
%
% OUTPUT = openNSx('ver')
% OUTPUT = openNSx(FNAME, 'read', 'report', 'e:xx:xx', 'c:xx:xx', 't:xx:xx', MODE, 'precision', 'ski... |
f3129b6848217a04aa88e7289164b418c38bf01e720f1e1082931b3e63214aa5 | MATLAB | 67,436 | 1,491 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% generate_paper_figures_extended_Nature.m
%%%
%%% MATLAB script to generate the final Extended Data figures of the paper
%%%
%%% NOTE : The configuration of your computer (e.g., screen resolution)
%%% affects how the figures created w... |
61a20855b9594bf0dcdb2c9561e117e80c7633977e8c8da5263cf9c7dfd349f8 | MATLAB | 69,153 | 1,432 | % eeg_checkset() - check the consistency of the fields of an EEG dataset
% Also: See EEG dataset structure field descriptions below.
%
% Usage: >> [EEGOUT,changes] = eeg_checkset(EEG); % perform all checks
% except 'makeur'
% >> [EEGOUT,change... |
e9239d559dbb73d44f9725323e7a8080600722b7e97dfe79deada12d4d47f709 | MATLAB | 69,254 | 1,638 | function data = TDTbin2mat(BLOCK_PATH, varargin)
%TDTBIN2MAT TDT tank data extraction.
% data = TDTbin2mat(BLOCK_PATH), where BLOCK_PATH is a string, retrieves
% all data from specified block directory in struct format. This reads
% the binary tank data and requires no Windows-based software.
%
% data.e... |
1d19c49c25d6e17375ce6702bbc9d6fb32b5ccf3b7649d05c56b05d52b62b56c | MATLAB | 70,628 | 1,661 | % topoplot() - plot a topographic map of a scalp data field in a 2-D circular view
% (looking down at the top of the head) using interpolation on a fine
% cartesian grid. Can also show specified channnel location(s), or return
% an interpolated value at an arbitrary scalp locat... |
f0f7471becf44361846a0f5ca99111274c714b97cb8342aead9daaadf7e4a048 | MATLAB | 70,890 | 2,274 | %% neuroDemo5
%
% neuroDemo5 reproduces the canonical neuroscience experiment
% simulations. Note, the scratch directory in the simulations folder will
% be used to save data. These simulations will take up about 2.5 hours
% to run and it will require about 0.5 GB of space.
%
% Other m-files required: modelt... |
e6bd0dc039a1ed98c51c25d4bbe96d69d8241560eef944a5f3ec5118844d56e6 | MATLAB | 71,402 | 1,971 | function ret = fiberGT_tool(varargin)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% % fiberGT_tool(commandstr1,varargin1,commandstr2,varargin2,.....)
% %
% % implements global fibertracking
% % based on M.Reisert et al. 'Global Reconstruction of Neuronal Fibers',
% % MI... |
3826cc82823e09983b2b25082de70f7104f7134fcd1a0119e1f8816fd4591888 | MATLAB | 71,914 | 973 | classdef standard_resample_CV
% standard_resample_CV is an object that implements the main functionality of
% a cross-validator (CV) object. Namely, it takes a classifier (CL), a datasource (DS)
% and optionally feature preprocessor (FP) objects, and it run a cross-validation
% decoding scheme by training and t... |
3aa95439a3897c7dda69fe1ecfb7c52e372534f51c30d2ebf7485271f5c2e0d2 | MATLAB | 72,288 | 1,571 | function palm_saveall(plm,opts)
% Save most of the outputs from PALM.
%
% _____________________________________
% Anderson M. Winkler
% FMRIB / University of Oxford
% Oct/2014
% http://brainder.org
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% PALM -- Permutation Analysis of Linear Models... |
2dfb6e0a71e5fb2c580fbbae20018ae3151fc33ec0465e4722fbdddfb4ebd15c | MATLAB | 75,237 | 1,815 | %% h_signature_responses_group_diff.m
%
%
% *USAGE*
%
% This script runs a two-sample t-test for a set of signature responses,
% for each contrast, plotting group differences in signature response and
% printing between-group test statistics for each. Calls
% plugin_get_group_names_colors, barplot_columns, and ttest2_p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.