sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
72848d8bac69cd0cecb15743bdd87e03d47b5b3a9f417e5d97136d0950e6bb50
MATLAB
16,892
371
% POP_REJCONT - reject continuous portions of data based on spectrum % thresholding. First, contiguous data epochs are extracted % and a standard spectrum thresholding algorithm is % applied. Regions of contiguous epochs larger than a % specified size are ...
e53d92c0d517cc65b93711ffb33412830a32e2ec808fb2a4651978afd8c56be9
MATLAB
16,942
438
function figureHandles = plot(this, varargin) % Different plot modalities for Roi data, including time series & box plots % showing a couple of statistics for time series or volume ROI data, e.g. % mean +/- sd, % min/median/max % boxplot/histogram (distribution over voxels) % All plots can show statistics either ...
345ada2f36c0282a76118415ec182c680f28b92ec9381b3f81d13ecdc7435f1d
MATLAB
16,982
567
%% Figure 5 %% 1.1 Correct CT for covariates: HCP clc; clear; close all load dataHCP load data clearvars -except dataHCP labelsGlasser* dataHCP_Temp = dataHCP(:, {'ID' 'Age' 'IQ'}); CT_CorrectedHCP = dataHCP(:, labelsGlasserCT); CT_CorrectedHCP = [dataHCP_Temp CT_CorrectedHCP]; CT_CorrectedHCP_Array = nan(height(C...
03b5c653e3ff889841709b9f1f704ae2d97ba1b681c05685728cd74cae178de3
MATLAB
16,990
376
function [FB_y, S, freqAxis, timeAxis] = effectConnect_plot(subjTag) % standalone script for plotting effective connectivity results (DTF) % called by: effectConnect_plot_avgOverSubj.m % WARNING: quick-fix exploratory script (to get mean DTF over subj) % (c) Jiri, Sep22 %% batch job (uncomment function and use as a s...
a55b46dad6fa381a6fe1fb7588f87628ee907bb467a92af0bb6d3e3f3e721fb4
MATLAB
16,999
401
function [outImg] = mrAnatAverageAcpcNifti(fileNameList, outFileName, alignLandmarks, newMmPerVox, weights, bb, showFigs, clipVals) % % outImg = mrAnatAverageAcpcNifti(fileNameList, outFileName, [alignLandmarks=[]], [newMmPerVox=[1 1 1]], [weights=ones(size(fileNameList))], [bb=[-90,90; -126,90; -72,108]'], [showFigs=t...
3d0d4d0b1b464e10dcdc1cea741f24f14297aa5be36b221490d95e5a597f9082
MATLAB
17,025
472
%% Expand wildcards for files and directory names % % Pattern matching of file and directory names, based on wildcard % characters. This function is similar to wildcard expansion performed by % the Unix shell and Python glob.glob function, but it can handle more % types of wildcards. % % [LIST, ISDIR] = glob(...
a753b0d3c03fcf5385cc07aa67b04ec9dcbcf1ec760a19d42018c84b14b2f863
MATLAB
17,030
746
function vImageGUI(params, mov) close all; if isempty(mov) mov = 100.*rand(20,20,100); end h.mov = mov; clear mov; h.Nframes = size(h.mov, 3); h.params = params; h.cmapstrings = {'parula'; 'gray'; 'hot'; 'cool'; 'bone'; 'copper'; 'pink'; 'flag'; ... 'prism'; 'jet'; 'hsv'; 'green'; 'red'; 'blue';...
e4a7f572a4148d2029d801eec19ed3657f2feae8e5774f5850d6da3f94f7aa7f
MATLAB
17,047
310
function res = arg_subswitch(varargin) % Specify a function argument that can be one of several alternative structs. % Spec = arg_subswitch(Names,Defaults,Alternatives,Help,Options...) % % The correct struct is chosen according to a selection rule (the mapper). Accessible to the % function as a struct, and visible in t...
9b9f5b25e4d0aa4665d6f9573c24b4b25dbcc55b58316c78e4c98220c8134656
MATLAB
17,067
346
%% jobP_MEGA_Example.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, struc...
6a57a573bb7adb0d679c28b63b6c2b5acb7ad226d8631986aa7eb6d9c380d5d2
MATLAB
17,077
442
% check the dSTR for all epochs, and also compare decoder types %% load code path and data. %location of analysis codebase codepath = '~/projects/constantinoplelab/Analysis/'; % add code paths addpath(genpath(codepath)) addpath(genpath(codepath + "david")) addpath(genpath(codepath + "maggie")) %for saving pds corre...
01ade5eb09f5739f1ce48e5dcfa0939e78bddb082dcdf5ddde1b87658efb8930
MATLAB
17,116
387
% POP_BIOSIG - import data files into EEGLAB using BIOSIG toolbox % % Usage: % >> OUTEEG = pop_biosig; % pop up window % >> OUTEEG = pop_biosig( filename, 'key', val, ...); % % Inputs: % filename - [string] file name % % Optional inputs: % 'channels' - [integer array] list of channel indices % 'blockrange' ...
8f1cc82188c94575d9897dc881e295f76e199905722ca6f40c0c63f310e32713
MATLAB
17,133
380
%% extract the beta parameters in each clusters. % use each mask - mt, mst, hMT on tactile motion Localizer % take the avg of beta values from the roi % (1)lmst- motion_beta and (2) lmst -static_beta % across two runs clear subjectList={'sub-001','sub-002','sub-003','sub-004','sub-005','sub-007','sub-008'... 's...
5afbe1a0081e3f62aa234de81e414882bceacbb5dd9ca36cccb328d8e8a6bb8b
MATLAB
17,134
469
%% MakeAFMmap_RectangularGrid_standard.m 17/07/2019 Julia Becker % This script allows the user to tailor a rectangular AFM measurement grid. % Based on three landmark points for which the stage coordinates are known, % this script establishes conversion variables between the stage and the % overview imag...
a7f403fc18d06f5aa0165b186632312abe3ad1528137b4cc1052efa5aa36bf9a
MATLAB
17,141
471
function [c, r, t, cpulse, acq_codes, verbose] = ... tapas_physio_read_physlogfiles_bids(log_files, cardiac_modality, ... verbose, varargin) % Reads in 3-column tsv-file from BIDS Data (cardiac, respiratory, trigger), % assuming log_files-meta information to be in an accompanying .json-file % Note: if a JSON fi...
cd5f3db2d2ac6700e95eb1e1e2c05c57a6b37a5d66419244e9165d9c39f296b8
MATLAB
17,166
406
function [h_old,h_new] = vis_artifacts(new,old,varargin) % vis_artifacts(NewEEG,OldEEG,Options...) % Display the artifact rejections done by any of the artifact cleaning functions. % % Keyboard Shortcuts: % [n] : display just the new time series % [o] : display just the old time series % [b] : display both time s...
5a0765caf1c36e23276dcd872d606f8b58c467bb52db90f54591afa0ac466659
MATLAB
17,169
406
function [h_old,h_new] = vis_artifacts(new,old,varargin) % vis_artifacts(NewEEG,OldEEG,Options...) % Display the artifact rejections done by any of the artifact cleaning functions. % % Keyboard Shortcuts: % [n] : display just the new time series % [o] : display just the old time series % [b] : display both time s...
60b3fce1634bd8932945c625c0448b9c79dba6e700d14c6a1e4fd814df3959a0
MATLAB
17,194
424
function PlotIndvNetMet(expData, Params, Info, originalCoords, originalChannels, oneFigureHandle) %PLOTINDVNETMET Creates network plot for individual recordings % Parameters % ---------- % expData : struct % Params : struct % Info : struct % % Returns % ---------- %% electrode specific half violin plots lag...
9621d416168464027121921576acbd6664e79f0a9f507c4101d1d70e77d71458
MATLAB
17,220
553
function H_BrainNet = BrainNet_MapCfg(varargin) % BrainNet Viewer, a graph-based brain network mapping tool, by Mingrui Xia % Function to draw graph from commandline %----------------------------------------------------------- % Copyright(c) 2013 % State Key Laboratory of Cognitive Neuroscience and Learning, Beiji...
61e38975d3b6b984dcf96addd50b9a8e22129c04aa9828c2f53b1a1d60f71d9c
MATLAB
17,229
618
%% Figure 2 %% 1.1 IRI-PT ~ SA clc; clear; close all load data clearvars -except data* data.IRI_PT = zscore(data.IRI_PT); DV = 'IRI_PT'; measure = '_Area'; covariates = '~ Age + IQ + eTIV + '; measureOfInterest = strfind(data.Properties.VariableNames, measure); measureOfInterestID = find(~cellfun(@isempty, measu...
61e0ea6c4b87225211e9a2cf621eff82f510c6351d4d38cf4c4fe1aac13069ed
MATLAB
17,262
425
function simHandMuscleSystemVariation() clear all close all hidden global mdl mdlWks sampFreq triggerTime aGainRate = 0.5; % aGain is fiexed to be 0.5 times bGain evalParamDiffSP =1; % Evaluate results of "set point" variation evalParamDiff1b =1; % Evaluate results of "1b gain" variation evalParamDiff1a =1; % Evalu...
e07182611c211ccce52a447964afe65ee9ad9e8e3c2cab3554e0007cc5f1061f
MATLAB
17,312
337
function [MRSCont] = osp_combineCoils(MRSCont, kk, ll, ref_ll, w_ll) %% [MRSCont] = osp_combineCoils(MRSCont) % This function performs a the receiver coil combination of multi-array % data. All coil-combination procedures are performed using the ratio of % the maximum signal in each receiver to the square of the ...
9473eab60302698da924c532bae4e08fcb7d8b271523d6183b7a6c8ce57558a0
MATLAB
17,334
463
% HELP2HTML - Convert a Matlab m-file help-message header into an .html help file % % Usage: % >> linktext = help2html( filein, fileout, 'key1', val1, 'key2', val2 ...); % % Inputs: % filein - input filename (with .m extension) % fileout - output filename (if empty, generated automatically) % % Option...
6d62e05e9c060eaa75100ea3e9fa4eae5079d22f714fc48b168a7642a2289764
MATLAB
17,339
440
function out = MF_FitSubsegments(y, model, order, subsetHow, samplep, randomSeed) % MF_FitSubsegments Robustness of model parameters across different segments of a time series % % The spread of parameters obtained (including in-sample goodness of fit % statistics) provide some indication of stationarity. % % Values of ...
82f5eef9a46393dd6b3c17609f2f669bd6a59391271439ae593c6f9a498fdc1b
MATLAB
17,362
417
function varargout = TMStargetSC(varargin) % TMSTARGETSC M-file for TMStargetSC.fig % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help TMStargetSC % Last Modified by GUIDE v2.5 08-Nov-2020 22:38:50 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struc...
5304a231f2436286a327d28b525ce4b99a2ee242958d5b2e46c5ba1ff4fd8aea
MATLAB
17,371
530
function [] = PlotNetMet(ExpName, Params, experimentMatFileFolder, oneFigureHandle) % Plot network metrics for MEA data % % Parameters % ---------- % ExpName : cell array % cell array where each entry is the name of the recording to % plot network metrics (file extension should NOT be included) % Params : st...
362d4e8a7073568cf51c8be3e072787fcd751ec40f2e514e71761d094805157d
MATLAB
17,375
464
function [ subject ] = nmri_canonical_hdm_suma(subject, data, params) %[ subject ] = nmri_canonical_hdm_suma(subject, data, params) % % This function will use a canocical / atlas headmodel for later source % processing, % % subject = subject structure, see nmri_read_subject % could be a struct or ....
4eb8c7879def69e6e7a512a0bba724782691f4d8349d364136b5a34d25b81597
MATLAB
17,375
411
function regenerate_reference(varargin) %% regenerate_reference('confirm', true, 'tier', 'tier1', 'filter', '*') % % Description: (re)generates saved reference outputs used by the % regression comparisons in test/tier1_smoke, test/tier2_matrix (all % methods, synthetic phantom) and test/tier3_matrix (all methods, real ...
941c99c6648c071126935005255acdbfaa1ae6686691c72e131d02bc56a9b19a
MATLAB
17,381
452
function [fitParamsStep1] = fit_Osprey_PrelimReduced(dataToFit, basisSet, fitRangePPM) %% [fitParamsStep1] = fit_Osprey_PrelimReduced(dataToFit, basisSet, fitRangePPM) % Performs the first step of the LCModel preliminary analysis % analogous to the LCModel algorithm. The algorithm is described in: % S.W. Prov...
9d9a1b4cf2e7ff7ed2a4d91f8dd1aee8df7631c215ec80ec4a25316c2fdaa213
MATLAB
17,389
343
%% jobTwix.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, structural imag...
c7c4a0a1d9a0c627159375f1dfa47c511926093166ffa8f852995c71054e2404
MATLAB
17,393
359
%% jobSDAT.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, structural imag...
3efa606a05068c898d04c9b93cf41afc29023617e9237d2a382c123212b93673
MATLAB
17,397
430
% pop_loadset() - load an EEG dataset. If no arguments, pop up an input window. % % Usage: % >> EEGOUT = pop_loadset; % pop up window to input arguments % >> EEGOUT = pop_loadset( 'key1', 'val1', 'key2', 'val2', ...); % >> EEGOUT = pop_loadset( filename, filepath); % old calling format % % Optional inputs: % 'f...
4cc6894c8c538225ea582d3fa616b2b42ebdb848d9e1e74de506abe0841be465
MATLAB
17,418
345
%% jobTwix_MEGA_Example.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, st...
dadd0469465dfc1c6e2bb467c076a3b79aeb61e4866b328e6f8769d682317461
MATLAB
17,468
424
function PlotFigure1(datadir, codedir) %PlotFigure1 - Plots Figure 1. Must be run after ProcessData_Figure1. % INPUTS: % datadir - Local directory where ProcessData_Figure1.mat was saved after running ProcessData_Figure1 % codedir - Local directory where code (e.g., published/EstrousRPE/) was saved %% Set up paths...
91d410d998e64b5e87a9b50349234efac20f97a60c63d91dc7e77244bb74d217
MATLAB
17,470
428
function [SPM] = spm_fmri_spm_ui_lqc(SPM) % Setting up the general linear model for fMRI time-series % FORMAT [SPM] = spm_fmri_spm_ui(SPM) % % creates SPM with the following fields % % xY: [1x1 struct] - data structure % nscan: [double] - vector of scans per session % xBF: [1x1 struct] - Basis functio...
44e4d6f84699dc0c6a0cc4dc8d87891f69308c4f502ff1f832c65f33ebdd3f55
MATLAB
17,506
358
function plotSpectralTrials(params, resp, triggers) % given cell array resp{sess} of 2D data: [samples, ch] computes the STFT % normalizes spectra to baseline time to compensate for the 1/f decay % for each class & channel extracts + plots mean of trials % the trials are cutted from triggers{1}.sampleSessLabel % furth...
310f9a8a7f509a6f839f39e4c2f193e5dd0148eb0955d402cbcbee2fa4d9cf69
MATLAB
17,568
350
%% jobIMA.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, structural imagi...
3fb3e1e85877d21d795c580a0b92d2b2ba7c491a4c1ddbf61d73d05f5b2b3c24
MATLAB
17,568
466
function varargout = ica_selection(varargin) % ICA_SELECTION MATLAB code for ica_selection.fig % ICA_SELECTION, by itself, creates a new ICA_SELECTION or raises the existing % singleton*. % % H = ICA_SELECTION returns the handle to a new ICA_SELECTION or the handle to % the existing singleton*. % % ...
ed88a0d11473de174998a99c304a03371d526bc7ec7ac54cd2560245263e4b96
MATLAB
17,570
584
function classificationResults = doClassification(recordingLevelData, Params, subset_lag, plotSaveFolder, oneFigureHandle) % Do classification of genotype based on network features % % Parameters % ---------- % recordingLevelData : table % Params : struct % figSaveFolder : str % subset_lag : int % which lag to u...
29433a7259e8694a1f0b8a608bab7f962ad7f160381f47767476385a987afa88
MATLAB
17,606
434
function SuppFigure_BroadWeight(varargin) %SUPPFIGURE_BROADWEIGHT Generate supplementary figure for broad weight distribution analysis % % Purpose: % Creates a comprehensive figure showing the effects of broad weight distributions % on network dynamics, including weight distributions, balance indices, normalization...
d33e007443481ce8dab7bc9ab8dfb238ba03ddfec903ad5431f94c0d86a45d94
MATLAB
17,644
312
function GRUP = ch2roi_load(params, groupInfo) % pools results from trigger analysis over: % - freq. bands % - ROIs (regions of interest): anatomic areas, ... % - subjects % spectra are evaluated based on significance criteria of the last FB specified (typically hiGamma) % returns: GRUP struct % (c) Jiri, Nov21 ...
df380a445b04fdfb4afe4731948bf9003aa617709077e8ce17b4529808fd4fd5
MATLAB
17,655
335
set_up_paths_and_data_directories; stim_names = { 'After_The_Rain', 'Between_Viewings', 'Big_Buck_Bunny', 'Chatter', 'Damaged_Kung_Fu', ... 'First_Bite', 'Lesson_Learned', 'Payload', 'Riding_The_Rails', 'Sintel', 'Spaceman', ... 'Superhero', 'Tears_of_Steel', 'The_secret_number', 'To_Claire_From_Sonny', 'You_Again' };...
c91dfd32b4fd3ec5c8309b154c02b9de33e90630651e4be26a31cb91337ae36d
MATLAB
17,662
524
function res = vl_simplenn(net, x, dzdy, res, varargin) %VL_SIMPLENN Evaluate a SimpleNN network. % RES = VL_SIMPLENN(NET, X) evaluates the convnet NET on data X. % RES = VL_SIMPLENN(NET, X, DZDY) evaluates the convnent NET and its % derivative on data X and output derivative DZDY (foward+bacwkard pass). % RES...
a6afae6f5e3366ad19995d13d4e837abffc7626deb44bcf54ea34192c7d03385
MATLAB
17,668
558
function [hout,T,perm] = dendrogram2(Z,varargin) %DENDROGRAM Generate dendrogram plot. % DENDROGRAM(Z) generates a dendrogram plot of the hierarchical binary % cluster tree represented by Z. Z is an (M-1)-by-3 matrix, generated by % the LINKAGE function, where M is the number of objects in the original % datas...
78f1836db8ab92f5194ab5b149ec7716171ce89513fbbcb910d110f6284d0cb9
MATLAB
17,670
349
% POP_SPECTOPO - Plot spectra of specified data channels or components. % Show scalp maps of power at specified frequencies. % Calls SPECTOPO. % Usage: % >> pop_spectopo( EEG, dataflag); % pops-up interactive window % OR % >> [spectopo_outputs] = pop_spectopo( EEG, dataflag, tim...
89f9fe316a75632b5491a11e5fa8f43793dbec7990018ba153f6013b7ff88a0d
MATLAB
17,697
372
%% ms SEI fig - anatomy area (AA): 3D brains + spectra + FBs, Yeo7 + Yeo17 % (c) Jiri, Oct23 % small known bugs: % 1) FDR should be done for all P values at once (now fragmented in ch2roi_load) % 2) bip. channel B8 can be assigned to DAN (B7-B8) & DMN (B8-B9) %% settings: v1 - relaxed conditions (p-level, length of s...
fa2c805c21bf5febd89f8a179a4b3a375002c93ae6a5b2097bbfce344d6ba3b5
MATLAB
17,698
361
%% jobP_MEGA_LCModel_Example.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionall...
008eb9577c24a2c6ad8e3225401526601da658fea60f2f8608ddb41030a1f1aa
MATLAB
17,712
422
function [out] = osp_editSubSpecAlign(varargin) %% [varargout] = osp_editSubSpecAlign(varargin) % Aligns sub-spectra of (multiplexed) edited MRS data to minimize % subtraction artefacts. % % USAGE: % [outA, outB, outC, outD] = osp_editSubSpecAlign(in, seq, target,unstableWater); % % INPUTS: % in ...
6e4c187840e5e91a403cd9fdc46e30593aa887fcc0d7d994ff787cb3e019ad17
MATLAB
17,735
502
function read_cat(cat12_path, input_img, num_sources, num_cortex_verts); % % Input: cat12_path <string> fullpath to cat12 installation. % input_img <string> fullpath to T1 MRI image to be segmented by % CAT12. % num_sources <integer> number of sourcemo...
c4d8f0bf18e70e0a820cec59917016e8b5cff65e1327465fc3f5f821599737f7
MATLAB
17,745
491
% % Transform fNIRS data from .txt to .nirs format for use with HOMER % processing package. % % Prerequisite % ---------- % To use this script, the user must first create an .SD file which matches their Shimadzu % probe layout using the SDgui function of Homer2 (or AtlasViewerGUI/Make Probe). % Refer to Aas...
f3e797643c919c7c786dfac1242a3f4b37ad721370ce608c7ec7df3b18e9caaf
MATLAB
17,753
348
%% jobSDAT.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, structural imag...
09553770f92612d0fbea9df9a4d8beb4a325c0d191b167ce957024b4b545fff5
MATLAB
17,756
401
function alignLandmarks = TMSviewer(fileNameList, outFileName, alignLandmarks, newMmPerVox, weights, bb, showFigs, clipVals) % % outImg = mrAnatAverageAcpcNifti(fileNameList, outFileName, [alignLandmarks=[]], [newMmPerVox=[1 1 1]], [weights=ones(size(fileNameList))], [bb=[-90,90; -126,90; -72,108]'], [showFigs=true],...
69ac5d5f2b2238b9c67f6e1df97b36f8da3436a2d8307c7c86f4ab145418e269
MATLAB
17,772
387
function label_subject_and_write_json(input_img, atlas_dir, num_vertices, out_json, opts) % LABEL_SUBJECT_AND_WRITE_JSON % % Input: % input_img <string> Full path to a subject T1 (or any NIfTI in the CAT12 output % folder). Its folder is used to locate CAT12 surfaces and its % ...
b7f8ae869bd879d363c118b15312196bc2471bd5e9f03dce72c59356831eb6b7
MATLAB
17,782
360
%{ # masks created manually -> reso.Segmentation --- %} classdef SegmentationManual < dj.Computed properties popRel = reso.SummaryImagesAverage end methods(Access=protected) function makeTuples(self, key) images = ne7.mat.normalize(fetch1(reso.SummaryImagesAverage & ...
b3df6fbff34c770f16864cf228ac9ccb706cbe4a96ffa86f6bb0047a4e25124c
MATLAB
17,820
435
% code for improved 1/f fit of mouse LFP data % requires the following in the path: the Chronux package and the following % called upon functions: improved_LFP_fit.m,st_fit_LFP.m, % plot_spectrum_two_groups.m, fg_bootstrap_two_groups.m % fg_bootstrap_two_groups_seed.m, and makeseed.m % requires the following in ...
7afec7cf18415851c6893e82961017a84be18ffdae106d3cda6ff1b3d57036ff
MATLAB
17,837
594
function coactPaper_figureS11() labelWeight=true; labelCase=false; labelSize=9; letGapX=5; letGapY=6; fontsize=6; close all fh=initFig('width',18.6,'height',15,'font','Arial','fontsize',fontsize); x=8;y=4; panel_01(x,y,fontsize); panelLetter2(x-letGapX-1,y-letGapY+5,alphabet(1,labelCase),'fontSize',labelSize,'isBold'...
d38f4ffb79239c0d5d44416f76e52696d808aebba0ac5fc8286357a0e77eb798
MATLAB
17,853
329
% POP_CHANCORESP - define correspondences between two channel locations structures % (EEG.chanlocs) automatically (by matching channel labels) % else using a user input gui. % Usage: % >> [chanlist1 chanlist2] = pop_chancoresp(chanstruct1, chanstruc2, 'key', 'val', ...); % % In...
d5dfff08e5e07527bcdc5c04831af93e559731eeb1838f8392a9101d609b9ea4
MATLAB
17,857
352
%% jobSDAT.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, structural imag...
7068645b3afd0abd954486037a7c0ec077cd59b9e3128515c1f0789b3e1f35da
MATLAB
17,862
664
% Author: Tayfun Tumkaya % Display the Temperature Preference of Fly in Multiple Experiemnt. % clc close all; clear all; % Last_Data=42000; % Basket for Experiments. % file_list = { % % % {'w1118-UAS-TrpA1(Or65c)_I-n.mat' % 'w1118-Or65c-Gal4_III-n.mat' % 'w1118-Or65c-Gal4_II-n.mat' % 'w1118-Or65c-Gal4_I-n.m...
6e533ec69db2cdbd880973efb62b35b1f73a765ff750f256accb4331dda81995
MATLAB
17,896
450
function [fitParamsStep2] = fit_OspreyPrelimStep2MMGaussians(dataToFit, resBasisSet, fitRangePPM, fitParamsStep1) %% [fitParamsStep2] = fit_OspreyPrelimStep2MM(dataToFit, resBasisSet, minKnotSpacingPPM, fitRangePPM, fitParamsStep1, refFWHM) % Performs the second step of the LCModel preliminary analysis % according ...
f22261fdfd78c13a8ee3f5326af6c4be9aa84aa1b1ffa7937cc2d34e2ad60d9e
MATLAB
17,899
516
function json=savejson(rootname,obj,varargin) % % json=savejson(rootname,obj,filename) % or % json=savejson(rootname,obj,opt) % json=savejson(rootname,obj,'param1',value1,'param2',value2,...) % % convert a MATLAB object (cell, struct or array) into a JSON (JavaScript % Object Notation) string % % author: Qianqian Fa...
2d0d961b2717fc334e5e9773b4fd246504b44b0d7d58c95bf15db7c55b028113
MATLAB
17,903
528
function res = vl_simplenn(net, x, dzdy, res, varargin) %VL_SIMPLENN Evaluate a SimpleNN network. % RES = VL_SIMPLENN(NET, X) evaluates the convnet NET on data X. % RES = VL_SIMPLENN(NET, X, DZDY) evaluates the convnent NET and its % derivative on data X and output derivative DZDY (foward+bacwkard pass). % RES...
1e423f272dd87b7a176ccc8254e201130d0989fba2d1462439f6cc922d036547
MATLAB
17,905
354
function out = NL_PersistentHomology(y, tau, m, maxDim, maxN) % NL_PersistentHomology Topological data analysis of a time-delay embedding. % % Time-delay embeds the time series (Takens' theorem) and computes the % persistent homology of the resulting point cloud under a Vietoris-Rips % filtration, via the ripser tool...
1c7f3512e6972a2e3233091c6fa0e78f19ab35f3edb68cc80a4a0dfeec395a13
MATLAB
17,919
370
% STD_ERSP - Compute ERSP and/or ITC transforms for ICA components % or data channels of a dataset. Save results into Matlab % float files. % % Function description: % The function computes the mean ERSP or ITC for the selected % dataset ICA components or data cha...
f3111e4751db9bd836545d65d086779cf12f1a34ad1c7cb0222fbbc93ffbc004
MATLAB
17,920
495
%% MakeAFMmap_RectangularGrid_measuresetnumber.m 17/07/2019 Julia Becker % This script allows the user to tailor a rectangular AFM measurement grid. % Based on three landmark points for which the stage coordinates are known, % this script establishes conversion variables between the stage and the % overview im...
f314dda423f2c7fb679a71d13aa2aa4248d24c43ff74d4a88441427eec7323f4
MATLAB
17,948
478
%% Aplha-power analysis clear ft_defaults % set params selsensors = 'occ'; % select files folder = 'Q:/MEG_data/'; filelist = dir(fullfile(folder, '**', 'tfr_all3.mat')); filelistHiLo = filelist([1 5 3 8 9 13 12 16 17 20 21 24 25 29 27 34 32 36 37 40]); %HIGH-LOW condition filelistLoHi = filelist([7 2 6 4 11 ...
aadca8437d2bcaf2f5bd412e93d201a5950744d5d5a078a2d6734b8d7fcb4a36
MATLAB
17,972
498
function [results, center, Cn, PNR, save_avi] = greedyROI_endoscope(Y, K, options,debug_on, save_avi) %% a greedy method for detecting ROIs and initializing CNMF. in each iteration, % it searches the one with large (peak-median)/noise level and large local % correlation. It's the same with greedyROI_corr.m, but with so...
696ff3210ca26a44b306f9387f1352ca8310eb5c2cffd8d74738b41de8788f28
MATLAB
17,990
434
% REJSTATEPOCH - reject bad eeg trials based a statistical measure. Can % be applied either to the raw eeg data or the ICA % component activity. This is an interactive function. % % Usage: % >> [ Irej, Irejdetails, n, threshold, thresholdg] = ... % rejstatepoc...
cc25aeec0f5737d824a1800dd9b31b587a13369a24944dd39e1af86944809095
MATLAB
17,990
329
function [post nlZ dnlZ] = infEP(hyp, mean, cov, lik, x, y, opt) % Expectation Propagation approximation to the posterior Gaussian Process. % % The (sequential) EP algorithm performs a number of sweeps over the data in % random order, for better performance when cases are ordered according to the % targets. During a s...
f9834a52bfcdbdd09a275ee732a9662a161e4695fa216166df5b1d7485240506
MATLAB
18,014
534
function [ mri_all ] = nmri_mri_segment( cfg, params ) % [ mri_all ] = nmri_mri_segment( cfg, params ) % will segment (SPM12, new segement) MRI scans for % use in Fieldtrip (e.g. for headmodeling). Data should be passed in a % cfg-struct % % cfg.t1 = path to T1 image or Fieltrip mri struct (needed) % .flair ...
17395c3e4aec6a8d823c0f10cf74611fc41c50b147ba4ca72f69c04f1e2e65fa
MATLAB
18,019
351
%% get_AHEAD_atlas_labels(input,mask,output_dir,algorParam) % % Usage: % % Input % -------------- % input : structure that contains input nifti file names % mask : structure that contains mask nifti file names % output_dir : directiry where the output files will be stored % algorParam : algorithm...
19a093fc726b4e6fac91db698cc4b617dda6f5fa1ef3af1a15a71048cd44f515
MATLAB
18,031
484
function [err,FigHndls] = DispIVSurf (NodeList,FaceSetList,UsedNodeSet,ITvect,FigHandle,DispOpt) % % [err,FigHndls] = DispIVSurf (NodeList,FaceSetList,UsedNodeSet,ITvect,FigHandle,[DispOpt]) % % NodeList is a Nx3 matrix containing the node index and the % XYZ coordinates of each of the N nodes that form the surface mo...
6d7cea81b2f7590211a13396b3a90a03f3a02a14a520adb9b565f653b40232ff
MATLAB
18,040
522
% TIMTOPO - plot all channels of a data epoch on the same axis % and map its scalp map(s) at selected latencies. % Usage: % >> timtopo(data, chan_locs); % >> timtopo(data, chan_locs, 'key', 'val', ...); % Inputs: % data = (channels,frames) single-epoch data matrix % chan_locs = channel locat...
f1422fe42e02d4537445a59f96911360fee2758fea5d020787d64297140ad21c
MATLAB
18,043
511
function [Out] = icaDim(Origdata, DEMDT, VN, Iterate, NDist) % % ICADIM(Origdata, DEMDT, VN, Iterate, NDist) % % Estimates the number of ica components that are not due to random noise, % and makes a standard deviation map of the random noise estimate % % DEMDT: 1 to detrend, 0 to only demean, -1 to do nothing, >1 to...
b68c20278dbc92253b15f96c3ffee1256316100840006cfd0c6dcf421e1fd414
MATLAB
18,051
362
%% jobTwix_MEGA_LCModel_Example.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, option...
cd618862313709eb759a7866b6d65ab9cdb39c9d24984d8e4c96c22475ef8e55
MATLAB
18,072
417
% STD_CHECKSET - check STUDY set consistency % % Usage: >> [STUDY, ALLEEG] = std_checkset(STUDY, ALLEEG); % % Input: % STUDY - EEGLAB STUDY set % ALLEEG - vector of EEG datasets included in the STUDY structure % % Output: % STUDY - a new STUDY set containing some or all of the datasets in ALLEEG, % ...
d21ceeb47bed79ebf304da5faceb4115b540d3fdf53711a6fdb61db69f1affd8
MATLAB
18,077
430
% PAC_CONT - compute phase-amplitude coupling (power of first input % correlation with phase of second). There is no graphical output % to this function. % % Usage: % >> pac_cont(x,y,srate); % >> [pac timesout pvals] = pac_cont(x,y,srate,'key1', 'val1', 'key2', val2' ...); % % Inputs: % x =...
0a086a3aa89096c1866ddfb40f3c17e482fd81771a82b95069ec9b3661d4fc41
MATLAB
18,078
445
% POP_PROP - plot the properties of a channel or of an independent % component. % Usage: % >> pop_prop( EEG); % pops up a query window % >> pop_prop( EEG, typecomp); % pops up a query window % >> pop_prop( EEG, typecomp, chanorcomp, winhandle,spectopo_options); % % Inputs: % EEG ...
c2b7270ccc1fe4dcd67c91459cac27adab44836e60108be19263ea7548e336a9
MATLAB
18,130
401
classdef clusteringGUI < handle properties currentCluster = 1 page = 1 thumbnail_size = [50 100] clustAssign clusters rejected ClusteringData minfreq maxfreq fig image_axes = gobjects() handle_image = gobjects() ...
0d25d4c25e44bd0eb781948fc2a6d8e453ef867f16a5f3758762f06d160ea586
MATLAB
18,136
549
% io_loadspec_niimrs.m % Georg Oeltzschner, Johns Hopkins University 2021 % % USAGE: % out = io_loadspec_niimrs(filename); % % DESCRIPTION: % Reads in MRS data stored according to the NIfTI MRS format. % See the specification under % https://docs.google.com/document/d/1tC4ugzGUPLoqHRGrWvOcGCuCh_Dogx_uu0cxKub0EsM/edit %...
311657a53df4d775d919871b6f9db97581b56b8d03fdb1ddca2859cc449c116f
MATLAB
18,173
424
function [n_best P_best V C]=fast_oopsi(F,V,P) % this function solves the following optimization problem: % (*) n_best = argmax_{n >= 0} P(n | F) % which is a MAP estimate for the most likely spike train given the % fluorescence signal. given the model: % % <latex> % \begin{align} % C_t &= \gamma*C_{t-1} + n_t, \qquad...
0be7a6bea585f5b7f5d2d0c179e7782adccc7b404d3db5248eb6b923aee8e27f
MATLAB
18,174
333
function outbytes = cifti_write_xml(cifti, keep_metadata) if ~(nargin > 1 && keep_metadata) prov = cifti_metadata_get(cifti.metadata, 'Provenance'); cifti.metadata = struct('key', 'Provenance', 'value', 'cifti_write_xml.m v2.2.3'); if ~isempty(prov) cifti.metadata = cifti_metadat...
ec5c7deef705132c6f9de73dbab4b6c19fd96a2e46dc80b243b2e09bd57e7592
MATLAB
18,184
444
% EEG_INTERP - interpolate data channels % % Usage: EEGOUT = eeg_interp(EEG, badchans, method, t_range); % % Inputs: % EEG - EEGLAB dataset % badchans - [integer array] indices of channels to interpolate. % For instance, these channels might be bad. % [chanlocs structure] cha...
f57d7a149bf0efb2f6087cdae1488ef9d696f215d1f2776181a6400fd2a30da0
MATLAB
18,200
484
clearvars; close('all'); clc dropboxpath = '/Volumes/Seagate Backup Plus Drive/'; studypath = [dropboxpath 'SWITCH_EEG2']; addpath([studypath '/scripts']) fs = filesep; datapath = sprintf('%s%sdata',studypath,fs); fieldtrippath = sprintf('/Users/paulmk/Documents/MATLAB/toolboxes/fieldtrip-20180830/'); %f...
ad6329d4fdf2229899553795fea3880efa9d9dcf4e5cf295bf2fa09eb2781097
MATLAB
18,225
537
function plotFigureS2_divNorm10trial(behaviorPath) % Process and plot data for figure S2. Plots divisive normalization model % predictions for a trial integration window of 10. Plots conditional wait % times for 20ul trials for experts, inference model, and 10 trial divisive % normalization model. Plot sigmoid fit hi...
e9742539759a2bbc5bd752e5f2565ba07507c8418dcae8768dafe1b482eab8fe
MATLAB
18,230
515
function akZoom_PR(handles, mButtons_ZoomPanReset) % allows direct zooming and panning with the mouse in 2D plots. % % Default mouse button functions (can be customized, see below): % Scroll wheel: zoom in/out % Left Mouse Button: select an ROI to zoom in % Middle Mouse Button: pan view % Right Mouse ...
95b887f22e3cd6d1e42274d42fb7bc13dd6b654ac5b142c976f3ecbdaf8936da
MATLAB
18,236
368
function spectralTrials(params, resp, triggers) % given cell array resp{sess} of 2D data: [samples, ch] computes the STFT % normalizes spectra to baseline time to compensate for the 1/f decay % for each class & channel extracts + plots mean of trials % the trials are cutted from triggers{1}.sampleSessLabel % further, ...
80eed79d7c03e774cabc21c0089d0010a7e57178b89aafd0b9dc4e3cb102ebec
MATLAB
18,244
405
% STD_PLOTTF - plot ERSP/ITC images a component % or channel cluster in a STUDY. Also allows plotting scalp % maps. % Usage: % >> std_plottf( times, freqs, data, 'key', 'val', ...) % Inputs: % times - [vector] latencies in ms of the data points. % freqs - [vector] frequencies in Hz ...
97ad3fa1a85a5cf4d8f67edb1b98bbd81bbae571872e4467e809e4efbd8cfa43
MATLAB
18,252
430
function coactAnalysesReactPipeline(rootDir,sessionName,varargin) load(fullfile(rootDir,sessionName,[sessionName '.basicMetaData.mat'])) reAnalyses=false; for idx=1:length(varargin)/2 varName=varargin{2*idx-1}; varVal=varargin{2*idx}; switch lower(varName) case lower('reAnalyses') ...
7cf97538317248bf8dc2904e86d8c57a2546908d8044ecafbadaa9ddc5337037
MATLAB
18,264
461
% POP_RESAMPLE - resample dataset (pop up window). % % Usage: % >> [OUTEEG] = pop_resample( INEEG ); % pop up interactive window % >> [OUTEEG] = pop_resample( INEEG, freq); % >> [OUTEEG] = pop_resample( INEEG, freq, fc, df); % % Graphical interface: % The edit box entitled "New sampling rate" contains the frequ...
32c78197ae33f3a25a0768887f4591fb6abe9b2eca655601f0de95dcc1a5cc99
MATLAB
18,344
581
function [BestFit_mf, BestFit_mb,... BestFit_mb_lambda] = Figure3(datadir, codedir) %Figure3 - Computational modeling reveals distinct value computations for % wait time and trial initiation % datadir = directory of dataset % codedir = director of code %% Set up paths s = pathsep; pathStr = [s, path, s]; onPa...
149d3d3499795efeec78a09bdca6f887bea0ae592dcb73f465c3e93d1674c79a
MATLAB
18,354
289
% POP_IMPORTDATA - import data from a Matlab variable or disk file by calling % IMPORTDATA. % Usage: % >> EEGOUT = POP_IMPORTDATA; % pop-up a data entry window % >> EEGOUT = pop_importdata( 'key', val,...); % no pop-up window % % Graphic interface (refer to a previous version of the GUI): % "D...
b4e6386882cc311b86623451c00a15cbc896280a0d94984f92fc5495c7bb8142
MATLAB
18,370
365
%% jobSDAT.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, structural imag...
ede411bcef2625b759cb0c11e2d527a9dd07326af25e7a18baf7e1fc964b7fde
MATLAB
18,422
419
function [map,num,typ] = brewermap(N,scheme) % The complete selection of ColorBrewer colorschemes (RGB colormaps). % % (c) 2015 Stephen Cobeldick % % ### Function ### % % Returns any RGB colormap from the ColorBrewer colorschemes, especially % intended for mapping and plots with attractive, distinguishable colors. % % ...
60d8155befd627967f807efc7c7fa6a30534fa2988bd45c20bf682b56a646211
MATLAB
18,434
483
function TS_SimSearch(varargin) % TS_SimSearch Nearest neighbors of a given time series from an hctsa analysis. % % Nearest neighbors can provide a local context for a particular time series or % operation. % %---(OPTIONAL) INPUTS: % targetID, the ID of the target time series or operation % tsOrOps, 'ts' (for time ser...
741da0b8ecfb36d4ca68b0cfb7ee4e81e4831ef178f46aba27bf543f8ee3a5e1
MATLAB
18,440
519
function [Out1, Out2, Out3] = fastica(mixedsig, varargin) %FASTICA - Fast Independent Component Analysis % % FastICA for Matlab 7.x and 6.x % Version 2.5, October 19 2005 % Copyright (c) Hugo Gävert, Jarmo Hurri, Jaakko Särelä, and Aapo Hyvärinen. % % FASTICA(mixedsig) estimates the independent components from given % ...
fc2c7085f74fd56f7621cbf6adde8e9c84182a0746e18438da8d7bf93aaf4f26
MATLAB
18,449
63
function map = twilight(N) % Perceptually uniform cyclic colormap from MatPlotLib. % % Copyright (c) 2015 Bastian Bechtold % Copyright (c) 2017-2020 Stephen Cobeldick % %%% Syntax: % map = twilight % map = twilight(N) % % Colormap designed by Bastian Bechtold. % % Cyclic colormaps are designed for plotting data that ...
2c8e3ddccb732afbc000a94d636734fdad7ef3a61b942c7158fb03a85b736794
MATLAB
18,547
539
function glm_nsdsynthetic(ppdir,ppdirname,designfile,hrfbasisfile,tr,glmdirname,hrfmanifoldfile) % notes: % - inherit from glm_nsd.m % - went through and did minimum necessary changes to get it to work. % the code will eventually have to be modularized and generalized! glmdir = regexprep(ppdir,'ppdata',glmdirn...
5d8049bf89ab181a87f6f734792ed989d3135a1d493fa286fa7751f506502fdf
MATLAB
18,552
548
% function rippleDetection7(lfpFile,chList,[options]) % detect ripples from .lfp file, use ripple band power and sharp waves % % lfpFile: path of .lfp file % chList: cell containing ch lists on each shank % % options (name and default values) % param.nChTot=basicMetaData.nCh; % param.nSample=basicMetaData...
e125a03a53e5176c19a1999e4a8d3ad14479778e53e02d89facec46f71cf8f1d
MATLAB
18,584
357
%% jobSDAT.m % This function describes an Osprey job defined in a MATLAB script. % % A valid Osprey job contains four distinct classes of items: % 1. basic information on the MRS sequence used % 2. several settings for data handling and modeling % 3. a list of MRS (and, optionally, structural imag...
88bb493fec79ad6bc2ad1fef507d3f5e4971aa991bdda19fa7bde794dfa89fa0
MATLAB
18,596
424
function [n_best P_best V C]=fast_oopsi(F,V,P) % this function solves the following optimization problem: % (*) n_best = argmax_{n >= 0} P(n | F) % which is a MAP estimate for the most likely spike train given the % fluorescence signal. given the model: % % <latex> % \begin{align} % C_t &= \gamma*C_{t-1} + n_t...