sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
422f901a6221dfe918b2b88ce71b70d2b726c8ae1a11e6263e3c3e9ed2852449
MATLAB
5,530
181
% mglTestScreenParams.m % % usage: mglTestScreenParams(<msc>) % by: justin gardner % date: 06/29/16 % purpose: Taken out of mglEditScreenParams so that it can be run separately. % usage: mglTestScreenParams (opens default screen) % mglTestScreenParams('screenName') opens up a spec...
a81d78be3c6f4cec5cfb8426a2a52975cdb617726764b3d6f7abdce1872359ab
MATLAB
5,531
154
function freq = ft_datatype_freq(freq, varargin) % FT_DATATYPE_FREQ describes the FieldTrip MATLAB structure for freq data % % The freq data structure represents frequency or time-frequency decomposed % channel-level data. This data structure is usually generated with the % FT_FREQANALYSIS function. % % An example of ...
34f57ea067fe7818d1b27ced8993d9e18c6063b023f99ce5635b559baa828d54
MATLAB
5,532
152
% eeglab2fieldtrip() - do this ... % % Usage: >> data = eeglab2fieldtrip( EEG, fieldbox, transform ); % % Inputs: % EEG - [struct] EEGLAB structure % fieldbox - ['preprocessing'|'freqanalysis'|'timelockanalysis'|'companalysis'] % transform - ['none'|'dipfit'] transform channel locations for DIPFIT % ...
db8f726a2d07d541381ea1e8fa310598de81e2459f2072aaa3d05c0809b177b8
MATLAB
5,538
144
% computeWienerKernel.m % % Function to compute first-order Wiener kernel, as estimate of linear % filter, using the method described in French 1976, as in Clark et al. % 2011 and Nagel and Wilson 2011. % Attenuate high-frequency content following filtering method of Nagel and % Wilson 2011. c(w) = e^(-|w-f_cut|/f_t...
c0ac4917d7215f4499aa00d0608db80241fb79c1e70c741b6b9f03ef4497063d
MATLAB
5,546
118
function event = ft_filter_event(event, varargin) % FT_FILTER_EVENT does what its name implies % % Use as % event = ft_filter_event(event, ...) % % The optional arguments should come in key-value pairs and determine the % filter characteristics: % type = cell-array with strings % value = numeric a...
f20141e493636bb8268c233e08c7b735746e08b5f1ba281bcff0c54021b03cc2
MATLAB
5,546
152
classdef Clustering < types.core.NWBDataInterface & types.untyped.GroupClass % CLUSTERING DEPRECATED Clustered spike data, whether from automatic clustering tools (e.g., klustakwik) or as a result of manual sorting. % REQUIRED PROPERTIES properties description; % REQUIRED (char) Description of clusters or cluster...
a90490aca03d7d4745e527b83f0f3c85bbbbdd2058a58737f5c2ef3e998c8c71
MATLAB
5,554
170
%Test Various things % %AUTHOR: Eric Fields %VERSION DATE: 12 June 2020 %Load a GND for testing FMUT_dir = fileparts(fileparts(which('A_setupTest'))); load(fullfile(FMUT_dir, 'testing', 'data', 'EmProb_13subs_Test.GND'), '-mat'); load(fullfile(FMUT_dir, 'testing', 'data', 'Disflu_GroupLevel.GRP'), '-mat'); ...
815dd9f1a171abdd62edac519882dea5bf0b48f2a1cdc4940cd3eb879919ab53
MATLAB
5,560
181
function Params = ReadBrukerParams(folderName, procno, Params) % updated X.L, 2019-09 % Do complicated stuff to get filename....... if(filesep=='\') % Windows delimiter = '\\'; else % Linux delimiter = '/'; end % Split up parentFolders = textscan(folderName, '%s', 'delimiter', delimiter);...
9f14954236d502b951a74d971b41edad5d94158a47721c2a93b03fcb072f7596
MATLAB
5,564
183
% Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024 % This makes Figure S10 (BF90 per context and per stability type) close all clear all clc % Paths run('../load_figure_config.m') INPUT_FOLDER = CHENGS_TASK_2C_FIGURES_CONFIG.DATA_FOLDER; OUTPUT_FOLDER = CHENGS_TASK_2C_FIGURES_CONFIG...
9c8d8ae6d767fdd4b88eb745b3650feba228d9572bcd29b156d0754af0ef88f4
MATLAB
5,569
203
function [] = Fig08_Plot_InputOutputHist_Single_TN1A2() % Code for plotting the histogram in Fig. 8e. %% parameters pIP10 = [13417,13038]; % pIP10 (L, R) pMP2 = [11977,11987]; dPR1 = [10267,10300]; % dPR1 TN1A1 = [15521,16465,15148,12883,16207,... 16113,14581,14810,15387,17640]; TN1A2 = [13945,14401,13928,16391,16...
34221f34f63dc760d736e7456627e9943873700d8aa798dd0ecf4917868f5783
MATLAB
5,570
188
function err = save_nifti(hdr,niftifile) % err = save_nifti(hdr,niftifile) % % Pixel data should be in hdr.vol % % Handles data structures with more than 32k cols by setting % hdr.dim(2) = -1 and hdr.glmin = ncols. This is FreeSurfer specific, % for handling surfaces. The exception to this is when the total % number of...
4156cd67623058152d45b0757ffe25d41bef9aa95120a7f3e1c59e6afe3cdcbe
MATLAB
5,576
149
classdef OpticalSeries < types.core.ImageSeries & types.untyped.GroupClass % OPTICALSERIES Image data that is presented or recorded. A stimulus template movie will be stored only as an image. When the image is presented as stimulus, additional data is required, such as field of view (e.g., how much of the visual field ...
7bfe188933c274e030af11ad9884ea8e00a4b16c632ab06fc3ebb07c9e39d7d2
MATLAB
5,576
187
% mglTestTex.m % % $Id: mglTestTex.m 695 2010-02-24 08:14:14Z justin $ % usage: mglTestTex(screenNum) % by: justin gardner % date: 04/11/06 % copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING) % purpose: % function retval = mglTestTex(screenNumber) % check arguments ...
b41f769b1370987898eb46ce6320bf5bc2f9ccc3831ca2c4dfe34479e8cfb77b
MATLAB
5,577
153
classdef simul3Dsphere_cuda_pgse < handle properties (GetAccess = public, SetAccess = public) TD; dtime; Tstep; NPar; Din; Dex; kappa; pinit; % dt_lls; adSig; rdSig; mdSig; akSig; rkSig; mkSig; dx2t; dx4t; sig; Del; del; bval; bvec; % dx2tSig; dx4tSig; % ...
41ae87181549cad5de47f91f6fb39d00169c5b8006663112aec63da657bd7625
MATLAB
5,587
96
function S = gen_burst_spike_times(spike_opts) % S = gen_burst_spike_times(spike_opts) % % This function creates a matrix of spike times for K neurons over nt % time-steps. The input to this function is a struct with the following % properties: % % spike_opts - Struct containing the main options used for generatin...
848b56563d060440011dfad94adbc5d270d5b1950b4cc8b456c719300e3aeb55
MATLAB
5,588
147
function [sEPhysAnalysis]= EPhysAnalysis_20161024(mouse, date, movie, touches,good_electrodes,endFrame,startRecording,stopRecording) CSC_path = uigetdir('C:\Users\alont\Documents\Tess\EphysData','CSC path'); %% Cheetah Events sf=1000000; [TimeStamps, EventIDs, TTLs, Extras, EventStrings, Header] = Nlx2Mat...
306073fe1ce4f9f63fd9dce3f78308b3fbb94b9a642a3b66cb628f4b5bdc046f
MATLAB
5,589
168
% updated 2024/3/23, function for calculating statistics of peak intensity, interpeak interval (Jerry paper) % script_BatchProcess_IPI_v2.m is for data with drug, so add a new variable % "peak_class" to indicate % 1: before drug; % 2: after drug; % 3: not the above. function [cellnum,p2p_beforeDrug,p2p_afterDrug,......
77dcd0fb7abf64febcc5505a7e6459dd5978dbaf47d352b5daba2eb5d33a9068
MATLAB
5,591
139
function [dat] = read_plexon_ddt(filename, begsample, endsample) % READ_PLEXON_DDT reads header or data from a Plexon *.ddt file, % which is a Plexon continuous data file optimized for continuous % (streaming) recording where every channel is continuously recorded % without gaps and the recording includes any dead tim...
b0c051af6271acc6ebf088bc05827dc38de01ecb62820d10975c92d016917b82
MATLAB
5,593
174
% anova_legsIC_cond.m % % Function to compute 2-way ANOVA, leg identity as % one factor and the condition identity as the other factor (select 2 or % more output files, each represents one condition). % Also performs multiple comparisons % Runs on output files of saveLegStepParamCond_bouts() % % INPUTS: % % OUTPUTS: ...
1192aee17b451ec3760c4af476f376ec1567306c38816f2a94565d9abd76ba6b
MATLAB
5,596
136
% ********** Setup the directory on your computer ********** clear restoredefaultpath filePath = matlab.desktop.editor.getActiveFilename; root0 = fileparts(filePath); addpath(genpath(fullfile(root0,'lib'))); root = fullfile(root0,'data'); projname = 'cylinder_1'; %% Create b-table using mrtrix ndir = 30; ...
5dd8c3b1763113de3bd10957545bd6af8580e6ccf2d856a6336bffa078a75289
MATLAB
5,598
136
% ********** Setup the directory on your computer ********** clear restoredefaultpath filePath = matlab.desktop.editor.getActiveFilename; root0 = fileparts(filePath); addpath(genpath(fullfile(root0,'lib'))); root = fullfile(root0,'data'); projname = 'sphere_1'; %% Create b-table using mrtrix ndir = 30; %...
af57e5487f0e5e7bfa3e5692e7d35eae7ddca115a2cf2e309c1414f3411dac34
MATLAB
5,598
149
function s = convert(tree,uid) % XMLTREE/CONVERT Converter an XML tree in a Matlab structure % % tree - XMLTree object % uid - uid of the root of the subtree, if provided. % Default is root % s - converted structure %_______________________________________________________________________...
24a16a57599c8baa9c2a85ec315a22b8e7bc9a4dc4586b96106e55653fca881e
MATLAB
5,601
191
function outtrx = FlyTracker2WingTracking_helper(ftfile,trxfile,perframedir,outtrxfile,perframe_params,arena,newid2oldid,annfile) if ischar(ftfile), ftd = load(ftfile); else ftd = ftfile; end if ischar(trxfile), intrx = load(trxfile); else intrx = trxfile; end outtrx = intrx; nflies = numel(intrx.trx); if ~ex...
8141ad27bdee4063c15f3736b953a26dc00b0381dcba8368c60dfc44d52e613a
MATLAB
5,601
217
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbD2 #SBATCH --cpus-per-task=2 #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/MCS_Neg_Wgain_D2_A%A_%a.out #SBATCH --error=outputs/MCS_Neg_Wgain_D2_A%A_%a.err #Load Matlab 2017a module ml MATLAB matlab -nojvm -nod...
851eb2a86d1d38a2dd1f14f894b4be38c69f69f167ee64646bd234a0fca224c8
MATLAB
5,604
183
% mglTestScreenParams.m % % usage: mglTestScreenParams(<msc>) % by: justin gardner % date: 06/29/16 % purpose: Taken out of mglEditScreenParams so that it can be run separately. % usage: mglTestScreenParams (opens default screen) % mglTestScreenParams('screenName') opens up a spec...
711c1d3ccb2c227cd9674452ded741a0e0b8ef14eab8d5375ea53b617af1c7bb
MATLAB
5,607
172
% % Compute link predictions using decompositions. % % PARAMETERS % $NETWORK % $DECOMPOSITION % % INPUT % dat/info.$NETWORK % dat/fit.$DECOMPOSITION.$NETWORK.mat % dat/split.$NETWORK.mat % dat/decomposition_split.source.$DECOMPOSITION.$NETWORK.mat % dat/decomposition_split.training.$DECOMPOSITION.$NETWORK.mat % % ...
8b8bace80b71967cd42ea7a733217f6b56b654a548ef45558a6f66419a6fef23
MATLAB
5,607
109
clear all close all clc addpath('/data/jux/BBL/projects/pncBaumStructFunc/spin_test/spin-test-master/scripts') addpath('/data/jux/BBL/projects/pncBaumStructFunc/scripts/colorbrewer/cbrewer/cbrewer') addpath('/data/jux/BBL/projects/pncBaumStructFunc/scripts/colorbrewer/MatPlotLib2.0_colormaps') addpath('/data/jux/BBL/p...
c12044f052188588f1f60cd9cc288614eea79e9b024209c84278c33ffd5b7ef5
MATLAB
5,607
143
% Script to make select the appropriate precompiled binaries for installation or make the mex files from source % Check if running in Octave (else assume Matlab) info = ver; isoctave = any (ismember ({info.Name}, 'Octave')); % Initialise errflag = false; clear mexext % Create cell array of paths to add arch = comp...
cd514aa94971410591542aca18d10f07061040fbe799b8a32f63c608dbba16c8
MATLAB
5,613
153
% clc, clear % close all %% a demo script to show discard too small/too dim components after network segmentation % you can supply any other criteria (like throw away boundary components, apply vessel masks, etc) % all threshold can be adjusted. % last update: 5/30/2020. YZ addpath(genpath('C:\Matlab Files\missing_...
5ab6a0cb8bb692d7ab8b2066de58f3ec318f49f4376465bb2261cd6360785e70
MATLAB
5,615
129
function [U] = h3ddir(zk,srcinfo,targ,pgt) % % % This subroutine computes the N-body Helmholtz % interactions and its gradients in three dimensions where % the interaction kernel is given by $e^{ikr}/r$ % % u(x) = \sum_{j=1}^{N} c_{j} \frac{e^{ik\|x-x_{j}\|}}{\|x-x_{j}\|} - % v_{j} \cdot \nabla \left( \fr...
48e26f6beebc456646b7ea7840a1c1fd46d4c898afda4b4614d92afc0edbe911
MATLAB
5,622
118
% Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024 function [R, success] = compute_stability_bfo90_table_v2(StabilityPerCell, BFO90_FILTER_MIN_MAPS, BFO90_FILTER_MIN_TRIAL_CORRELATION) % This differs from version 1 in that the stability information comes % from the percell da...
2c7370b8cf071945aa8701a3d385a8e10a1736462ec952cccce7237f456df543
MATLAB
5,625
224
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbH3uws #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Neg_Wgain_H3_A%A_%a.out #SBATCH --error=outputs/UWS_Neg_Wgain_H3_A%A_%a.err #Load Matlab 2017a module ml MATL...
ddcb5b964d08e6031e57eb02d18eb7362aaa33fe900fe19f8bb63c4f1e6811d9
MATLAB
5,626
224
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbH3 #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/MCS_Neg_Wgain_H3_A%A_%a.out #SBATCH --error=outputs/MCS_Neg_Wgain_H3_A%A_%a.err #Load Matlab 2017a module ml MATLAB ...
c4e3f3d82fcfb324bafe376ef2ca56e4f3e199e7e1ddb47fbe6c53239a750f40
MATLAB
5,628
133
function [params, hvol] = simseq_loadPRFParams(pths, dt, hemi, roi, spatialModel, veThresh, hvol, subFolder) % Function to select pRF params from toonotopy experiment within ROI % cd to toon data cd(fullfile(pths.dataDirToon, pths.toon)) if ~exist('veThresh', 'var') || isempty(veThresh) veThresh = 0; end if ~exi...
b414582c05be413f879b0519c16f0dee043b6ef558d6989319d870b08f317ced
MATLAB
5,629
158
function speed_distance_all_sessions(session,Area,threshold,Ndir,t_from,t_upto) %% speed_distance_all_sessions compares the distance between %% trajectories corresponding to movements with different speeds (same %% direction and distance) and movemements of adjacent bin directions (same speed) %% It then repeats th...
fc49980a3a5009e87c0d25156ec156cc5737067dd36c3489d1dbb3e2d81c2912
MATLAB
5,634
195
<<<<<<< HEAD function [genuinesNorm, impostorsNorm, genuinesAggr, impostorsAggr, genuinesBestRot, impostorsBestRot, fprNorm, fnrNorm, fprAggr, fnrAggr, fprBestRot, fnrBestRot] = ... computeVerificationPerformanceRot(numImagesTest, distMatrix, distMatrixBestRot, filenameTestPCA, stepPrint, param) % distMatrix % dis...
66c5cd3cc0cf667b9befe49ca877f1ed82c352c2e3e7502037e0fc40ea3d978b
MATLAB
5,636
146
function [] = plotChannels(probe, plottypein, rangetypein, breakdowntypein) %PLOTCHANNELS Plot histrogram or spatial plot of channel distribution % Plot the channels. There are two plot types: histogram and spatial. % Histogram plots the channels in a histogram showing frequency of SD % separations. By default, t...
111bf068bd412880545548e598c373c38a8f548cd758f32200bbbb9f3d980223
MATLAB
5,638
220
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturb5HT2A #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/MCS_Neg_Wgain_5HT2A_A%A_%a.out #SBATCH --error=outputs/MCS_Neg_Wgain_5HT2A_A%A_%a.err #Load Matlab 2017a module m...
923d627a5617a5959635f041d23c8e915a03053cf3b8317c1296492d7b39913e
MATLAB
5,639
141
% segments data from each block into trials from 1s before heat onset to 10s % after cue onset (1s after rating), concatenates data from all blocks % and saves it in pd_epo_all.mat % events are stored in a combined file related to the epoch % additionally creates single trial plots so that one can check data % quality ...
150d9b1b43feac7824152cba374e2ca2080b2c37483514a05b2567373fce9c4f
MATLAB
5,640
139
function [outputStruct,navigator] = TDMS_dataToGroupChanStruct_v2(inputStruct,varargin) %TDMS_dataToGroupChanStruct_v2 Converts output into tiered structure % % [outputStruct,navigator] = TDMS_dataToGroupChanStruct_v2(inputStruct) % % This function tiers the data into groups & channels but leaves the % cha...
f06936ee28fcd04e8d38dbc75981d191bc98d1f6df55c4ce73f9f733726cbe2a
MATLAB
5,640
110
function instruct_DF(iTrial,p,s,i,r) instrOn = (iTrial == 1) || (iTrial == p.nPracticeTrials+1) || (i.modality(iTrial) ~= i.modality(iTrial-1)) || (i.task(iTrial) ~= i.task(iTrial-1)); if instrOn == 1; if isnan(i.practTrialType(iTrial)); KbQueueRelease(p.keyboardIDSubject); elseif ~isnan(i.practTrial...
9880fd3349689f0f6dac2cc267d7d3bc4d58cac8fc1e483403f6ede963f06383
MATLAB
5,641
146
clear all close all % Load images. imgDir = uigetdir('Please select a folder...'); % Open a dialog to select the folder containing images. imgSet = imageDatastore(imgDir); % Create an image datastore for all images in the selected folder. str = imgSet.Files{end}; % Get the file name of the last image in the folder. st...
f66a0f32ad4a06905e802526e96965b14752b23021aa1874277e4e288d18a7c8
MATLAB
5,647
141
% segments data from each block into trials from 1s before heat onset to 6s % after cue onset (1s after rating), concatenates data from all blocks % and saves it in pd_epo_all.mat % events are stored in a combined file related to the epoch % additionally creates single trial plots so that one can check data % quality ...
003f8057155c8072a373ef2cae7c34799e52309b9e2a2a81a8c046fdd5cc6a68
MATLAB
5,650
129
function [center_line_interp, thin_image_returned, BW, isGoodFrame, thinning_iteration] = initialize_contour(I, nPoints, best_threshold) %Initializes the contour given a threshold value %% STEP 1: use mexican hat filter to find tips %% [~, labeled_filtered_image, BW] = tip_filter(I, best_threshold); la...
815d7396bbfa0953f5b5cb7dc9b7f36558c8e762f612fce76e751f41580d7079
MATLAB
5,650
114
%% Script to run in parallel multiple PCA-CCA of psychosis-related diagnoses % Copyright (C) 2023 University of Seville % Written by Natalia García San Martín (ngarcia1@us.es) % This file is part of Neurobiology Centiles Psychosis toolkit. % % Neurobiology Centiles Mapping toolkit is free software: % you c...
80009e378affdb6a2191d431d2218758c96bcb766691285c50e5f0b321a5d925
MATLAB
5,652
201
function state = dss_core_defl(state) % Deflation DSS algorithm % state = dss_core_defl(state) % Calculates denoising source separation separately for each component. % Begins or continues calculation defined by state structure and % returns the result as state structure. Calculation can be interrupted % ...
9784cacf08deeadf0e519564bd24d58e441a8cc3080c37208dd622e488309eba
MATLAB
5,652
217
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NULL_D2_UWS #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Null_D2_A%A_%a.out #SBATCH --error=outputs/UWS_Null_D2_A%A_%a.err #Load Matlab 2017a module ml MATLAB matlab -no...
1eb2fe30f6d2b67aa752d5dfafbef86ddbf19e465a1fa472dcb7f3e0e3a379ea
MATLAB
5,655
147
% dsFiltFictrac.m % % Function that downsamples and smooths fictrac data and returns new fwd, % slide, and yaw postion and velocity, x and y position, total speed, and % yaw speed, as well as t and dropInd in fictrac struct. % % Adapted from function of same name in 2PAnalysisCode-Helen % % INPUT: % fictracParams -...
90a01bcc0b312620a17f30cc7a1411227f7d54fa17b4b13d94e61e7a5a1d3352
MATLAB
5,655
197
%run_residuals_nhp_data.m %% clear all; close all; clc; warning('on','all') %% add fn paths if not added yet % assumes script run within local directory scriptdirs = { '../../analyze'; '../../helper_functions'; }; addpath(scriptdirs{:}) %% datadir = '../../spk_evt_data'; addpath(datadir) tablefile = 'units_table.ma...
daca9a99d585f9de5fbfb446741c2811275000e021f1790397ddfeb0896d873d
MATLAB
5,655
200
%run_shuffling_nhp_data.m %% clear all; close all; clc; warning('on','all') %% add fn paths if not added yet % assumes script run within local directory scriptdirs = { '../../analyze'; '../../helper_functions'; }; addpath(scriptdirs{:}) %% datadir = '../../spk_evt_data'; addpath(datadir) tablefile = 'units_table.ma...
cd6b0a7cb5833067c5d6db4f6dc7ff521a992c540bf3587e37e8299146ca31a6
MATLAB
5,660
146
classdef EventDetection < types.core.NWBDataInterface & types.untyped.GroupClass % EVENTDETECTION Detected spike events from voltage trace(s). % READONLY PROPERTIES properties(SetAccess = protected) times_unit; % (char) Unit of measurement for event times, which is fixed to 'seconds'. end % REQUIRED PROPERTIES p...
84a7620706b9a4e1fcf87c60885582821e842524bb5914842bd6ffe8c69ed5fd
MATLAB
5,667
164
function HDR=bdf2biosig_events(HDR, Mode) % BDF2BIOSIG_EVENTS converts BDF Status channel into BioSig Event codes. % % HDR = bdf2biosig_events(HDR [,Mode]) % % INPUT: % HDR is the header structure generated by SOPEN, SLOAD or mexSLOAD % from loading a Biosemi (BDF) file. % Specifically, HDR.BDF.ANNONS contains t...
b5f96d087577305e1321eb5ae470e72471040f8ce20b03f70d390d2ef94cec36
MATLAB
5,667
131
%load/select all subjs TFR clear;clc;clf;close all %% Load clean MEG file data_folder='/rds/projects/j/jenseno-avtemporal-attention/Projects/Load/MEG Data/proc_data/'; %Portal addpath /rds/projects/j/jenseno-avtemporal-attention/Programming/MATLAB/fieldtrip-20210328 %Portal saveFolder = '/rds/projects/j/jenseno-avtemp...
814bc03efa04d7949f4ac4c35ded464a5aaabf22df9d720151e3a4df7f2d8a59
MATLAB
5,669
138
function [type] = ft_voltype(headmodel, desired) % FT_VOLTYPE determines the type of volume conduction model of the head % % Use as % [type] = ft_voltype(headmodel) % to get a string describing the type, or % [flag] = ft_voltype(headmodel, desired) % to get a boolean value. % % For EEG the following volume conduct...
77528cd1e79eae90c325b23bb1628855098f947ab6efdd3686523c8809fbd552
MATLAB
5,672
217
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NULL_5HT2A_UWS #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Null_5HT2A_A%A_%a.out #SBATCH --error=outputs/UWS_Null_5HT2A_A%A_%a.err #Load Matlab 2017a module ml MATLAB m...
c26a9cf043eabde8acf3def18a46e4386c93ab56231fea23af840ed9839bc085
MATLAB
5,677
131
% Final Regression Script clear all clc %cd('M:\Matt Chilvers\OneDrive - University of Calgary\PhD_Projects\Project3_WhiteMatterLesion\Scripts\Plots\ScatterPlots\FinalRegressionAnalysis') cd('/Users/dukelowlab/Library/CloudStorage/OneDrive-UniversityofCalgary/PhD_Projects/Project3_WhiteMatterLesion/Scripts/Plots/Sc...
e8d2e0a5eed5449d72f91ccf7e38f8ab170f58fd9f764191003f6d17521a3890
MATLAB
5,685
121
function bg_proc = sort_axons(vol_params, axon_params, gp_bgvals, cell_pos) % bg_proc = sort_axons(vol_params, axon_params, gp_bgvals, cell_pos) % % This function ranndomly sorts length(gp_bgvals) axons into N_proc bins % % The inputs to this function are: % - vol_params - Struct containing parameters for the volum...
a31b2a9335c95fbe5002c0360931990e5a1dc903767f3baed4047c1a6de49565
MATLAB
5,691
148
function [dat] = read_yokogawa_data_new(filename, hdr, begsample, endsample, chanindx) % READ_YOKAGAWA_DATA_NEW reads continuous, epoched or averaged MEG data % that has been generated by the Yokogawa MEG system and software % and allows that data to be used in combination with FieldTrip. % % Use as % [dat] = read_y...
34e95c66cc45ce680b4a4c63c8d5266c0f62e16063dece6186c93cc8e426b313
MATLAB
5,704
136
classdef ClusterWaveforms < types.core.NWBDataInterface & types.untyped.GroupClass % CLUSTERWAVEFORMS DEPRECATED The mean waveform shape, including standard deviation, of the different clusters. Ideally, the waveform analysis should be performed on data that is only high-pass filtered. This is a separate module because...
67bc2f641957a5cc2824c23f9e2e23764843f7fecb562d6d57b339dcebbf0b41
MATLAB
5,706
155
function variability_behaviour(fig1) %% variability_behaviour shows the variability in whisker behaviour % This function plots: % 1. The touch epochs and delta kappa from an example trial % 2. The touch epochs from an example session % 3. Statistics of behavioural variables (divided into hit and miss trials): % 3.1 D...
207b69a5df3a701aec26b3e504b06862aa1ff112ef6ceddd6998af75b9879526
MATLAB
5,707
184
function [data_corr] = corr_MAspline(data, artifact) % CORR_MASPLINE % This function corrects the motion artifacts with a spline interpolation % and is an adapted version of the Homer 3 function: % hmrR_MotionCorrectSpline (p = 0.99) % % INPUT: % - data: the fNIRS data in fieldtrip structure % - artifact: artifact fiel...
cbf62c86c20511aad5f29590ce971b6e7a3aaa7b06fbd74d7f97a4f25917dbb7
MATLAB
5,720
177
function embedding_dimensions_all_sessions_dpca(Sessions,Area,threshold,Ndir,Nbins,t_from,t_upto,edges_dur_bin,session_N,do_plot,plot_supp) %% embedding_dimensions_all_sessions calculate the number of embedding dimensions for all recordings denoted in Sessions and Area % % INPUTS % % Sessions: cell array containing the...
a80243fe7cf1d88e893c7c4a58d19d6ff46182376a1e455784e9a1d8201a07f7
MATLAB
5,721
181
% plotRaw2ChImgFicTracLegVidData.m % % Function to plot raw traces of imaging data (dF/F) for all ROIs and % FicTrac data (yaw angular velocity and forward velocity), each in its % own separate subplot. Allows user to click at specific time to display % brief clip of leg tracking video, starting at time of click. ...
72a1f2a1cb60b403bd0545ca3adc45a1b1ddb72f4c60f27899b99169beeda81f
MATLAB
5,728
151
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Code for the numerical simulations and computational results % in the manuscript "Fibromyalgia pathogenesis explained by % a neuroendocrine multistable model" % by Ilaria Demori, Serena Losacco, Giulia Giordano, Viviana Mucci, % Franco Blanch...
ffb2d71e84da73767c23abb8c2e9b133d9fd3d27c43755e1abd965a48334c6f5
MATLAB
5,731
140
function [] = plot_worm_frame_post_analysis_showing_path_subplot(I, center_lines, centerline_color, stim_color, debugimage,in_track_index,current_ellipse_ratio,smoothed_path_x,smoothed_path_y,stimulus_delivered,path_history,demo_mode,initial_frame,all_ellipse_ratio,worm_of_interest,current_rails_dur,all_velocity,curren...
c4eb742bd0ca1288a23d51636bf5d00c4a8ee420ab00630d9748b7e738d8faf9
MATLAB
5,733
232
%% LOAD/ POOL CLUSTERING INFO/ activity mice = {'EC1-1R','EC1-1R','FL5-3L','FL5-3L','FU1-00','FU1-00','GE3-00','GE7-1L1R','GE7-1L1R','GS2-1L','GS8-00','GS8-00'}; dates= {'2021-11-05','2022-01-13','2022-03-09','2022-04-18','2022-03-17','2022-05-10','2022-10-27','2022-10-20','2022-12-20','2022-11-21','2022-11-23','2022-...
b2c1bc9677730d38d31c54c6476f5f91fd7636b78a717711448f768e430c2458
MATLAB
5,736
122
function params = getTemporalParams(params) % Function that grabs default temporal params for specified temporal pRF % model and puts it in params.analysis.temporalModel. % % params = getTemporalParams(params) % % The function first checks if there is a Constant file (user-defined % temporal parameter values). if the...
ea3b6e64f91c9a4c38a61818bc1ee98579e0174dd74aef87dc1f3319188de2e6
MATLAB
5,739
179
function [comp,comp_probs]=st_run_ica(cfg,data) %---input checks and defaults---- ft_checkconfig(cfg,'required',{'elec','scoring'}); cfg.preclean=ft_getopt(cfg, 'preclean', 'yes'); %default: preclean cfg.stages_ica_train=ft_getopt(cfg, 'stages_ica_train', cfg.scoring.label); %default: all available stages cfg.runica_...
d45b70c5f484c7d8609ca0839b36a77b27192aed71f4b155549d8d07631693f3
MATLAB
5,740
150
function [meg] = read_ctf_meg4(fname, hdr, begsample, endsample, chanindx) % READ_CTF_MEG4 reads specified samples from a CTF continous datafile % It neglects all trial boundaries as if the data was acquired in % non-continous mode. % % Use as % [meg] = read_ctf_meg4(filename, hdr, begsample, endsample, chanindx) % ...
2d2d208b0c887d7085c434499624d3ae1cf685c1e295c7c1ebb2194739fbd7e8
MATLAB
5,744
181
% % Draw degree and edge weight distributions. % % PARAMETERS % $network Name of dataset, e.g. "advogato" % $ENABLE_POWER_LAW "1" to draw the variants with power-law gamma estimation (flat) % $ENABLE_POWER_LAW_2 "1" to draw the variants with power-law gamma estimation (complex) % $ENABLE_POWER_LAW_3 "1" to draw the ...
c36183e1a0f5dd2fd1565c768c81f544ad7f977de17e2db4b5e16694e6fed5d1
MATLAB
5,744
199
function [output] = ml_alg_popvectors_cumulative_similarity(sdataMaps, sdataCellIds, sdataTrialIds, sdataContextIds) % sdataMaps should be a MxNxK matrix where P is the number of cells % sdataCellIds should be a Kx1 array where each element is the cell id % corresponding to the map % sdataTrialIds should be a Kx1 array...
b1486089d04bb8160212cf96dacc4b4908cf092d9dd2b73706e4968867c9b987
MATLAB
5,747
181
function []= report_events (ds_events,ex_thresh) %% UNPACK STRUCTURE all_mchw=[]; all_mchws=[]; all_mchwe=[]; all_mchp=[]; all_mcho=[]; all_tdtw=[]; all_tdtws=[]; all_tdtwe=[]; all_tdtp=[]; all_tdto=[]; n_mch_events=[]; n_tdt_events=[]; % for i = ds % % all_mchw=[all_mchw,ds_events(i).onsets.mch_widths]...
227ab6a25e7328842abd41be1ec91abb113401074832097a6d4c1b20ad52c5a9
MATLAB
5,750
199
function [output] = ml_alg_popvectors_cumulative_similarity_rooms(sdataMaps, sdataCellIds, sdataTrialIds, sdataContextIds) % sdataMaps should be a MxNxK matrix where P is the number of cells % sdataCellIds should be a Kx1 array where each element is the cell id % corresponding to the map % sdataTrialIds should be a Kx1...
2462026aa400a9a546246ef704fa19f68e7e0546d0a63a7d86d519ffee23f38b
MATLAB
5,751
129
%% Authors: Jiri van Bergen and Xu Li % Affiliation: Radiology @ JHU - Kirby Center % Contact via xuli@mri.jhu.edu % updated 2019-07-09, X.L. % updated 2021-05-04, X.L. fixed a bug % updated 2021-08-11, X.L. fixed mac issue % updated 2023-10-11, X.L. moved parameter update code here from CreateFcns % Open fi...
3490935961432ef3f7bdcab70a88360c3c74ada1da4baf30a193652e646233cc
MATLAB
5,752
188
function [hdr] = read_nmc_archive_k_hdr(paramfile) % READ_NMC_ARCHIVE_K_HDR extracts 'header-data' for nmc_archive_k datasets % % Use as % hdr = read_nmc_archive_k_hdr(paramfile) % % % This function specifically only reads data from one of the archived % datasets of the Neurophysiological Mechanisms of Cognition gro...
dbae35f5b6ef660d612c36e826750bd88b20b79d621e41f59fc17b1155f7b7a3
MATLAB
5,752
221
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbD2UWS #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Neg_Wgain_D2_A%A_%a.out #SBATCH --error=outputs/UWS_Neg_Wgain_D2_A%A_%a.err #Load Matlab 2017a module ml MATLAB matlab -nojvm -nodisplay<<-EOF %struc =...
6e49d14d1108116896265102132000dfa612406c7f2411737965abcb483b1ef1
MATLAB
5,757
165
function [hc] = read_neuromag_hc(filename) % READ_NEUROMAG_HC extracts the MEG headcoil marker positions from a neuromag % fif file or from the fieldtrip buffer % % the definition of head coordinates is according to CTF standard: % - Origin: Intersection of the line through LPA and RPA and a line orthogonal % to L p...
d51b2cb50f330be53ef38077508c37a87e7dfe9144ca804986ca8fbe3bdb8d90
MATLAB
5,759
166
% For in vivo spine data analyzed using MapManager V_20171028 % Author: Richard Roth (rhroth@stanford.edu) % Date: October 2019 % Based on MapManager-Matlab-1.0.1-alpha by Robert Cudmore, 20171016 % Used for NearesNeighbor.m % Requires the following functions: % segmentCall_withDist.m % remove...
20043864da6cb6312e925e91ed88aa8510202e0140f829905110a75b6e242495
MATLAB
5,764
150
function target_new = OptimLocate(results,boundary,targetlen,distlimit,F2S) % This algorithm is a variation of Lloyd's algorithm % % % setting variables boundary_l = boundary(1:6,:); boundary_r = boundary(7:end,:); distw_l = results.distw_l; distw_r = results.distw_r; NonVesselOnSurf_l = results.NonVesselOnS...
88150ca090ca8f48359c2bcc266c3d2dc761d7c37d8b8bd8e5b4038efe1df23e
MATLAB
5,768
147
% This script accurately computes and displays electric fields sampled on % a cross-section (sagittal plane) via the FMM method with accurate neighbor integration % % Copyright SNM/WAW 2017-2020 %% Load/prepare data planeABCD = [1 0 0 X]; % Equation of the plane of the cross-section (for neighbor trian...
91d8b41ec74b378e677fa9790122aa19e00d8a5281491180a3869c819353726f
MATLAB
5,772
196
clear all close all tic % Fig 8F, spectrin detachment on % setting up the initial configuration P.y0 = 180; P.x0 = sqrt(P.y0^2 - (P.y0/2)^2); P.max_y0 = 17*P.y0/2; P.max_x0 = P.x0*15; [r_s,T_s,edges_s,edge_type] = create_mesh(P); P.actin = 1:size(r_s,1); aux = find(r_s(:,1) == min(r_s(:,1)) & r_s(:,2) <= max(r_s(:...
6d46dd43b7052880e4c373fe492864592798752e8f86223463ed6e919f322104
MATLAB
5,774
168
function results = fitModelToVoxData(X,Y,varargin) %% Function to fit model prediction to data at single voxel level % params.analysis.regressionType = 'OLS';%'fracridge'; % Y = data.meanDetrendedData; % X = data.predictionCatRuns; % INPUTS: % X : (int) prediction array (numT...
c45bb74c47b3c9126d3e4f5ca52c6ac94cd6d5417a53de9b0021fdc9cfc81190
MATLAB
5,776
175
function RF = stGaussian2dDoG(X,Y,sigmaMajor,sigmaSurround,theta, x0,y0) % pmGaussian2d - Create a two dimensional Gaussian receptive field, % this function is inherited from vistasoft/PRFmodel % % RF = stGaussian2dDoG(X,Y,sigmaMajor,sigmaMinor,theta,x0,y0, sigmaSurround); % % INPUTS % X,Y : Sample positions...
e62f3134c78e1099f0fb2d2ba74ffa05426cfc5a75e9ccf8f80b8e33c2c29918
MATLAB
5,780
107
function [pnt, tri, srf] = read_bv_srf(filename); % READ_BV_SRF reads a triangulated surface from a BrainVoyager *.srf file % % Use as % [pnt, tri] = read_bv_srf(filename) or % [pnt, tri, srf] = read_bv_srf(filename) % Copyright (C) 2005, Robert Oostenveld % % This file is part of FieldTrip, see http://www.ru.nl/...
f6d72b813c3a0e95f5aaa1e182b817286e4dd7b6e82b539d0f5bef9a959e2d91
MATLAB
5,781
143
%expdir0 = '/groups/branson/home/robiea/Projects_data/FlyDisco/Bubble_data/socialCsChr_GMR_72C11_AE_01_CsChrimson_RigD_20191114T172654'; %expdir = '/groups/branson/home/bransonk/tracking/code/FlyTracker-1.0.5/Data/socialCsChr_GMR_72C11_AE_01_CsChrimson_RigD_20191114T172654'; %expdir0 = '/groups/branson/home/robiea/Proj...
6c9d0fa60b60065f2d4f6830244c03755659296d771b14a3f305d1e4cd5b07c0
MATLAB
5,791
194
% plotNormContLegStepParamCond_bouts_ipsiContra.m % % Normalize each bout's step param by subtracting out min and dividing by % range. Compute FWHM % % INPUTS: % whichParam - name of parameter to plot % datDir - directory with output files % yScale - y scale for plots, as [min max] % semError - boolean for whe...
70645da2dff2021d7f8ff3e7783d0ddf2f3b685a028a4ab22b7eb65505dfac8d
MATLAB
5,791
130
%% 1. ENTER DATASET INFORMATION addpath(genpath('C:\Code\Github\Clustering-Pipeline')) info.mouse = 'HE4-1L1R'; info.date = '2023-08-21'; info.servernum='W:'; info.pockels=300:100:500; info.subset_pockels=1:length(info.pockels); % vector of pockels to actually include in clustering info.savepathstr = '/Connie/Process...
a133d0b365971be00a03e3ed713905f65b041fe6348e5e4d05bdb93fe01bb095
MATLAB
5,796
147
% This script accurately computes and displays electric fields sampled on % a cross-section (sagittal plane) via the FMM method with accurate neighbor integration % % Copyright SNM/WAW 2017-2020 %% Load/prepare data planeABCD = [1 0 0 X]; % Equation of the plane of the cross-section (for neighbor trian...
d38b8ef0f3891ee927cc12e97c33997ac0ee1a4fc1274c7073b6ece7b3a097b8
MATLAB
5,799
221
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbD1 #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/MCS_Neg_Wgain_D1_A%A_%a.out #SBATCH --error=outputs/MCS_Neg_Wgain_D1_A%A_%a.err #Load Matlab 2017a module ml MATLAB ...
9d314661729d43f5fcdf3dea8d2ef18a7afc4af7aa3e22880e3673647918da53
MATLAB
5,801
116
function fH = plotLMMregressionSlopes_v_pRFExp_stRetParams(allLMMResults, ... params, modelToPlot, roisToPlot, cmapROIs, saveFigs, saveFigDir) ipsIdx = cellfind(regexp(string(roisToPlot),'IPS0/IPS1','once')); roisNoIPS = setdiff([1:length(roisToPlot)],ipsIdx); fH = figure; set(gcf,'Position',[544 512 687 ...
a29eb81b9612ee1709d9d9da31b0d31244c17dfc89cb633db93ee8396d1bfa2d
MATLAB
5,801
146
function varargout = mglTestGammaGUI(varargin) % mglTestGammaGUI M-file for mglTestGammaGUI.fig % mglTestGammaGUI, by itself, creates a new mglTestGammaGUI or raises the existing % singleton*. % % H = mglTestGammaGUI returns the handle to a new mglTestGammaGUI or the handle to % the existing singlet...
ebf93171121420f900ade17f35c15aa18db8371da49a2b5e9319d23dd760060d
MATLAB
5,801
221
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbMU #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/MCS_Neg_Wgain_MU_A%A_%a.out #SBATCH --error=outputs/MCS_Neg_Wgain_MU_A%A_%a.err #Load Matlab 2017a module ml MATLAB ...
6fc6fbad5c15feadedd4a59e6e855f63493c4c332984bc806b8c8b451dce5856
MATLAB
5,802
147
% This script accurately computes and displays electric fields sampled on % a cross-section (sagittal plane) via the FMM method with accurate neighbor integration % % Copyright SNM/WAW 2017-2020 %% Load/prepare data planeABCD = [1 0 0 X]; % Equation of the plane of the cross-section (for neighbor trian...
febac30d963c82f82d42f07b14a58b52d44be01a5987ebd0ebbaa1ee2bb36cd6
MATLAB
5,803
153
% For in vivo spine data analyzed using MapManager V_20171028 % Author: Richard Roth (rhroth@stanford.edu) % Date: Sept 2023 % Based on MapManager-Matlab-1.0.1-alpha by Robert Cudmore, 20171016 % This script requires a spine pool generated from in vivo imaging data % that was first analyzed using MapManager V_2...
9cc1c169e1e64eb51b7ee91e99c94409b5b73b8d8430f6e24134d05ad768c288
MATLAB
5,805
148
%% Berron et al manual subfields in unfolded space addpath(genpath([getenv('AUTOTOP_DIR') '/tools'])); f = fopen('datasets/testSet.txt'); subs = fscanf(f,'%c'); fclose(f); subs = strsplit(subs)'; subs(end) = []; FSlbls = [203:210 226]; FSlbls2 = [203:210 214 226]; % includes SRLM mri_convert = 'singularity exec depe...
9191cfb5b8e2c4f28cada2bfc23a2e363cdcc961aa3dba1e272cb08a1db0c791
MATLAB
5,806
158
% mglSetGammaTable.m % % $Id$ % usage: mglSetGammaTable() % by: justin gardner % date: 05/27/06 % copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING) % purpose: Set the gamma table % set gamma with a function using 9 arguments: % % mglSetGammaTab...
9f0c9d2055870d19a82d18db5ad6533dda1d1f20f1a86eb73d96bfd2fefcf73b
MATLAB
5,807
174
clear load('stable.mat') ; k1=1;k2=1;k3=1;k4=1;k5=1;k6=1; for i=1:493 stable.go{i}=[population.goHit.eachDF{i}(1:90,:) population.goMiss.eachDF{i}(1:90,:)];%cue resposne time stable.go{i}(:,find(isnan(stable.go{i}(1,:))))=[]; stable.nogo{i}=[population.nogoCR.eachDF{i}(1:90,:) population.nogoFA.eachDF...
a766a2514fb9d9707728768ca7360895aba6d27fd5d35eadcfa031afab2ed124
MATLAB
5,807
222
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturb5HT2A #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Neg_Wgain_5HT2A%A_%a.out #SBATCH --error=outputs/UWS_Neg_Wgain_5HT2A%A_%a.err #Load Matlab 2017a module ml MA...
c2984a0e1660b7fb669906c90c6913b1a1412c9a3a7d8c586a37ad89867e76de
MATLAB
5,809
152
function [n,r] = boxcount(c,varargin) %BOXCOUNT Box-Counting of a D-dimensional array (with D=1,2,3). % SEE: https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/13063/versions/1/previews/boxcount/html/demo.html % [N, R] = BOXCOUNT(C), where C is a D-dimensional array (with D=1,2,3), % cou...
b3abdbb15e0cb6b2533bba8453f9430799276b0992404eb5d2a16d5c74dca23e
MATLAB
5,810
221
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbDAT #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/MCS_Neg_Wgain_DAT_A%A_%a.out #SBATCH --error=outputs/MCS_Neg_Wgain_DAT_A%A_%a.err #Load Matlab 2017a module ml MATL...