sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
c83b8cfb3b93d0ee423225dced8ea1639ac20b9eb97a1433f616638f5dfcd560 | MATLAB | 7,415 | 217 | function [finalMean, stdSample, inlierIdx, outlierIdx] = robustMean(data,dim,k,fit,logical_idx)
%ROBUSTMEAN calculates mean and standard deviation discarding outliers
%
% SYNOPSIS [finalMean, stdSample, inlierIdx, outlierIdx] = robustMean(data,dim,k,fit)
%
% INPUT data : input data
% dim : (opt) dime... |
74c52eefbe3e573969df0fc953ff07d3794d6217e64904d552cfb04e30434ce7 | MATLAB | 7,421 | 164 | % Name: Robert Kim
% Date: 05-14-2023
% Email: robert.f.kim@gmail.com
% Script to plot example CEBRA trajectories for attended vs. unattended
% modality in the 2-modality DMS (delayed-match-to-sample) RNN.
% Produces panels for Fig. 2f and Fig. 2g.
%
% Inputs (see ../cebra_for_matlab.ipynb for how these are generated):... |
005b5e542130adeb99c350e3a1185bc12171fdeb78ec9de591d4b4ac45dcc5fc | MATLAB | 7,427 | 217 | %%***********************************************************************
%% validate: validate data
%%
%%
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%***********************************************************************
function [blk,At,C,b,di... |
cec4c815cf3f456f3097ae9995b523cf8c0a8fa7a83756151445b8e273b55b15 | MATLAB | 7,427 | 196 | function [cfile, map_list, pathway_list] = ea_unifiedmapping_mergePathways(obj)
% merges pathways from different .mat files and stores them in the
% LeadGroup folder as "merged_pathways.mat"
% also returns global indices of the first fibers in pathways and the
% corresponding list of pathways' names
myDir = [ea_getco... |
fcc3e4c03ffaeee3338e585a3e6e7e127f687d4973a104614d2ee6a99ad84b77 | MATLAB | 7,428 | 280 | function [ outp, sdp_mode ] = newcnstr( prob, x, y, op, sdp_mode )
persistent map_eq map_le map_ge map_ne
%
% Check problem
%
if ~isa( prob, 'cvxprob' ),
error( 'A cvx problem must be created first.' );
end
global cvx___
p = prob.index_;
y_orig = y;
%
% Check for a dual reference
%
dx = cvx_getdual( x );
dy... |
ae1231f1c32d1039b07493919e5dd0533d5b69e7dd2912db374b576019413ec7 | MATLAB | 7,431 | 184 | function [DTI_CM, DTI_LEN] = ea_createCM_dti(options)
% This function creates a structural (dMRI-based) Connectivity matrix.
% __________________________________________________________________________________
% Copyright (C) 2015 Charite University Medicine Berlin, Movement Disorders Unit
% Andreas Horn
% Use only fi... |
329c84a9a3b7590243c1816be446f0dddd1b3593b68f32e5e83157cf3dce8df4 | MATLAB | 7,435 | 201 |
%% raw data GUI
function rawDataGuiHandle = rawDataGUI(memMapData, ephysData, plotColor)
% if isempty(memMapData)
% display('Extract data on the fly using python. You need Matlab version 2022a or higher, and have it pointed to the correct (Anaconda) environment')
% end
%% set up dynamic figure
rawDataGuiHandle ... |
2b4ae5960ac992de08abf8ad2773351dee2583e24a0a4bd1f197488138eaa226 | MATLAB | 7,438 | 191 | function sleepstagesOUT = dan_import_sleepstages(sleepstagesIN, values)
% Generic sleep stage conversion file. Input is a list of sleep stages (one
% row = one epoch), and a list of values that correspond to Wake, N1, N2,
% N3, N4, REM, Movement, Unstaged
%%
% Authors: Dan Denis
% Date: 2021-07-14
%%
if isa(slee... |
3dde0b43270867825402e8e9c2aeddcf223a14eecbfbf3dc0b8204be4b30b6d4 | MATLAB | 7,439 | 179 | % pop_rmbase() - remove channel baseline means from an epoched or
% continuous EEG dataset. Calls rmbase().
% Usage:
% >> OUTEEG = pop_rmbase( EEG ); % pop up an interactive arg entry window
% >> OUTEEG = pop_rmbase( EEG, timerange, pointrange); % call rmbase()
%
% Graphic interface:
% "Baseline ... |
ce103867fffaa1674b96c6a6ca65ee98153731486796109dc47138f5d94bc474 | MATLAB | 7,446 | 176 | function [dz,vdz,Adz]=two_group_test_coherence(J1c1,J2c1,J1c2,J2c2,p,plt,f)
% function [dz,vdz,Adz]=two_group_test_coherence(J1c1,J2c1,J1c2,J2c2,p,plt,f)
% Test the null hypothesis (H0) that data sets J1c1,J2c1,J1c2,J2c2 in
% two conditions c1,c2 have equal population coherence
%
% Usage:
% [dz,vdz,Adz]=two_samp... |
80a759dd96c61ec5a5244d5b877882cb3b132a74d1643eb88f4016799e6723d6 | MATLAB | 7,450 | 236 | function [thresh,cross,bihist,diptest,overthresh] = bz_BimodalThresh(bimodaldata,varargin)
%[thresh,cross,bihist,diptest,overthresh] = bz_BimodalThresh(bimodaldata)
%takes bimodal time series data, calculates the threshold between the modes
%(i.e. UP vs DOWN states), and returns the crossing times (i.e. UP/DOWN onset/... |
71461e9dcbcd992f6043cb76775b48d7753be64f3e23c9b2d1ba916ae6fe96d3 | MATLAB | 7,453 | 193 | function[fluordata,fluordata_red,fluordata_diff,ROIs,redtemps]= pooldirections2(headpath,fileexpnum,imskip,expskip,deltamode,FrameRate)
% point towards wherever the experiment data for matlab
%control is and then pool across experiments for all ROIs
%then will be able to average across individual ROIs for multiple t... |
cce818f58d99f4ac0215caf034fbaeacbb45560d799a0ff0739c0771535d5793 | MATLAB | 7,460 | 182 | function [fibsvalBin, fibsvalProb, fibsvalMean, fibsvalPeak, fibsval5Peak, fibcell, connFiberInd, totalFibers] = ea_discfibers_calcvals_pam_prob(pamlist, obj, cfile)
% Extract fiber connection values from OSS-DBS results (for a particular connectome)
% use "probabilistic" PAM results
disp('Load Connectome...');
load(c... |
6d1cc0bfedd97aab9d0c76d5493fb0a0e753384053c0560ffa7033dc52762790 | MATLAB | 7,461 | 182 | function [fibsvalBin, fibsvalProb, fibsvalMean, fibsvalPeak, fibsval5Peak, fibcell, connFiberInd, totalFibers] = ea_discfibers_calcvals_pam_prob(pamlist, obj, cfile)
% Extract fiber connection values from OSS-DBS results (for a particular connectome)
% use "probabilistic" PAM results
disp('Load Connectome...');
load(c... |
973888770de10f02468ee2a2e75fe096158dc292f57a4c389f6e3d92f884bcf6 | MATLAB | 7,462 | 223 | %% LaBGAScore_secondlevel_extractparcels_sessions.m
%
%
% *USAGE*
%
% This simple script allows you to extract parcel- and roi-wise
% within-session contrasts based on the results of a between-session
% contrast and create a results table that can be flexibly used for
% plotting, stats, etc
%
%
% *OPTIONS*
%
% * do_par... |
f49fbec63d6d583f56424770b3cb43c3a1fb1e2592ec1bfeda228c5442fbc031 | MATLAB | 7,468 | 238 | function savesurfpoly(v,f,holelist,regionlist,p0,p1,fname,forcebox)
%
% savesurfpoly(v,f,holelist,regionlist,p0,p1,fname)
%
% save a set of surfaces into poly format (for tetgen)
%
% author: Qianqian Fang, <q.fang at neu.edu>
% date: 2007/11/21
%
% input:
% v: input, surface node list, dimension (nn,3)
% i... |
67a1a60eee201f5296f45ca6f369c1899e31c374c88c9e4f5eedb43174cba0fb | MATLAB | 7,475 | 175 | % Contact ythomas@csail.mit.edu or msabuncu@csail.mit.edu for bugs or questions
%
%=========================================================================
%
% Copyright (c) 2008 Thomas Yeo and Mert Sabuncu
% All rights reserved.
%
%Redistribution and use in source and binary forms, with or without
%modification, a... |
cef451458f1c831cedca434d4d88c16d805d05aede27f34a1db3aa63e9c7ba6c | MATLAB | 7,487 | 186 | function varargout = pdftops(cmd)
%PDFTOPS Calls a local pdftops executable with the input command
%
% Example:
% [status result] = pdftops(cmd)
%
% Attempts to locate a pdftops executable, finally asking the user to
% specify the directory pdftops was installed into. The resulting path is
% stored for futur... |
e06cab4d9423871e473bfe0c6e7e29777efb5b03a112fa0c6bdb47f87b2beee5 | MATLAB | 7,488 | 178 | function LCN12_realign_dy_PET(filename_dyPET,frame_definition_file,threshold_translation,threshold_rotation)
% This function will realign dynamic PET images.
% If measured from the start of the injection, the first 5 minutes will be
% summed and it is assumed that there is not movement during this 5 minutes
% (which... |
7e4d67f283791057cce6a79ee72836e4f0a2bcdf48d65e931c81c030ef0acace | MATLAB | 7,500 | 185 | function cbm_labels = CBIG_IndCBM_cerebellum_parcellation(surf_label_file, vol2surf_fc, template_file, output_dir, ...
varargin)
% cbm_labels = CBIG_IndCBM_cerebellum_parcellation(surf_label_file, vol2surf_fc, template_file, output_dir, varargin)
%
% This function create individual cerebellum parcellation based on... |
6cb1538426913dba6179f90c56ccc762ffbf033aa04907de7e06c61b80ce33b9 | MATLAB | 7,506 | 174 | % std_getindvar - get independent variables of a STUDY
%
% Usage:
% [indvar indvarvals] = std_getindvar(STUDY);
% [indvar indvarvals] = std_getindvar(STUDY, mode, scandesign);
%
% Input:
% STUDY - EEGLAB STUDY structure
% mode - ['datinfo'|'trialinfo'|'both'] get independent variables
% link... |
cc7e12636d43ee847bde739006c7e863f1bcda9c0685c8c619f2420d1ecf35c7 | MATLAB | 7,508 | 197 | function varargout = ea_spec2dwrite(varargin)
% EA_SPEC2DWRITE MATLAB code for ea_spec2dwrite.fig
% EA_SPEC2DWRITE, by itself, creates a new EA_SPEC2DWRITE or raises the existing
% singleton*.
%
% H = EA_SPEC2DWRITE returns the handle to a new EA_SPEC2DWRITE or the handle to
% the existing singleton... |
c28ffc641431fc284334754f57a0b792290792a66fba613cc5427e2f217e7715 | MATLAB | 7,512 | 219 | function [s,f] = ltas(x,fs,varargin)
%LTAS calculate the long-term average spectrum of a signal
%
% S = IOSR.DSP.LTAS(X,FS) calculates the long-term average spectrum
% (LTAS) of signal X, sampled at FS Hz. The spectrum is calculated from
% the average power spectral density (PSD) obtained from a series of
% ov... |
047d2deb5543812976e9512e67b9fbb3e28a123497a817d170ba0ea588cd89e9 | MATLAB | 7,519 | 221 | function aggregatedTracks = collectTrackingData(rootFolder, options)
% COLLECTTRACKINGDATA Explore a folder tree and compile all raw tracking
% coordinates into a single tagged table, one row per timepoint.
%
% Traverses a directory tree ending in tracker folders containing
% Results.csv files. Every folder level above... |
d7fe7085454fd6bd2bf30edd7154db05cd787baa6b87603abf20c360396ce7b5 | MATLAB | 7,519 | 172 | classdef SegmentBlobsPlusLocMaxSimpleProcess < DetectionProcess
% A concrete class for detecting large and diffraction-limited objects using thresholding and local maxima detection
% Tony Vega 09/2017
% Orginal Khuloud Jaqaman
%
% Copyright (C) 2021, Jaqaman Lab - UTSouthwestern
%
% This file is part o... |
0f0e20966efe0b87b2cf84699e1501b3cbb89d3b1c5fe13def436b762462a776 | MATLAB | 7,531 | 190 | function [sorted_features ANOVA_pvals] = rank_features_using_an_ANOVA(X_data, Y_labels)
% A helper function that does a one-way ANOVA on each feature and returns a p-value
% for each feature and a ranking of the features based on their p-values.
% Essentially this is a the same as running anova1 separately on ea... |
57c143318bc4c07cc3801fa6de7fa8e255b0f43ac8cfdd4f7bb9e14179fbfd96 | MATLAB | 7,538 | 267 | function [ dbcA, cones, dir, Q, P, ineqs ] = extract( pp, destructive, doineqs )
if nargin < 3 || nargout < 6, doineqs = true; end
if nargin < 2 || nargout < 5, destructive = false; end
global cvx___
p = cvx___.problems( pp.index_ );
n = length( cvx___.reserved );
%
% Objective
%
dbcA = p.objective;
if ... |
1092d283b5e0f40c61a8a928289838802587b4369857f137cf77beffaa0fb71b | MATLAB | 7,541 | 268 | function S = LaBGAScore_prov_gitstatus(repopath, varargin)
%
%
% *USAGE*
%
% Determines which tracked files in a git repository have uncommitted
% modifications, by parsing .git/index directly and comparing it against
% the working tree - WITHOUT shelling out to git.
%
% This matters because a commit hash alone does no... |
1dc57ce4317b32d4eccf1db5c96c334c23f420aa1cdc00ef919593065779d0c9 | MATLAB | 7,553 | 162 | % std_getdataset() - Constructs and returns EEG dataset from STUDY design.
%
% Usage:
% >> EEG = std_getdataset(STUDY, ALLEEG, 'key', 'val', ...);
%
% Inputs:
% STUDY - EEGLAB STUDY set
% ALLEEG - vector of the EEG datasets included in the STUDY structure
%
% Optional inputs:
% 'design... |
ba80c4bce71db68e57c9a92beb2ac408d18e9d65e1ecd89d0968807cce0d1841 | MATLAB | 7,553 | 227 | function bz_GetSynapsembles(varargin)
% bz_GetSynapsembles - identify E->I synaptic assemblies
%
% USAGE
%
% bz_GetSynapsembles(varargin)
%
% INPUTS
%
% basepath -path to recording (where .dat/.clu/etc files are)
% cellTypeSource -file format for loading cell types
% ... |
db6014a260ac8fe725c89a9a9f465875fdc8a205cc5843206b725be27766ba12 | MATLAB | 7,554 | 279 | function class_mean = economo_koskinas_spider(parcel_data, varargin)
%
% Usage:
% class_mean = economo_koskinas_spider(parcel_data, varargin)
%
% Description:
% Stratify parcellated data according to von Economo-Koskinas
% cytoarchitectonic classes (authors: @caseypaquola, @saratheriver)
%
% Inputs:
% parc... |
370ea6b05b4c1dd758ff408c2b70e6732442a7162f51febae926fd8a18c2deaa | MATLAB | 7,555 | 206 | % Name: Robert Kim
% Date: 05-13-2023
% Email: robert.f.kim@gmail.com
% two_modality_one_layer_intact.m
% Description: Evaluate the INTACT one-layer two-modality (instr2) RNN models
% across all 5 trained networks. Two condition-fixed sweeps live in this file
% and produce intact-baseline .mat files consumed by plot_tw... |
8c4c69fe6dfb1d98e8118599f44ee131faebb70547e00cb543b7511a51f77261 | MATLAB | 7,555 | 207 | function [ comod ] = bz_Comodulogram(lfp,specparms,figparms)
%[ comod ] = bz_Comodulogram(lfp,specparms,figparms) calculates the
%comodulogram (i.e. power-power correlation) for an lfp file.
%
%
%INPUT
% LFP LFP structure in buzcode format:
% a structure with fields lfp.data, lfp.timestamps, lfp... |
3c2f048c5d6d02df68297440bdb7f91a6cee89c04edf0be4821c80546060fc5f | MATLAB | 7,563 | 138 | % Help for file Mat2NlxEV
% Version 4.1.1
%
% Purpsose
% The purpose of this program is to take extracted Neuralynx data from the matlab environment and create the appropriate Neuralynx file.
%
% Composition
% This program is a matlab mex file compilation of matlab and C++ source code.
% C++ source code is used to ext... |
4b2e862c26e0104e61831c026d8934396cfbd0490ede6052e76ffd13a53941c0 | MATLAB | 7,564 | 180 | function [TtrfAnml,TtrfROI] = compileTRF(varargin)
% [TtrfAnml,TtrfROI] = compileTRF(varargin)
% compiles TRF output across animals into one table
%
% INPUT:
% varargin:
% loadParams bool --> load existing params file, 1 yes, 2 no
% paramsFilePath -->... |
b338474c28a785a26d765bba45e0bc1f9433dcc48233c7d0a184a4915be6a03b | MATLAB | 7,566 | 263 | function [ EMGwhisk ] = GetWhiskFromPiezo( basePath,varargin )
%[ EMGwhisk ] = GetWhiskFromEMG(basePath )
%This is a detector that extracts whisking/nonwhisking epochs from
%implanted EMG in the whisker pad. Extracts also the EMG and EMG envelope.
%
%INPUT
% Assumes presence of the following files:
% basePath... |
91193581c0f40c5a54d8a22e8f22c078f49f53d4e4e12dc38613f8c264bb593a | MATLAB | 7,570 | 200 | function tracksCrop = cropCompTracksFR(tracks0,frameRange)
%cropCompTracksFR crops tracks to a particular frame range
%
%SYNOPSIS tracksCrop = cropCompTracksFR(tracks0,frameRange)
%
%INPUT tracks0 : Original tracks, in form of output of
% trackCloseGapsKalman.
% frameRange : Ro... |
875ffbd403eb3baaf165a0c1dc0cafd1b679bef7609cdd3ac071949dc117a3a3 | MATLAB | 7,572 | 138 | % Help for file Mat2NlxTT
% Version 4.1.1
%
% Purpsose
% The purpose of this program is to take extracted Neuralynx data from the matlab environment and create the appropriate Neuralynx file.
%
% Composition
% This program is a matlab mex file compilation of matlab and C++ source code.
% C++ source code is used to ext... |
698f40352f81c281306b71031091f4371699817181d5ae41228e91ffd411fa64 | MATLAB | 7,573 | 242 | function [tF_OUT,isCompleted]=sim_runTrajectory(Theta,taxa_data,U,time_data,t0,dt,tmax,...
toIntroduce,density_toIntroduce,time_toIntroduce,variance_toIntroduce)
% This file is a part of the MDSINE program.
%
% MDSINE: Microbial Dynamical Systems INference Engine
% Infers dynamical systems models from microbiome ti... |
0566335211b8bfb941b10d07f4a7c205ffec28fea0635563d768ee561c69f922 | MATLAB | 7,576 | 138 | % Help for file Mat2NlxST
% Version 4.1.1
%
% Purpsose
% The purpose of this program is to take extracted Neuralynx data from the matlab environment and create the appropriate Neuralynx file.
%
% Composition
% This program is a matlab mex file compilation of matlab and C++ source code.
% C++ source code is used to ext... |
10a3a9b918bfcdf61e5b411abe7cc8c3aa3c3e8ca0f03bad29e37e333aff27d6 | MATLAB | 7,581 | 138 | % Help for file Mat2NlxSE
% Version 4.1.1
%
% Purpsose
% The purpose of this program is to take extracted Neuralynx data from the matlab environment and create the appropriate Neuralynx file.
%
% Composition
% This program is a matlab mex file compilation of matlab and C++ source code.
% C++ source code is used to ext... |
0b77c6d10f212fcbf1b7cf94a569eb82531734372a70e5289c88ac57ff727258 | MATLAB | 7,582 | 225 | function [h,p,stats] = TestSkewness(control,repeat,test,varargin)
%TestSkewness - Test if firing field skewness changes between two conditions.
%
% Current implementation only tests 1D environments.
%
% USAGE
%
% [h,p,cr,ca] = TestSkewness(control,repeat,test,<options>)
%
% control firing fields in cont... |
e8dadedec0effafcf8c3bc2bb83c8dc281fbaad4c021318c5068d4a7fe7f0bcc | MATLAB | 7,584 | 176 | % This walkthrough calculates Bayes Factors for a voxel-wise brain map using a Bayesian t-test approach.
% Bayesian t-tests
% -----------------------------------------------------------------
% We use the BF Bayes' Factor Matlab toolbox, based on:
%
% Rouder et al., 2009 % one-sample t-test, t1smpbf.m
% ... |
f66d576d9dddd87c17bb26203b6ca9dbc4b268bee1b765bc686fb0d34a2097e7 | MATLAB | 7,584 | 237 | function FaceVertexCData = makeFaceVertexCData(vertices,faces,vertex_id,data,cmap,climits,colorFaceBoundaries,unknown_color,boundary_color)
% This script will assign colours to each face/vertex by assigning each
% value in 'data' a colour from 'cmap'. This code also allows you to
% indicate if a particular area s... |
df6193da619c69f9223d4ad12b83c15a03385e0d533ea7afbfb8cf97feb3c440 | MATLAB | 7,585 | 226 | clc
clear all
close all
set(0,'defaultfigurecolor',[1 1 1]);% set figure background color
if ~contains(path, '/Users/guofanhua/Desktop/gfh/tools/MatlabTools/BrainSpace-latest/matlab')
addpath(genpath('/Users/guofanhua/Desktop/gfh/tools/MatlabTools/BrainSpace-latest/matlab'));
end
%% ======================= step 1 ... |
8c740b75f83834722af7d15379e9f52114b063a897993fe23104d045ac36c863 | MATLAB | 7,587 | 275 | function varargout=shadedErrorBar(x,y,errBar,varargin)
% generate continuous error bar area around a line plot
%
% function H=shadedErrorBar(x,y,errBar, ...)
%
% Purpose
% Makes a 2-d line plot with a pretty shaded error bar made
% using patch. Error bar color is chosen automatically.
%
%
% Inputs (required)
% x - vec... |
d26a90b870c0d01592885fed43ce4848211e1483a182cececc7ebee415322476 | MATLAB | 7,589 | 259 | function G = LaBGAScore_prov_gitinfo(repopath)
%
%
% *USAGE*
%
% Reads the state of a git repository - current commit, branch, remote,
% full reflog and reflog-expiry settings - by parsing the plain-text files
% under .git directly, WITHOUT shelling out to git.
%
% Everything this function returns lives in documented p... |
76951631ee62db77c4735977739c7d4166c81af90e0e660752619b393b3b78ea | MATLAB | 7,591 | 245 | %%*******************************************************************
%% Read in a problem in SDPA sparse format.
%%
%% [blk,At,C,b] = read_sdpa(fname)
%%
%% Input: fname = name of the file containing SDP data in
%% SDPA foramt.
%% Important: the data is assumed to contain only
%% semide... |
9130a65262fff4df8028f97ff7ac913594b3601e61bddb66a6a0329fc1c5203d | MATLAB | 7,593 | 174 | % std_checkfiles() - Check all STUDY files consistency
%
% Usage:
% >> boolval = std_checkfiles(STUDY, ALLEEG);
% Inputs:
% STUDY - EEGLAB STUDY set comprising some or all of the EEG datasets in ALLEEG.
% ALLEEG - All EEGLAB datasets
%
% Outputs:
% boolval - [0|1] 1 if uniform
%
% A... |
ff9706abf88ca2e04a34eb43059ec141b997e44e68c1700b4c8f6ae0f0e22c19 | MATLAB | 7,594 | 276 | function f=plotBiopac(data,parms,ii,po2calval,t2sal)
% Usage ... plotBiopac(data,parms,ii,po2cal,t2sal)
%
% parms=[ts t0 fco(optional) tsam print_flag(optional)]
% ii= trial#s
% po2cal=po2current_corresponding_to([0 20.8 100])
%
%if nargin<5,
t2sal_flag=0;
%else,
% if isempty(t2sal),
% t2sal_flag=0;
... |
e9ba1d6a43183ef59988a454f19385f9bba83dab6635db76d6e703ce78979a96 | MATLAB | 7,597 | 161 | function metaInfoFigure(filebase)
% no inputs, assumes you're in directory with .dat, .meta, .tsp and .mpg files
%% get filebase if doesn't exist, save
if ~exist('filebase','var')
choice = questdlg('No basename entered, use current directory name as file basename?','No Basename','Yes','Cancel','Yes');
if... |
95464c6ba09b219885dfb8b291d1169aacb1f6d54760dd0aa30a61fb11ed0009 | MATLAB | 7,599 | 158 | % pop_interp() - interpolate data channels
%
% Usage: EEGOUT = pop_interp(EEG, badchans, method);
%
% Inputs:
% EEG - EEGLAB dataset
% badchans - [integer array] indices of channels to interpolate.
% For instance, these channels might be bad.
% [chanlocs structure] channel lo... |
0acf0852eba29feec3a443bca762181dffad1b7704b45516928a400bbfedba7a | MATLAB | 7,601 | 223 | % Copyright (C) 2008 Francesco Potort� <pot@gnu.org>
% Modified to run on MATLAB by Mike Croucher (May 2010)
% www.walkingrandomly.com
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either... |
a811297b3c0312ecd42e935580351fddad0902c4ece6c6a80697b5524a780065 | MATLAB | 7,609 | 248 | function glmnetPlot( x, xvar, label, type, varargin )
%--------------------------------------------------------------------------
% glmnetPlot.m: plot coefficients from a "glmnet" object
%--------------------------------------------------------------------------
%
% DESCRIPTION:
% Produces a coefficient profile plo... |
c49f7c152bb5a68054a70c3cebd630cd98365a33e2be35a8198a3cd9cd6ffa5c | MATLAB | 7,609 | 183 | function varargout = impexp_run_bo2nifti(cmd, varargin)
% Template function to implement callbacks for an cfg_exbranch. The calling
% syntax is
% varargout = impexp_run_bo2nifti(cmd, varargin)
% where cmd is one of
% 'run' - out = impexp_run_bo2nifti('run', job)
% Run a job, and return its output argu... |
44c0bd61541a2d5d5a1364b2141eff38672ffcebb6d65c50f7a8b34a2bc3d79f | MATLAB | 7,610 | 237 | function ft_write_headshape(filename, bnd, varargin)
% FT_WRITE_HEADSHAPE writes a head surface, cortical sheet or
% geometrical descrition of the volume conduction model or source
% model to a file for further processing in external software.
%
% Use as
% ft_write_headshape(filename, bnd, ...)
% or
% ft_write_hea... |
1510428521ab2ca7b0d0556e6e9707e5d9f97561a7f8ee370dd6c0877e41831d | MATLAB | 7,611 | 188 |
function sessionsPipeline(varargin)
% expPipeline(varargin)
% Master script for launching the basic pre-processing of Intan recorded ephys data.
% Is meant to be run on a folder with multiple sesions from different
% animals and organizes them into same-day recordings as a first step.
%%%%%%% EXPLAIN HERE NAME CONV... |
dec402143cd82f82b22d248c32f1ad394b68d0767aa314d8ba84d6a22bb401e2 | MATLAB | 7,616 | 183 | function varargout = impexp_run_fa2nifti(cmd, varargin)
% Template function to implement callbacks for an cfg_exbranch. The calling
% syntax is
% varargout = impexp_run_fa2nifti(cmd, varargin)
% where cmd is one of
% 'run' - out = impexp_run_fa2nifti('run', job)
% Run a job, and return its output argu... |
d6006f1f6d871e4f5d3d0be2a1631911697e8d65785eb65c5307b6cd014035be | MATLAB | 7,618 | 205 | %IM2GIF Convert a multiframe image to an animated GIF file
%
% Examples:
% im2gif infile
% im2gif infile outfile
% im2gif(A, outfile)
% im2gif(..., '-nocrop')
% im2gif(..., '-nodither')
% im2gif(..., '-ncolors', n)
% im2gif(..., '-loops', n)
% im2gif(..., '-delay', n)
%
% This function c... |
06d2dccc366ca6917100ddfc0f64417b255ea0a7bc240be0657298e02c86fcd0 | MATLAB | 7,619 | 155 | function [] = doBayesianSelect(cfg,outputDir,T,intervene_matrix,perturbations,data,species_names,BMD,experimentBlocks)
% This file is a part of the MDSINE program.
%
% MDSINE: Microbial Dynamical Systems INference Engine
% Infers dynamical systems models from microbiome time-series datasets, and
% predicts biologically... |
9259a3392a6aa702a02a94a6224014e99eff9e3dbced605d21e8494facef5df1 | MATLAB | 7,620 | 168 | function homo_with_weight = CBIG_MSHBM_parameters_validation(project_dir,mesh,num_sess,num_clusters,subid,w,c)
% homo_with_weight = CBIG_MSHBM_parameters_validation(project_dir,mesh,num_sess,num_clusters,subid,w,c)
%
% This script will estimate the individual-level parcellation for the
% validation subjects with num_c... |
308ce09db08a750be16bd91bb7ca75a3f3419cac2e5627308c50540ef9dfc468 | MATLAB | 7,622 | 215 | function [cT, cNull, cCritical] = colocalMeasurePt2Blob(segmentationCoords,detectionCoords, threshold, maskingFile, alphaValue,varargin)
%COLOCALMEASUREPT2Blob measures the colocalization between segmentation and detection point
%
%Synopsis: [cT, cNull, cCritical] = colocalMeasurePtBlob(SegemntationCoords,..... |
4f1f733f1be5e0b583970836994dcb7b1eada304d82a9cb25ec7d9ae3035ef7a | MATLAB | 7,622 | 182 | function bands = SpectrogramBands(spectrogram,frequencies,varargin)
%SpectrogramBands - Determine running power in physiological bands.
%
% USAGE
%
% bands = SpectrogramBands(spectrogram,frequencies,<options>)
%
% spectrogram spectrogram obtained using <a href="matlab:help MTSpectrogram">MTSpectrogram</a>
% ... |
7241a037d16ed7976bc13fc136b7e434f7bf43dfaff53606a7cdc0119d540676 | MATLAB | 7,625 | 138 | % Help for file Mat2NlxCSC
% Version 4.1.1
%
% Purpsose
% The purpose of this program is to take extracted Neuralynx data from the matlab environment and create the appropriate Neuralynx file.
%
% Composition
% This program is a matlab mex file compilation of matlab and C++ source code.
% C++ source code is used to ex... |
7224596c1c0bebc3bce4ad69b5c60a2f273da01feb9042c8af5d649593d43e21 | MATLAB | 7,627 | 207 | function Save_SingleData(handles, f_wait, ifhold)
if nargin == 1
f_wait = waitbar(0.2,'Saving');
end
if nargin < 3
ifhold = 1;
end
moviedir = fullfile(handles.filepath, handles.filename);
im_norm = handles.im_norm;
Feature_parameters = handles.defaultPara;
Feature_parameters.BitsPerSample = handles.BitsPerSampl... |
a257914def69ea6506e664f2e2513c472c52312be80bf50a15a822d0763f3ba8 | MATLAB | 7,631 | 183 | function ea_export_server(hobj,ev,options)
disp('Exporting data to LEAD Server...');
%keyboard
if ~isfield(options.prefs.ls,'dir')
% configure server output directory for the first time.
serverdir=uigetdir([],'Please choose output directory for LEAD-server.');
if ~serverdir % user pressed cancel.
r... |
02ba547bb05769355cb3147a3093df6e2faf9a81bed8298597efe94228256de7 | MATLAB | 7,632 | 142 | function ClincFreq_CentNumStat(outdirCent,OutCentdir,SetUpPara,Para,AtlasTempU)
for i = 1:length(SetUpPara.ParaOut)
LabName = SetUpPara.ParaOut(i).LabName;
CentDir{i} = [OutCentdir,filesep,LabName,filesep];
if Para.CentNum.R
if length(dir([CentDir{i},'ROIWise',filesep,AtlasTempU{1,3},filesep,'Group... |
850defed1f316ec15f535f297fc24e8361940509475ae710be89392d3b8d3003 | MATLAB | 7,632 | 160 | function outstruct = cifti_read(filename, varargin)
%function outstruct = cifti_read(filename, ...)
% Read a cifti file.
% If wb_command is not on your PATH and you need to read cifti-1
% files, include the extra arguments ", 'wbcmd', '<wb_command with full path>'".
%
% >> cifti = cifti_... |
0f83d0561ac7c87f4fda217a7a3bd3e1bc1a66b21076d7bf7aec5d2cf2c0aefc | MATLAB | 7,638 | 207 |
function [ csd, lfpAvg ] = bz_eventCSD_lv_forexamplefigs(lfp, events, animal, group, filter, csd_lyr_borders, region, varargin)
% [ CSD ] = bz_eventCSD (lfp, events, varargin)
% Calculates event-triggered (i.e. SWRs) CSD map from a linear array of LFPs
% INPUT
% lfp a buzcode structure with fields lfp.... |
85b8549059dadf285a8ca3a43a4f61b14d11c9e2f6121a600549ca1e261f3e57 | MATLAB | 7,647 | 253 | function bz_LFPfromDat(basepath,varargin)
% perform lowpass (2 X output Fs) sinc filter on wideband data
% subsample the filtered data and save as a new flat binary
% basename must have basename.dat and basename.xml
% basepath is the full path for basename.dat
%
% note that sincFilter was altered to accomodate GPU filt... |
ac62cfd5f3a14f3c56bc20f6b61bec3e9b9a79c39f5a34ff508c9197da3924f7 | MATLAB | 7,648 | 237 | % eeg_addnewevents() Add new events to EEG structure. Both EEG.event and
% EEG.urevent are updated.
%
% Usage:
% >> EEG = eeg_addnewevents(EEG, latencies, types, fieldNames, fieldValues);
%
% Inputs:
% EEG - input dataset
% latencies - cell containing numerical arrays for latencies of new
% ... |
d9e410295b94842e4a4d9dd12792d35e0f3040f6b918fb07d0c01f3995b7934b | MATLAB | 7,652 | 228 | function SetCurrentSession(varargin)
%SetCurrentSession - Load all data for a given recording session.
%
% Set current session files and read data from disk. Calling SetCurrentSession
% without parameters will display a file selection dialog.
%
% USAGE
%
% SetCurrentSession(varargin)
%
% basepath optional... |
bf568e33d3ef237250064e71028d32ae231fbbc7b10a9379ade4fc8e5c1301c8 | MATLAB | 7,653 | 238 | function [cor, lag, smooth, theta_skip_index] = AutoCorr(self, cel, varargin)
% Returns and optionally plots spiketime autocorrelation
%
% Capable of velocity thresholding, and multiple epoch averaging. If root
% has multiple epochs and average_epochs is set to 1, then the returned
% correlation is a vector. If it is s... |
ed0793b0e43a8df7c008187c4c7bab7e2087f2e351e3c7199f5c72bc2d351870 | MATLAB | 7,654 | 208 | function decompDataFile = extractCbinData(fileName, sStartEnd, allChannelIndices, doParfor, saveFileFolder, onlySaveSyncChannel, verbose)
%
% requires the zmat package:
% https://github.com/fangq/zmat
% ------
% Inputs
% ------
% fileName - full path to the .cbin filename you want to read from
% sStartEnd - a 1... |
5855f1e896e110545e689ec02de9f00ade1ad7f9685c88cdd62063baa70dacd0 | MATLAB | 7,655 | 201 | function index=alltrialstimecourse_all(headpath,fileexpnum,version,saveex,picknew,savefigs)
%use this one when the data has been analyzed before and saved.
%return the index of the example to be saved with the filename for the
%paper
% need a way to save two examples for vt062617 -running it twice should
% actually sav... |
de7036b4fcb13becf269aee5065fc351ebc1fa799c64fa536939af75fafcc693 | MATLAB | 7,655 | 224 | num = 181;
m = ['CH1','CH2','CH3','CH4','ERG'];
total = 1.2;
%单通道
for i = 4
disp(m(3*(i-1)+1:3*i))
retina = load(strcat('retina-',m(3*(i-1)+1:3*i),'.txt'));
% retina = load(strcat('ERG.txt'));
x_mm=-reshape(retina(:,1)*1000+1.5678,num,num);
y_mm=-reshape(retina(:,2)*1000-10.0814,num,num);... |
6cdb6230c15d3439675b3de8fe72c9cbd9d94a52017c0fb07e1ff55dff7d1496 | MATLAB | 7,661 | 226 | function slicebw=ea_largestcomponent(slicebw)
stats=conncomp(slicebw);
if stats.NumObjects>1
maxlen=0;
for i=1:stats.NumObjects
if length(stats.PixelIdxList{i})>maxlen
maxlen=length(stats.PixelIdxList{i});
biggestobj=i;
end
end
slicebw(:)=0;
slicebw(stats.PixelIdxLis... |
a9af36893739d5ca794c0c9d45abb01ab185c8b65cfcd25ced847e9837c720a0 | MATLAB | 7,664 | 269 | % movav() - Perform a moving average of data indexed by xvals.
% Supports use of a moving non-rectangular window.
% Can be used to resample a data matrix to any size
% (see xadv NOTE below) and to regularize sampling of
% irregularly sampled data.
% Usage:
% >> [outdata,outx] ... |
cdeeaeec841c1ae821a058d1ad0646c6c016be9eb0b25676a67a4af89c9484a0 | MATLAB | 7,672 | 178 | %
% This is a calling routine to test & check out the power spectrum &
% spectrogram routines for unequal segment lengths. In addition, use it
% to compare with Chronux routines when segments are of equal length.
%
clear all;
if 0
dir = 'G:\ravi\Chrowser\Pass~ Tioga_0e927741-9673-46e5-9050-ca1d7541bf22\';
xf... |
8e45ac12909c1f68a938f99dce45b5515a42bb924a24cb1b8c3e85354d471687 | MATLAB | 7,674 | 141 | % Help for file Mat2NlxVT
% Version 4.1.1
%
% Purpsose
% The purpose of this program is to take extracted Neuralynx data from the matlab environment and create the appropriate Neuralynx file.
%
% Composition
% This program is a matlab mex file compilation of matlab and C++ source code.
% C++ source code is used to ext... |
04c4774964bbc8cb710831fb53781a176fa120f7fbcd1a30b44c401af869b01b | MATLAB | 7,681 | 183 | function varargout = impexp_run_trace2nifti(cmd, varargin)
% Template function to implement callbacks for an cfg_exbranch. The calling
% syntax is
% varargout = impexp_run_trace2nifti(cmd, varargin)
% where cmd is one of
% 'run' - out = impexp_run_mrstruct2nifti('run', job)
% Run a job, and return its... |
30d87476fb4dedfa5f3397fbdde2ea1a551f745916a4289e84fe4a92c5241dc9 | MATLAB | 7,684 | 253 | function [stats, epoch_time, ev_epochs, comp_data, sd] = PermutAmpChange_Commonbaseline( ts, para, varargin)
% Within-conidtion event-induced amplitude change
%
% Usage
% [stats, epoch_time, ev_epochs, amp] = PermutAmpChange_Commonbaseline( ts, para)
%
% Input
% ts, time series vector
% para = [];
% p... |
2251c49071a7a532d54427cefedb88d1ec6d52001c3478fea7ec5fd608c5f3a6 | MATLAB | 7,686 | 203 | function cs_dmri_conseed(connBaseFolder, options)
connName = options.lcm.struc.connectome;
sfile = ea_handleseeds(options.lcm.seeds');
cmd = ea_lcm_resolvecmd(options.lcm.cmd);
switch options.lcm.struc.espace
case 1
space = '222.nii';
case 2
space = '111.nii';
case 3
space = '555.n... |
0c79bdec5c951849310686298e79123fe58d1c39153f4fae8f0f89e755760bec | MATLAB | 7,699 | 226 | % THIS SCRIPT RUNS BETWEEN-PERSON CONTRASTS
% Assuming that groups are concatenated into contrast image lists.
% Requires DAT.BETWEENPERSON.group field specifying group membership for
% each image.
% --------------------------------------------------------------------
%% Now set in a2_set_default_options
%-----------... |
0ea0e9a8fcebef68f77be0912257da11cf990656ce9039d6c70ef46b6fbce0f2 | MATLAB | 7,702 | 259 |
% Version 26/06/2026
% Authors: Alessandro Petrini and Davide Pierangeli
% -------------------------------------------------------------------------
% This script is provided as a reference implementation of the digital
% decryption network in the multidimensional optical encryption system
% described in the manusc... |
b56da9ae1a08d6ea955c0d3fb464d1a6ee32576ab475eb9b31fa9aa1adae5b78 | MATLAB | 7,702 | 181 | function [p,s] = spm_preprocessing(p,s, subnr, sessnr)
% [p,s] = spm_preprocessing(p,s, subnr,sessnr)
%
% p and s are path and scan parameter storage variables respectively as defined in "run_PRF_Hugo_V7.m"
% subnr = index of current subject analysed
% subnr = index of current session analysed
%
% [1] Split raw 4D ... |
a9274efd4a4a20122aeeb577b0f2e35fc89ec753d08d1448deb747c67beee84c | MATLAB | 7,704 | 229 | function baseline = CBIG_MMLDA_hypotest_dependent_factors(k, N, betas, stats, output, CI_scale)
% baseline = CBIG_MMLDA_hypotest_dependent_factors(k, N, betas, stats, output, CI_scale)
%
% This function will do omnibus and pairwise tests of k factors.
%
% Input:
% - k : number of factors
% - N : nu... |
65168f70b1bd1e03e69689af0cfa9f832cfa2f42144e80d590730fd2d15d249a | MATLAB | 7,709 | 152 | function [] = doBayesianInference(cfg,outputDir,T,intervene_matrix,perturbations,data,species_names,BMD,experimentBlocks)
% This file is a part of the MDSINE program.
%
% MDSINE: Microbial Dynamical Systems INference Engine
% Infers dynamical systems models from microbiome time-series datasets, and
% predicts biolog... |
d0a3fd444b1706d22f7df0b4086932bb78987fd1519e3e2f74cb4487055366b9 | MATLAB | 7,712 | 275 | function cvx_end
%CVX_END Completes a cvx specification.
% CVX_BEGIN marks the end of a new cvx model, and instructs cvx to
% complete its processing. For standard, complete models, cvx will send
% a transformed version of the problem to a solver to obtain numeric
% results, and replace references to cvx vari... |
04616190cad43e8ffc4bc991ec179fd2b61fb9415f681f2bafe35bacda90fb84 | MATLAB | 7,719 | 183 | function varargout = impexp_run_eigVal1_2_nifti(cmd, varargin)
% Template function to implement callbacks for an cfg_exbranch. The calling
% syntax is
% varargout = impexp_run_eigVal1_2_nifti(cmd, varargin)
% where cmd is one of
% 'run' - out = impexp_run_mrstruct2nifti('run', job)
% Run a job, and re... |
a6d19c2a3a062da64f93797826fc62cc3b6083b8fb3b94939fbe2534ef3fa756 | MATLAB | 7,719 | 183 | function varargout = impexp_run_eigVal2_2_nifti(cmd, varargin)
% Template function to implement callbacks for an cfg_exbranch. The calling
% syntax is
% varargout = impexp_run_eigVal2_2_nifti(cmd, varargin)
% where cmd is one of
% 'run' - out = impexp_run_mrstruct2nifti('run', job)
% Run a job, and re... |
468015135de6517efbe07212b9576358a6c8dd0f52a55ea5645e7f6f0fd91bc0 | MATLAB | 7,723 | 183 | function varargout = impexp_run_eigVal3_2_nifti(cmd, varargin)
% Template function to implement callbacks for an cfg_exbranch. The calling
% syntax is
% varargout = impexp_run_eigVal3_2_nifti(cmd, varargin)
% where cmd is one of
% 'run' - out = impexp_run_eigVal3_2_nifti('run', job)
% Run a job, and r... |
3f86d72469a620ccf59f03df45e4ac2fd653512ea5888d104a4aa889dbfbde4d | MATLAB | 7,725 | 194 | % pop_selectcomps() - Display components with button to vizualize their
% properties and label them for rejection.
% Usage:
% >> OUTEEG = pop_selectcomps( INEEG, compnum );
%
% Inputs:
% INEEG - Input dataset
% compnum - vector of component numbers
%
% Output:
% OUTEEG - Output dataset ... |
79e7ca4bd7eb7cb9009c083a918afc0ef4229d539896f634beca3eca5d446b9b | MATLAB | 7,726 | 198 | function CFA_CheckNormROI_batch(PG,CTmode)
% PG = uigetdir(pwd,'Check Data(after normalize)');
dir1 = [PG,filesep,'NormBG',filesep];
dir2 = [PG,filesep,'NormROI',filesep];
dir3 = [PG,filesep,'NormBGT1',filesep];
file1 = dir([dir1,'*.nii']);
file2 = dir([dir2,'*.nii']);
file3 = dir([dir3,'*.nii']);
% ansct = questdlg('... |
b8e361cddd4e69845307f9cc24a423f1b072568d8bbeb918993db01a146f372a | MATLAB | 7,730 | 199 | function randomBorders = sampleRandomBorders(allROIs, hullMask, xBounds, yBounds, Nshuffle, L, cutoff, minCount)
% Randomly propose line segments (center + orientation) and keep those whose
% endpoints lie inside a binary hull mask. For each accepted segment, classify
% nearby points by signed distance to the segment (... |
a6be89389928d16fccda0448f38c08180f6dea6526e55152e91add91e1356e65 | MATLAB | 7,734 | 150 | function [Theta_samples_lasso,Theta_samples_select,med_counts,med_biomass] = benchmarkDietDataBayes(cfg,T,perturbations,data,species_names,BMD,experimentBlocks,keep_species,intervene_matrix_filtered,intervene_matrix_filtered_merge,data_counts_filtered)
% This file is a part of the MDSINE program.
%
% MDSINE: Microbial... |
7064c302db8dccf3376647f7bc912ebc4caee2e4c7d59831b56f2021b59289a2 | MATLAB | 7,739 | 199 | %% approach and number of interactions emerged as candidates for mutant effects -> visualize networks to understand potential effect
save_plots = '/zi-flstorage/data/Shared/NoSeMaze/2_mutant/plots/sn_analysis/';
parent_path = '/zi-flstorage/data/Luise/NoSeMaze2023/DLC_output_windows/';
networks_of_interest = {'approa... |
1b5808cf6e9b5004877296aa8407a0901877b265a1fd5b9b84976d46f3e26a5e | MATLAB | 7,741 | 151 | function [Theta_samples_lasso,Theta_samples_select,med_counts,med_biomass] = benchmarkCdiffDataBayes(cfg,T,data,species_names,BMD,experimentBlocks,keep_species,intervene_matrix_filtered,intervene_matrix_filtered_merge,data_counts_filtered)
% This file is a part of the MDSINE program.
%
% MDSINE: Microbial Dynamical Sy... |
8dbfebc5fcbe7dd2dd59be03012c8ee8fbfa736bf2e475c549210abcd2a0b0a2 | MATLAB | 7,741 | 230 | %%***************************************************************
%% linsysolve: solve linear system to get dy, and direction
%% corresponding to unrestricted variables.
%%
%% [xx,coeff,L,resnrm] = linsysolve(schur,UU,Afree,EE,rhs);
%%
%% child functions: symqmr.m, mybicgstable.m, linsysolvefun.m
%%
%% SDPT... |
9af1c994d0499ca099568d9deafcc3786b0bce98beba0bdcf1496fee791bb661 | MATLAB | 7,759 | 189 | function p_behavior = CBIG_ASDf_CCA_wrapper(outputDir)
% p_behavior = CBIG_ASDf_CCA_wrapper(outputDir)
%
% Wrapper function for behavioral analyses in ABIDE-II+GENDAAR datasets using CCA
%
% Input:
% - outputDir:
% Absolute path to the output directory
% Output:
% - p_behavior:
% All p-valu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.