sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
06971ecf783a73bf722f2bca780a4907c609dea676306f1cfd8a3d952b11782e
MATLAB
49,810
1,685
%% --- Plot cohort age & sex metrics load stroke_lokalization_data.mat figure(667) clf % --- Filter out people under 60 from "old stroke cohort" idxs = find(StrokeCohort.Ages >= 60); StrokeCohort60Plus = StrokeCohort.Ages(idxs); % --- Put cohorts in vector CohortAges = [YoungControlCohort.Ages'; OldControlCohort....
2e8094364d77eed9fc71720447a9519409854d26eecb1a824a6adcb90fd58b0d
MATLAB
49,842
1,424
function m2html(varargin) %M2HTML - Documentation Generator for Matlab M-files and Toolboxes in HTML % M2HTML by itself generates an HTML documentation of the Matlab M-files found % in the direct subdirectories of the current directory. HTML files are % written in a 'doc' directory (created if necessary). All the o...
bfebf3ac452406e12a145e4a40dee1ef50bfb6592bec015b7a1b1e6bef7b1267
MATLAB
49,856
943
clear all; clc; ForderName=['PAG/BadMood']; foldapath=['Figure/PavFo4C4S_task/',ForderName]; allfolda=dir([foldapath,'/*.mat']); for num_file=1:length(allfolda) num_file FileName=allfolda(num_file).name; Final_FileName=FileName(1:length(FileName)-4); if FileName(7)=='P' FileName=FileName(1:fin...
7b11d61e7d8338a35104e87a19fda8f7ca931b4da807430891a26794629daab7
MATLAB
50,429
964
function [MRSCont] = OspreyProcess(MRSCont) %% [MRSCont] = OspreyProcess(MRSCont) % This function pre-processes MRS data from all major vendors. % Data is read from the provided input filenames. It is shaped, % preprocessed, aligned, etc. according to the type of sequence % (un-edited data, MEGA-edited (ON/OFF)...
5f27eb919b692a4165cc6507918bfeabb576fca17c5db62bc92f798b9a455aa1
MATLAB
50,483
1,283
% ENVTOPO - Plot the envelope of a multichannel data epoch, plus envelopes and % scalp maps of specified or largest-contributing components. If a 3-D % input matrix, operates on the mean of the data epochs. Click on % individual axes to examine them in detail. The black lines repr...
c3f8bc81dd44e4d6d0b2e955c69298f4f273e2330000b8935475a8980871514a
MATLAB
50,690
1,116
function ok = hlp_trycompile(varargin) % Try to auto-compile a set of binary files in a folder, and return the status. % OK = hlp_trycompile(Options...) % % This function tries to ensure that a given set of functions or classes (specified by their % MATLAB identifier), whose source files are assumed to be located in a ...
ebf455e83ffc24735ebc9197a60c9b183cc677db4cffda72e3273fab93ecd6ad
MATLAB
50,709
1,396
%% BBT_SL % % Full title: BroadBand frequency Tagging & Statistical Learning of distractor location % Author: Oscar Ferrante % % % PARADIGM: % This experiment consists in an additional singleton visual search task. % Four (4) gabor patches are presented across four (4) locations. After a % short presentation of ident...
2dd6b75417f4db77fe25fbde574b5054a40e780c0514ea9ae9431ce1dead3358
MATLAB
50,859
542
% This script is used to generate the phantom data to plot the distribution % figures in the manuscript. The analysis is run as a Monte Carlo Simulation % with a single signal representation overlayed with different noise reps % % USAGE: % Phantom_Script_BiExp_Relax % % OUTPUTS: % Distributions from Mon...
11b0f6aefa7f0d513fce37f8e4812c6eae13060885126c68683c7e8b8eb225ee
MATLAB
51,715
1,159
function [MRSCont] = load_mrsi_data(MRSCont) %[off_spec_no_lb,on_spec_no_lb] = load_mrsi_data(FileName, PathName,lb, spec_zfill, k_zfill, seq_type, water_filter, k_fft2_wat_ref, k_fft2_wat_ref_no_k_zfill, k_sort_b4_2dfft, wat_file) %% [off_spec_no_lb,on_spec_no_lb] = load_mrsi_data(MRSCont) % This functions load dat...
2a20ae597afce9303e24dfdc929a56ef62606870f63b3600530d8ce9b0d6d0ca
MATLAB
51,781
1,370
%% %%%%%%%%%%%%%%%%%% EXPORT FILES % notes: % - you must run on stone to get the Dropbox to update! and might even need to touch the directory % - for betas, we should run on surly (for speed). % in fact, i need surly in order to write nocompression betas .mat % - we are zeroing-out betas! and zeroing-out timeseries...
f04d2f1b7ac7ffb17665b8bf341f4262a47be5a58b19d0223c43238f8bad07e5
MATLAB
52,010
1,602
%$Release 4.0 % Copyright (c) Copyright 2004 - 2006 - The General Hospital Corporation and % President and Fellows of Harvard University. % % All rights reserved. % % Redistribution and use in source and binary forms, with or without % modification, are permitted provided that the following conditions are met: % % *...
dcdeeaa6873986d3d34b4fa857674915230297bf6ea4582f6a89a92bf74e55ba
MATLAB
52,819
1,106
function stats_p_r=compareRefRDM2candRDMs(refRDM, candRDMs, userOptions) % GENERAL PURPOSE % This function compares a reference RDM to multiple candidate RDMs. For % example, the reference RDM could be a brain region's RDM and the % candidate RDMs could be multiple computational models. Alternatively, the % reference ...
5c3363321ec9a7b3fee6dc506774dd690b1eff52bcd4f5bc5d490ce118a27574
MATLAB
53,069
1,214
% BIDS_EXPORT - this function allows converting a collection of datasets to % BIDS formated folders and files. % % Usage: % bids_export(files, varargin) % % Input: % files - Structure with the fields 'file','session' and 'run'. % The field 'file' should be a cell array of strings ...
c87a5a6cbce6b3e5cd598127591243f6f7c238c754984d2aa7cf70c6049e8320
MATLAB
53,661
1,553
function varargout = spider_plot(P, varargin) %spider_plot Create a spider or radar plot with individual axes. % % Syntax: % spider_plot(P) % spider_plot(P, Name, Value, ...) % h = spider_plot(_) % % Documentation: % Please refer to the MathWorks File Exchange or GitHub page for the % detailed docum...
eca75e69de6886290731baba357b0a5167e4fdafdd15062eef7af17b7873873a
MATLAB
54,160
711
function osp_iniFitWindow(gui) %% osp_iniFitWindow % This function creates the initial fitting window in the gui. % % USAGE: % osp_iniFitWindow(gui); % % INPUT: gui = gui class containing all handles and the MRSCont % % OUTPUT: Changes in gui parameters and MRSCont are written into the % ...
33dd0718d818783e0c248f65571ab78c54aa6156b06be4a15e3d24360b2a42ee
MATLAB
54,408
1,408
close all; clear all; clc; % Base settings runtime = 360; cuttime = 120; dt = 1/3600; % 1sec = 1/3600 hour t = 0; Nx = 101; % 101 - 201 Ny = 101; % 101 - 201 px = 0; qx = 1; % 1 - 2 py = 0; qy = 1; % 1 - 2 dx = 0.01; dy = 0.01; Pprof = 5/6; x = px : dx : qx; y = py : dy : qy; Tanon = 0; % TAN switch / activated:0 / d...
1baacce2289389c622b6d6ee4878aa0d86226c6710caf9d72cc75810f54dea6b
MATLAB
54,499
1,109
% POP_IMPORTBIDS - Import BIDS format folder structure into an EEGLAB % study. % Usage: % >> [STUDY ALLEEG] = pop_importbids(bidsfolder); % >> [STUDY ALLEEG] = pop_importbids(bidsfolder, 'key', value); % % Inputs: % bidsfolder - a loaded epoched EEG dataset structure. % options are 'bidseve...
e0cd90614f360c0c57208a442a5e87cb15dc55af04414040984c2ec74a1b2928
MATLAB
54,591
2,709
function plotFromSourceData() close all fig_1c(); fig_3a();fig_3b();fig_3c();fig_3d(); fig_4b();fig_4c();fig_4d();fig_4e();fig_4f();fig_4g();fig_4h(); fig_5a();fig_5b();fig_5c(); fig_6c();fig_6d();fig_6e();fig_6f();fig_6g() fig_7a();fig_7b();fig_7c();fig_7d();fig_7e();fig_7f();fig_7g();fig_7h();fig_7i();fig_7j();fig_7k...
1144e3a412c20032f2c88a68477cab79f0c6b0c368f8b08736ea98256d596e91
MATLAB
55,304
1,346
function out=mmpolar(varargin) %MMPOLAR Polar Plot with Settable Properties. % MMPOLAR(Theta,Rho) creates a polar coordinate plot using the angle Theta % in RADIANS and radius in Rho. Rho can contain negative values. % MMPOLAR(Theta,Rho,S) creates the plot using the line spec given by S. See % the function PLOT fo...
0706cffa56f65b5cb0e16295b73914e9e91b1acf785efd8c1fff83092f7255dc
MATLAB
55,894
1,923
//======================================================================== // GLFW 3.4 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org> // // This software is provided 'as-is', without any express or implied // ...
726e659b53c3795193c4008d00ef658352a924e1a04cbc09411d2badf1dd81e6
MATLAB
56,637
1,693
function coactPaper_figure08() labelWeight=true; labelCase=false; labelSize=9; letGapX=5; letGapY=5; fontsize=6; close all fh=initFig('width',18.6,'height',15.5,'font','Arial','fontsize',fontsize); x=17;y=3; panel_01(x,y,fontsize); panelLetter2(x-letGapX-10,y-letGapY+3,alphabet(1,labelCase),'fontSize',labelSize,'isBo...
366bed2fde656706bd01cfcf354715f5f16eafe16ac641858a1f7e1e079d80d3
MATLAB
57,195
1,336
%% ICC Values for Within Session Functional Connectivity and Brain Variability %% ICC Calculation and Analysis (Figures 2, 3, 6) % This file contains code to calculate within session ICC values (Part 1) and % complete statistical analyses from figures 2, 3 and 6 (Part 2) from the paper. The % code is meant to be run s...
8cb643ae28685525729eeed35287ac2147ab3ff6660557100eff736eeb873b89
MATLAB
57,768
1,224
% GEDAI() - This is the main function used to denoise EEG da12ta using % generalized eigenvalue decomposition coupled with an EEG leadfield matrix % % GEDAI (Generalized Eigenvalue Deartifacting Instrument) % % Usage: % Example 1: Using all default values (and no bad epoch rejection) % >> [EEG] = GEDAI(EEG); ...
3397469f992f06fc03426d28c0d9851ba2ff05b666d316f7af59a4b9cc5aaa87
MATLAB
58,027
866
function [MRSCont] = OspreyOverview(MRSCont) %% [MRSCont] = OspreyOverview(MRSCont) % This function creates te data structre needed for the overview panel % in the GUI. It sorts the data by groups and performs the needed % statistics. % % USAGE: % MRSCont = OspreyOverview(MRSCont); % % INPUTS: % M...
6ce4e62cdf42e5a1246da3e5ba886c55146e9c3131204260efc133e39f4980d9
MATLAB
58,106
1,138
function plot_prediction_performance_across_epoch close all clear all clc % Plot prediction performance in each epoch by reduced-rank regression. % Select a folder containing data. folder_name = uigetdir; cd(folder_name) load('population_regression_control.mat') load('population_regression_APP.mat') % Stimulus. % C...
9734e7756e9909a96b32ea30337387e3fc4c4717a6e8968f1ae682c6ff3115dc
MATLAB
58,423
1,712
function [shape] = ft_read_headshape(filename, varargin) % FT_READ_HEADSHAPE reads the fiducials and/or the measured headshape and/or meshes % that describe headsurfaces, headmodels or cortical sheets from a variety of files % (like CTF and Polhemus). The headshape and fiducials can for example be used for % coregistr...
f4048a8dd4c619756153177ca8fcc6d28bd4c348c349d1e3a01f156ed6da35be
MATLAB
59,871
1,457
% CROSSF - Returns estimates and plots event-related coherence (ERCOH) % between two input data time series (X,Y). A lower panel (optionally) % shows the coherence phase difference between the processes. % In this panel, output by > crossf(X,Y,...); % 90 degrees (orange) means X lea...
e7da3100c1de7c1ab148ad00884363ad20ed960ce520dc11fc25e62b0d7fbfc2
MATLAB
59,921
975
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%% BREATHING FILTER DETECTION TASK ANALYSIS %%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ------------------------------------------------------------------------- % Author: Olivi...
064e00aceb29d79d1a4fd53135f22fbff7a5ffdeed9f87f42f57491400a2c481
MATLAB
60,480
1,254
function [MRSCont] = OspreyQuantify(MRSCont) %% [MRSCont] = OspreyQuantify(MRSCont) % This function transforms the raw amplitude parameters determined during % OspreyFit into quantitative estimates of metabolite levels. % % By default, OspreyQuantify will report tCr ratios for all metabolites. % These values wi...
87775097f711be10e51d66712f5c819a55da7475088da56fa93dc3c1ea98d740
MATLAB
60,499
1,151
function stimActivityAnalysis(spikeData, Params, Info, figFolder, oneFigureHandle) % Performs analysis of spike data relative to stimulation times % INPUT % ------- % spikeData : struct % Params : struct % Info : struct % figFolder : path % oneFigureHandle : matlab figure object % Default blank duration i...
f155c8d01c4fcafe3cfb820effb75b72d98a6d6c7ab07b36759f0446e8c501aa
MATLAB
60,673
968
% POP_CLUSTEDIT - graphic user interface (GUI)-based function with editing and plotting % options for visualizing and manipulating an input STUDY structure. % Only component measures (e.g., dipole locations, scalp maps, spectra, % ERPs, ERSPs, ITCs) that have been compute...
28d3bbdf2c6c9fc1d75a2b068b9ca298a284bba15467e5c5d5aee233279d5fd6
MATLAB
60,841
687
function A0_RSA_one_subj_41to50(subj) % % Add software, add DPABI before spm if ismac addpath(genpath(fullfile('..', 'DPABI_V8.1_240101'))); addpath(genpath(fullfile('..', 'REST_V1.8_130615'))); addpath(fullfile('..', 'spm')); greymask_path = fullfile('..', 'DPABI_V8.1_240101', ...
74421e60ad9355b3b3985ffd2dd593267898d0272af3cb4c20bf1f57cbeaf4d1
MATLAB
60,841
687
function A0_RSA_one_subj_31to40(subj) % % Add software, add DPABI before spm if ismac addpath(genpath(fullfile('..', 'DPABI_V8.1_240101'))); addpath(genpath(fullfile('..', 'REST_V1.8_130615'))); addpath(fullfile('..', 'spm')); greymask_path = fullfile('..', 'DPABI_V8.1_240101', ...
f4f0cbbb74a798655936614b63e1151b8071297b20d131d7ea2bc2628fc6f306
MATLAB
60,841
687
function A0_RSA_one_subj_21to30(subj) % % Add software, add DPABI before spm if ismac addpath(genpath(fullfile('..', 'DPABI_V8.1_240101'))); addpath(genpath(fullfile('..', 'REST_V1.8_130615'))); addpath(fullfile('..', 'spm')); greymask_path = fullfile('..', 'DPABI_V8.1_240101', ...
ed3809e4c9cd027519352d24612316430468810647868a7d2b9c57ded9a9879d
MATLAB
60,892
988
function plot_functional_connectivity_task_var_cell close all clear all clc % Plot functional connectivity between task-variable cells. % Select a folder containing data. folder_name = uigetdir; cd(folder_name) % Control. load('activity_control.mat') load('activity_iti_control.mat') activity = activity_control; acti...
e462cb5cbe33f0fdb2273a911672cd26e8959c28bf9b18f09c5e3fa7d7662f9e
MATLAB
61,147
1,526
%this is the code for producing the analysis and figures for the manuscript %"Overcoming off-target optical stimulation-evoked cortical activity in the %mouse brain in vivo"; Simon Weiler, Mateo Velez-Fort and Troy W. Margrie %this uses only data obtained in the year 2024 %% DEPENDENCIES, PLEASE READ %Please get t...
612c230df1c28c80560afc73358038c53fff0aae228bf73561bdeaca2d1f4e9d
MATLAB
61,685
1,852
function cmapOut = BF_GetColorMap(whichMap,numGrads,cellOut,flipMe) % BF_GetColorMap Colorbrewer colors for Matlab. % % Returns a nice set of colors to make a nice colormap using the color schemes % from http://colorbrewer2.org/ % % The online tool, colorbrewer2, is copyright Cynthia Brewer, Mark Harrower and % The ...
727204bcfdef2a19484d949ac73f9bff95516a964ef5b18a1f586d42e6d894bb
MATLAB
61,691
1,187
%% ICC Values for Functional Connectivity and Brain Variability Between Sessions %% And Analysis of Longitudinal ICCs (Figure 4) % This script calculates ICC values across longitudinal fMRI scans. % This script % is meant to be run section by section in order and used AFTER running the % testretest_ICC.m script. %%...
ac912f7e85e19df05e319668625f93aa6888aa3199122ae227242f1f99fb6597
MATLAB
61,713
1,425
% dipplot() - Visualize EEG equivalent-dipole locations and orientations % in the MNI average MRI head or in the BESA spherical head model. % Usage: % >> dipplot( sources, 'key', 'val', ...); % >> [sources X Y Z XE YE ZE] = dipplot( sources, 'key', 'val', ...); % % Inputs: % sources - structure arr...
4c9efbaab518aea0774bc207a00faaac86d9bfe2a92054a007b7f79d209957f9
MATLAB
62,379
633
function plot_example_neural_activity close all clear all clc % Plot_example neural activity. % Select a folder containing data. folder_name = uigetdir; cd(folder_name) load('activity_APP') % Sampling frequency of Scanimage. fs_image = 9.35211; % ALM. animal_num = 4; session_num = 1; region_num = 1; cell_num = 4; ...
4046a875c075a81f76b9c55ef7e74132ba8c43b1551fb3ea34610f4093b8b394
MATLAB
62,787
1,164
% POP_CHANEDIT - Edit the channel locations structure of an EEGLAB dataset, % EEG.chanlocs. For structure location and file formats, % see >> help readlocs % % EEG.chanlocs. For structure location and file formats, % see >> help readlocs % % Usage:...
2660f539111b97a53752efbea7b0ef6605a103869aa76288307ab14ed4503fcf
MATLAB
63,266
1,279
clear all; close all; clc; foldapath=['POP_Behavior/PavFo4C4S/ALL/PAG/BadMood']; allfolda=dir([foldapath,'/*.mat']); for num_file=1:length(allfolda) AllFileName_raw=allfolda(num_file).name; if ~isempty(find(AllFileName_raw(13:length(AllFileName_raw))=='A')) AllFileName{num_file}=(AllFileName_raw(1:fi...
119d6933db515e8d1d1113856a4988a7a2f155ba33b5900d313714caec86c9ea
MATLAB
63,639
1,503
% RUNICA - Perform Independent Component Analysis (ICA) decomposition % of input data using the logistic infomax ICA algorithm of % Bell & Sejnowski (1995) with the natural gradient feature % of Amari, Cichocki & Yang, or optionally the extended-ICA % algorithm of Lee, Gir...
6bab1afb9832b429474f0a0f2085a4bca55643deddd50ac0acecca9ca8953f3a
MATLAB
63,760
1,266
function [MRSCont] = OspreyHTMLReport(MRSCont,kk) %% [MRSCont] = OspreyHTMLReport(MRSCont,kk) % This function creates a short HTML report of the processing and modeling % and should be called at the end of the analysis. % % USAGE: % MRSCont = OspreyHTMLReport(MRSCont,kk); % % INPUTS: % MRSCont =...
f319441423280bfd3754d988f4f1424b3c15fdfe717532c9da16fd1ddff833d7
MATLAB
64,172
1,727
function [templates,correlations,weights,variance] = ActivityTemplates(spikes,varargin) %ActivityTemplates - Compute assemblies activity and neurons contribution from PCA of spike trains and ICA. % % Computes the templates for the component activation analysis described in % Peyrache et al (2009). Optionally, computes...
2f14ae398c7216c2c0410ac8bffad1b9a0671fd9411377781717d62456340604
MATLAB
64,211
1,353
clear all; close all; clc; ForderName=['ALL/LHbnPAG']; foldapath=['POP_Behavior/PavFo4C4S/',ForderName]; allfolda=dir([foldapath,'/*.mat']); for num_file=1:length(allfolda) AllFileName_raw=allfolda(num_file).name; if ~isempty(find(AllFileName_raw(13:length(AllFileName_raw))=='A')) AllFileName{num_fi...
46749cc299e068a8efa4bddb7b6d32f6b655645a7fb6936f1d16438de80a12a1
MATLAB
64,451
1,467
% NEWCROSSF - Returns estimates and plots event-related coherence (ERCOH) % between two input data time series. A lower panel (optionally) shows % the coherence phase difference between the processes. In this panel: % In the plot output by > newcrossf(x,y,...); % 90 degrees (orange)...
7c42f7513342ac46ea68ed7b980e28f9027f2303673c81bf33788607c66ed20a
MATLAB
65,326
1,548
% RUNICA - Perform Independent Component Analysis (ICA) decomposition % of input data using the logistic infomax ICA algorithm of % Bell & Sejnowski (1995) with the natural gradient feature % of Amari, Cichocki & Yang, or optionally the extended-ICA % algorithm of Lee, Gir...
0c1cff7ef138e91a3c4387153c49338bc95d5f0c7e602fa816e967fdc096c321
MATLAB
65,534
1,610
% topoplot() - plot a topographic map of a scalp data field in a 2-D circular view % (looking down at the top of the head) using interpolation on a fine % cartesian grid. Can also show specified channnel location(s), or return % an interpolated value at an arbitrary scalp locat...
cc4175922d68892bd74ff56d70c43c17cc2af167fa1c1c2c7fbbb9d4b8147274
MATLAB
66,963
1,358
classdef OperationsUnitTests < matlab.unittest.TestCase % Known-answer and edge-case unit tests for individual Operations/*.m % functions, run in isolation (no database, no full pipeline). % % Complements BasicPipelineTests.m, which only exercises the full % TS_Compute pipeline end-to-end. meth...
d4842d2fe93944552830d8beca55e3d80aff319a1216a10af0d25fec91e73926
MATLAB
67,218
1,351
%% Script to load and fit behavioural data from the Responsibility project experiments %% General setup clear; close all; clc owd = pwd; colors = niceColorsDark(3); % the colors for the 3 experimental conditions fontSize = 20; set(0,'defaultAxesFontSize',fontSize) addpath('fittingUtilityFunction') %% get datafiles % ...
c19d834030d0985d8709bdaa02004187d998e6ffebffaf32f8ec165cf03ae98c
MATLAB
67,547
977
function out = osp_plotModule(MRSCont, Module, kk, Index, which, metab, corr) %% osp_plotModule % Callback function on print figure button click. % % % USAGE: % osp_plotModule(MRSCont, Module, kk, which, metab, corr) % % INPUT: MRSCont = Osprey data container. % Module = String for t...
616af1676ac49c0c58818a89e2001c33844fd6cea75df416c29a1f56d3cb0afc
MATLAB
68,118
1,439
% EEG_CHECKSET - check the consistency of the fields of an EEG dataset % Also: See EEG dataset structure field descriptions below. % % Usage: >> [EEGOUT,changes] = eeg_checkset(EEG); % perform all checks % except 'makeur' % >> [EEGOUT,changes]...
15c6833f01bb2f60955008f76c20b6fae011a5a085178efcdff7d286f2d819c3
MATLAB
69,103
1,910
function [data] = ft_checkdata(data, varargin) % FT_CHECKDATA checks the input data of the main FieldTrip functions, e.g. whether the % type of data structure corresponds with the required data. If necessary and possible, % this function will adjust the data structure to the input requirements (e.g. change % dimord, a...
afa49404eb0009cde63265c4bf0dc69b80b61deaddd3940cb50d7da04f744850
MATLAB
69,665
1,685
function physio = tapas_physio_cfg_matlabbatch % This file needs to be in a sub-folder of spm/toolbox in order for the % Batch Editor to recognize PhysIO as an SPM toolbox. % Author: Lars Kasper % Created: 2013-04-23 % Copyright (C) 2013-2018 TNU, Institute for Biomedical Engineering, University of Zurich and ETH Zuri...
e102013b6d2851e6e81daa68a31cf7f8a295fa57a6a5554fc75e0667783d3988
MATLAB
69,719
1,385
%% Script to load and fit behavioural data from the Responsibility project experiments %% General setup clear; close all; clc owd = pwd; colors = niceColorsDark(3); % the colors for the 3 experimental conditions fontSize = 20; set(0,'defaultAxesFontSize',fontSize) addpath('fittingUtilityFunction') %% get datafiles % ...
7ade2d4130781634ce75e7c8b45811d7fe0e0668f592f537598585683940ac83
MATLAB
70,009
1,198
function out = osp_plotProcess(MRSCont, kk, which_spec,SubSpectraIndex,ExtraIndex,VoxelIndex, ppmmin, ppmmax) %% out = osp_plotProcess(MRSCont, kk, which, ppmmin, ppmmax) % Creates a figure showing processed data stored in an Osprey data container, % ie in the raw fields. This function will display the *processed a...
e217db007b171c3f9805011c603a1fbb1b55beed1f588aa8895e675f00aa3ab0
MATLAB
71,619
1,575
function MEApipeline(InputParamsFilePath) % Process data from MEA recordings of 2D and 3D neuronal cultures % Created: RC Feord, May 2021 % Authors: T Sit, RC Feord, AWE Dunn, J Chabros and other members of the Synaptic and Network Development (SAND) Group %% USER INPUT REQUIRED FOR THIS SECTION % In this section all m...
21f0eb08b6fc1acf642e1187feb5c76c5ae53bd6162f9489b366548570f83510
MATLAB
72,357
1,586
function MEApipeline_parity(InputParamsFilePath) % Process data from MEA recordings of 2D and 3D neuronal cultures % Created: RC Feord, May 2021 % Authors: T Sit, RC Feord, AWE Dunn, J Chabros and other members of the Synaptic and Network Development (SAND) Group %% USER INPUT REQUIRED FOR THIS SECTION % In this sectio...
879c2e82f89b2be8473b0a39664953eb07b4632bc71f3d34a1cdee108af1e11a
MATLAB
72,611
1,632
function quality_matrices = prepQtnirs(nirsFilePath,varargin) % QT-NIRS is a Matlab-based tool for the quality assessment of fNIRS data. % QT-NIRS can quantify the quality of an fNIRS recording in two different ways, by using a GUI or through a function call. % Graphically, the QTNIRS GUI allows the user to locate a w...
bb190e0b449218aa3cc1e14f12b691f4ce2cac99e464ef47160f0fa9795978c5
MATLAB
72,676
1,632
function quality_matrices = pruneAdaptedQtnirs(dotNirsFilePath,varargin) % QT-NIRS is a Matlab-based tool for the quality assessment of fNIRS data. % QT-NIRS can quantify the quality of an fNIRS recording in two different ways, by using a GUI or through a function call. % Graphically, the QTNIRS GUI allows the user to...
af2042d8077126a3fbd361d5aab43432352ab505f9fdd6c7dc285e7d5d353da1
MATLAB
72,983
1,774
function [dat] = ft_read_data(filename, varargin) % FT_READ_DATA reads data from a variety of EEG, MEG and other time series data files % and represents it in a common data-independent format. The supported formats are % listed in the accompanying FT_READ_HEADER function. % % Use as % dat = ft_read_data(filename, .....
75d07d0f55d769661f0f62049c6af8e0cec088a239e0bc03ac7fe37979149d4c
MATLAB
73,698
1,635
function MEApipeline_timingBenchmark_debug(InputParamsFilePath) % Process data from MEA recordings of 2D and 3D neuronal cultures % Created: RC Feord, May 2021 % Authors: T Sit, RC Feord, AWE Dunn, J Chabros and other members of the Synaptic and Network Development (SAND) Group %% USER INPUT REQUIRED FOR THIS SECTION %...
43116b0ff8ce7ed4193e5152c2443de0ea68ed7fc1f9dc3f265ce08d41a940c7
MATLAB
74,466
1,525
function varargout = WhiteMatter(varargin) % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @WhiteMatter_OpeningFcn, ... 'gui_OutputFcn', @Wh...
0916b3560d26646e5564e512d830037d45f645b60c43bed849a3da270f661e8a
MATLAB
76,554
1,583
function [imageData, alpha] = export_fig(varargin) %#ok<*STRCL1> %EXPORT_FIG Exports figures in a publication-quality format % % Examples: % imageData = export_fig % [imageData, alpha] = export_fig % export_fig filename % export_fig filename -format1 -format2 % export_fig ... -nocrop % export_fig ... -c[<v...
caf0ff1b239e3b33ca6f54de145a869821c59455e3930689920727c188a543cd
MATLAB
76,559
1,433
function filtData = filterData(params, rawData, filterTags, init_srate) % given 'rawData' (samples x ch) and 'filterSettings' struct containing all % relevant information about the filtering routine, filters the raw data % and outputs as 'filtData' % 'filterSettings' is a cell struct, may contain several filters follow...
dec34ea321efb546fc54ee75f6218926748572661a3a3136070af2e2e7976773
MATLAB
78,440
1,942
function out = spm_dicom_convert_osp(Headers,opts,RootDirectory,format,OutputDirectory,meta) % Convert DICOM images into something that SPM can use (e.g. NIfTI) % FORMAT out = spm_dicom_convert(Headers,opts,RootDirectory,format,OutputDirectory) % Inputs: % Headers - a cell array of DICOM headers from spm_dicom_hea...
35e5b1fad07338bb6bab5d8724801fee7961bfb2383703140e1d835814edc4d0
MATLAB
79,145
1,724
function MEApipeline_timingBenchmark(InputParamsFilePath) % Process data from MEA recordings of 2D and 3D neuronal cultures % Created: RC Feord, May 2021 % Authors: T Sit, RC Feord, AWE Dunn, J Chabros and other members of the Synaptic and Network Development (SAND) Group % % ===========================================...
268fa6da1886264527a3258bb041cce65eab20b925d5e204deb5feae6b3bed8d
MATLAB
80,099
985
function plot_trial_averaged_neural_activity_delay_cells close all clear all clc % Plot trial-averaged activity of delay cells. % Select a folder containing data. folder_name = uigetdir; cd(folder_name) % Control. load('activity_control.mat') activity = activity_control; clear activity_control % Initialize. for reg...
f8507cae61cfdc9a534511b69fb66b5a5fecfda80d12f6bcbcdd8c9bda75cdc3
MATLAB
80,288
1,282
clear all; clc; ForderName=['PAG/GoodMood']; foldapath=['Figure/PavFo4C4S_task/',ForderName]; allfolda=dir([foldapath,'/*.mat']); for num_file=1:length(allfolda) num_file FileName=allfolda(num_file).name; Final_FileName=FileName(1:length(FileName)-4); if FileName(7)=='P' FileName=FileName(1:f...
818134bae451961297d8656e32ed098a57bde90d5c09f1441751128a4408b19b
MATLAB
80,876
1,504
classdef CreateOspreyJob_app < matlab.apps.AppBase % Properties that correspond to app components properties (Access = public) InteractiveOspreyjobfilegeneratorUIFigure matlab.ui.Figure FWHMMM3coEditField matlab.ui.control.NumericEditField FWHMMM3coLabel m...
02d6c95fdbfce31d468992178ea3f867f77650e3b2978a68604af945c76c16a9
MATLAB
83,218
1,006
function osp_onPrint( ~, ~ ,gui) %% osp_onPrint % Callback function on print figure button click. % % % USAGE: % osp_onPrint( ~, ~ ,gui); % % INPUT: gui = gui class containing all handles and the MRSCont % % OUTPUT: Changes in gui parameters and MRSCont are written into the % g...
0b82198e34979f0a711a0438286173543c3c178f174c23c475ab51a36b790ce3
MATLAB
85,130
1,436
clear all; clc; ForderName=['PAG/BadMood']; foldapath=['Figure/PavFo4C4S_task/',ForderName]; allfolda=dir([foldapath,'/*.mat']); for num_file=1:length(allfolda) num_file FileName=allfolda(num_file).name; Final_FileName=FileName(1:length(FileName)-4); if FileName(7)=='P' FileName=FileName(1:fi...
1836f7ae66c30562e4f82b2dd02adadc9ce055e38b2a9f1e81f422c572311069
MATLAB
85,156
1,191
function [k_sort_on, k_sort_on2, k_sort_off, k_sort_off2,.... on_spec_k_1, on_spec_k_2, off_spec_k_1, off_spec_k_2,track_all_p_thresh] = motion_correct_mrsi_full(k_sort_on, k_sort_on2, k_sort_off, k_sort_off2,.... on_spec_k_1, on_spec_k...
2966ad81c0cbd4fb965b1c8d0a382c0376a40b4efc984c638ed675d2bb2d215b
MATLAB
85,465
2,547
function coactPaper_figureS19() labelWeight=true; labelCase=false; labelSize=9; letGapX=5; letGapY=6; fontsize=6; close all fh=initFig('width',18.6,'height',16,'font','Arial','fontsize',fontsize); x=10;y=5; panel_01_02_03(x,y,fontsize); panelLetter2(x-letGapX-2,y-letGapY+2,alphabet(1,labelCase),'fontSize',labelSize,'...
1721e25f2c12a6fd56cdabb160921acbd448430d8326bb856ebb0ef25a8bbeaa
MATLAB
85,523
1,857
function [type] = ft_filetype(filename, desired, varargin) % FT_FILETYPE determines the filetype of many EEG/MEG/MRI data files by % looking at the name, extension and optionally (part of) its contents. % It tries to determine the global type of file (which usually % corresponds to the manufacturer, the recording syst...
6df982883e2b31e78d24f7e79f118d41f3f966cd2d40645680ce5a737671f69f
MATLAB
87,201
2,620
function varargout = eeg_score(varargin) % [data, subject]=eeg_score(cfg,data,subject) % % This script is both a EEG/MEG viewer and can be used to set events % (e.g. "spikes") and do a trial-based rating for vigilance / sleep and % techinal artifacts. It should be faster than ft_databrowser and somewhat % more conventi...
958ac47efa03155fc0ccbcc2b44718855a3e70de3f3286f95f138d11f0060868
MATLAB
87,280
1,539
%% simplified version to upload %% set directories matlab_set_paths close all clear all clc IF_LOAD_PROC_DATA = 0; IF_AVG_BY_ANIMAL = 1; IF_PLOT_SESSIONS = 0; if IF_AVG_BY_ANIMAL IF_VIOLIN = 0; IF_CONNECT_SCATTER = 1; else IF_VIOLIN = 1; IF_CONNECT_SCATTER = 0; end dist_thresh = 5/10*80;...
b3ca34dc738623b98208bdece156bd93e5b2f5c90d4eb6b08b788c106ccb557e
MATLAB
87,796
2,168
classdef spider_plot_class < matlab.graphics.chartcontainer.ChartContainer & ... matlab.graphics.chartcontainer.mixin.Legend %spider_plot_class Create a spider or radar plot with individual axes. % % Syntax: % s = spider_plot_class(P) % s = spider_plot_class(P, Name, Value, ...) ...
c9d4fa21101a1150b2a0388e24091de25f1caa80bdedbbf1d2e6ffbfbaafaed1
MATLAB
93,403
2,186
% EEGPLOTLEGACY - Scroll (horizontally and/or vertically) through multichannel data. % Allows vertical scrolling through channels and manual marking % and unmarking of data stretches or epochs for rejection. % Usage: % >> eegplotlegacy(data, 'key1', value1 ...); % use interface butto...
48ca7c7ed643156440f7aa14cd5e65b58a54f71a98ca77262f933e1125311ee2
MATLAB
93,755
2,291
function GroupAna %GroupAna.m % %Purpose: % % % %Input Parameters: % % % %Output Parameters: % err : 0 No Problem % : 1 Problems % % % %Key Terms: % %More Info : % % % diary('diary'); % save all subsequent command window input and most of the resulting command window output to be appended ...
15e62a7bb6171eac237852629642036637407a919c710997900cc7e5430c64e4
MATLAB
93,904
2,234
classdef Sources2D < handle % This class is a wrapper of Constrained NMF for standard 2D data. It % Both CNMF and CNMF-E model can be used. % Author: Pengcheng Zhou, Columbia University, 2017 % zhoupc1988@gmail.com %% properties properties % spatial A; ...
c3fcf4984de159be7c9f06f696a51e92316e9dc642ff581d2a118aec57855fef
MATLAB
94,057
3,804
function label = ft_senslabel(type, varargin) % FT_SENSLABEL returns a list of predefined sensor labels given the % EEG or MEG system type which can be used to detect the type of data. % % Use as % label = ft_senslabel(type) % % The input sensor array type can be any of the following % 'ant128' % 'biosemi64' % 'bi...
cf5571c3357206758b0d9dbda7340d2251b45d8b90918f0ade1457266d8671be
MATLAB
94,215
2,212
% EEGPLOT - Scroll (horizontally and/or vertically) through multichannel data. % Allows vertical scrolling through channels and manual marking % and unmarking of data stretches or epochs for rejection. % Usage: % >> eegplot(data, 'key1', value1 ...); % use interface buttons, etc. % %...
b72fb3cd979b033308d6860117b4d1d67ad9555a06232f43654d8e1dc3f71fda
MATLAB
95,370
2,149
% NEWTIMEF - Return estimates and plots of mean event-related (log) spectral % perturbation (ERSP) and inter-trial coherence (ITC) events across % event-related trials (epochs) of a single input channel time series. % % * Also can compute and statistically compare transforms for two time % ...
47d6c6dce96928bee367e961984d89bbcf1c8f6ab439eb2761879ce120826669
MATLAB
99,489
2,072
function [data] = read_besa_besa(filename, header, begsample, endsample, chanindx) % READ_BESA_BESA reads data and header information from a BESA file % See formatting document <a href="matlab:web(http://www.besa.de/downloads/file-formats/)">here</a> % % Use as % [header] = read_besa_besa(filename); % where % fi...
a9b06cff8bca8c9f337bdec3fd54b7976968a297512555137ab8c8755bdcba92
MATLAB
100,674
2,820
function ripples = DetectSWR(Channels, varargin) %DetectSWR - Detect Sharp Wave Ripple in epochs of continuous data. % % DetectSWR Detect Sharp Wave Ripple in epochs of continuous data. This % code is designed for linear probes, with at least one shank % that simultaneously records acro...
1548371ff801690878ea57b3648364f2bfa4e3c38a5c3206a9d3628540a3589c
MATLAB
106,808
1,969
for init_project = 1 GH = '/Users/ttsigaras/Documents/GitHub'; % GitHub directory homeDir = [GH '/InfantMicro']; % directory of each participant's native microstructure profile csv MPs_dir = [homeDir '/data/native_MPs']; % directory of vertex-wise Von Economo parcel indices ...
074a469b53d3b0329511e87f61e751c29d9f6ce9d60e36d5f301b6bba7ce833e
MATLAB
112,227
2,689
function [event] = ft_read_event(filename, varargin) % FT_READ_EVENT reads all events from an EEG, MEG or other time series dataset and % returns them in a common data-independent structure. The supported formats are % listed in the accompanying FT_READ_HEADER function. % % Use as % [event] = ft_read_event(filename,...
f519d821c1114d7142034780423ab3714963398f5f3528612534ae200e9b5fba
MATLAB
115,708
2,228
function [imageData, alpha] = export_fig(varargin) %#ok<*STRCL1> %EXPORT_FIG Exports figures in a publication-quality format % % Examples: % imageData = export_fig % [imageData, alpha] = export_fig % export_fig filename % export_fig filename -format1 -format2 % export_fig ... -nocrop % export_fig ...
5ce83aa69f6ed337d28eba54462a13700cc7444195272756553c643bd7ad729a
MATLAB
117,124
606
function natsort_test() % Test function for NATSORT. % % (c) 2012-2024 Stephen Cobeldick % % See also NATSORT TESTFUN_NSX ARBSORT_TEST NATSORTFILES_TEST NATSORTROWS_TEST fnh = @natsort; chk = testfun_nsx(fnh); % try categorical(0); isc=true; catch; isc=false; warning('No categorical class.'), end %#ok<CTCH,W...
9e01677dbae0aa39e23cb0b867f7f2b9111d14f20fb1a88fbb46d3984d5e2d1b
MATLAB
120,502
2,274
% eeglab() - Matlab graphic user interface environment for % electrophysiological data analysis incorporating the ICA/EEG toolbox % (Makeig et al.) developed at CNL / The Salk Institute, 1997-2001. % Released 11/2002- as EEGLAB (Delorme, Makeig, et al.) at the Swartz Center % for Computational Neuroscience,...
a91ff20d18e5a4bd63f4caa35bbff9653c6a71700f0aeb2f8fc64aaa0a9d7d91
MATLAB
120,724
2,017
function [k_sort_on, k_sort_on2, k_sort_off, k_sort_off2,.... on_spec_k_1, on_spec_k_2, off_spec_k_1, off_spec_k_2,... k_ph_corr_on1, k_ph_corr_on2, k_ph_corr_off1, k_ph_corr_off2,... on1_replace_track, off1_replace_track, on2_replace_track, ... off2_replace_track, zero_replace_track, k_space_locs, corr...
959e4d4fb3fe1e0b6c5aff17257b13be82ea822aee6690f57994988b62d5643c
MATLAB
121,041
3,096
function [hdr] = ft_read_header(filename, varargin) % FT_READ_HEADER reads header information from a variety of EEG, MEG and other time % series data files and represents the header information in a common % data-independent structure. The supported formats are listed below. % % Use as % hdr = ft_read_header(filenam...
63c23397f42d69ea60342282aa724b162ef744fa725d8486aa5d6cdf1ceeb94e
MATLAB
124,330
2,079
function [k_sort_on, k_sort_on2, k_sort_off, k_sort_off2,.... on_spec_k_1, on_spec_k_2, off_spec_k_1, off_spec_k_2,... k_ph_corr_on1, k_ph_corr_on2, k_ph_corr_off1, k_ph_corr_off2,... on1_replace_track, off1_replace_track, on2_replace_track, ... off2_replace_track, zero_replace_track, k_space_locs, corr...
ca23d9a8c8b9286908dcb631b61664f63b52cdf8a0d73f6547d966e6711d717f
MATLAB
127,163
423
%% 400 EXAMPLES OF ASSEMBLY CONFIGURATIONS WITH 5 ASSEMBLIES IN A HONEYCOMB STRUCTURED TECTUM % % THE ASSEMBLIES WERE CREATED IN HONEYCOMB STRUCTURED TECTUM OF DEGREE 5 % FROM n = 26 POINTS DRAWN FROM A 2D-NORMAL DISTRIBUTION WITH STANDARD % DEVIATION s UNIFORMLY IN sqrt([1.0 2.5]) % % THE SIZE OF ASSEMBLIES IN TERM OF...
7c1f5bf867e95201842135aa0c361b6716c6a0abf8415a725a1cb227f67d6820
MATLAB
128,593
5,161
% Panel is an alternative to Matlab's "subplot" function. % % INSTALLATION. To install panel, place the file "panel.m" % on your Matlab path. % % DOCUMENTATION. Scan the introductory information in the % folder "docs". Learn to use panel by working through the % demonstration scripts in the folder "demo". Reference ...
bfd80e400a6825ef6f7054211f5f9f8f1ad1f5968ef9ad9e3c24d1a095dd5885
MATLAB
141,342
3,503
function varargout = nii_viewer(fname, varargin) % Basic tool to visualize NIfTI images. % % NII_VIEWER('/data/subj2/fileName.nii.gz') % NII_VIEWER('background.nii', 'overlay.nii') % NII_VIEWER('background.nii', {'overlay1.nii' 'overlay2.nii'}) % % If no input is provided, the viewer will load included MNI_2mm bra...
fd351368c189eb7ced2b95cc4eebb096cc58c6ac7518254d0814767cebe94a43
MATLAB
141,460
2,080
function [k_sort_on, k_sort_on2, k_sort_off, k_sort_off2,.... on_spec_k_1, on_spec_k_2, off_spec_k_1, off_spec_k_2,... k_ph_corr_on1, k_ph_corr_on2, k_ph_corr_off1, k_ph_corr_off2,... on1_replace_track, off1_replace_track, on2_replace_track, ... off2_replace_track, zero_replace_track, k_space_locs, corr...
204c2060da0b5d471315c7a4c5b64f7ce8b00dbd709aae6553b3906921b1e644
MATLAB
142,159
2,940
function [handles,levels,parentIdx,listing] = findjobj(container,varargin) %findjobj Find java objects contained within a specified java container or Matlab GUI handle % % Syntax: % [handles, levels, parentIds, listing] = findjobj(container, 'PropName',PropValue(s), ...) % % Input parameters: % container - option...