sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
5c0d9b8f94b6a9d7f3a1e95615323029e1261c89d5c66bb5c0b809daa8af5148 | MATLAB | 8,658 | 258 | % coreg_p.m
% Georg Oeltzschner, Johns Hopkins University 2019.
%
% USAGE:
% [vol_mask] = coreg_p(in, dcm_folder, maskFile);
%
% DESCRIPTION:
% Creates a SPM volume containing a voxel mask with the same dimensions
% as the SPM volume containing a structural image. The voxel mask will be
% created with the geometry info... |
20b260679f79fee0ae6b7a1db1f74d1140a6a70af775ab366bdd9fc0646356b9 | MATLAB | 8,669 | 207 | function [data, beta, popt] = parse_data_from_mysql(S, varargin)
%concatenate data over days.
data.date = [];
data.trainingstage = [];
data.nic = [];
data.catch = [];
data.prob_catch = [];
data.adapt_block = [];
data.test_block = [];
data.reward = [];
data.reward_delay = [];
data.block = [];
data.hits = [];
data.vios =... |
67325b89c32b215a413251341f83e6b4eed9e6d6222e14293af38fbc67678333 | MATLAB | 8,669 | 245 | function res=classical_leverage(train_row,test_row,method)
%
%Prediction of Applicability Domain based on Classical Leverage Approach
%
%------------- INPUT ---------------------------------------------------
% train_row : Training Set (n1 x descriptors)
% test_row : Test set for validation purpose (n2 x desc... |
37f6a74b5003248fee34e27d8544cd5bb368a3113ea898ab9bbfcd6db99e3849 | MATLAB | 8,675 | 232 | function params = arg_guidialog(func,varargin)
% Create an input dialog that displays input fields for a Function and Parameters.
% Parameters = arg_guidialog(Function, Options...)
%
% The Parameters that are passed to the function can be used to override some of its defaults.
% The function must declare its arguments... |
a1671408587ea2915985f67efd436435b57b88f4ac52a4b133b73228bf5db1be | MATLAB | 8,675 | 347 | function [Model, Info] = linear_sparse_stepwise_reg(X,Y,Model,parm)
% Estimate linear weight matrix for input-output mapping
% regularization version
%
% Notice !!
% Delay embedding is done in this module,
% then input vector should be original input data without embedding
%
% [Model, Info] = lin... |
5ca86066e138772290f05148b70fc728b99fea834cdd96104199e0a4a758347b | MATLAB | 8,676 | 211 | function [IT_Class_Lure_perf_exp_data,HC_Class_Lure_perf_exp_data,IT_Class_Novell_perf_exp_data,HC_Class_Novell_perf_exp_data,IT_Class_Familiar_perf_exp_data,HC_Class_Familiar_perf_exp_data,IT_Class_Novelf_perf_exp_data,HC_Class_Novelf_perf_exp_data,GMFR_familiar,GMFR_novelf,GMFR_lure,GMFR_novell,RSI_Bins_x_axis,IT_Beh... |
a9929873b2d1c3b418c9fb852114f71c326d4492330fc0999fdf58375120f207 | MATLAB | 8,690 | 201 |
% generate
for ith_bin = [10, 20]
if ith_bin==10
angle_list = 0:10:350;
end
if ith_bin==15
angle_list = 0:15:345;
end
if ith_bin==20
angle_list = 0:20:340;
end
sub_pool = [1:28, 30, 32, 33, 34, 35];
% cur_struct = MRIread('/Users/bo/Documents/brainmask/mask_MT... |
7ed88cdc0cb49d7998fe5da3f87209cef9aa928d1888e0de1771c05e088a4d8a | MATLAB | 8,691 | 274 | function plotBrain(regions, values, cm, varargin)
% PLOTBRAIN Create simple line-art SVG brain plots.
%
% PLOTBRAIN(REGIONS, VALUES, CM) creates brain plot with regions having
% colors as specified by the REGIONS and VALUES vectors with a colormap
% defined by the matrix CM. Colormap CM can have any number of rows, but... |
07cbaae6dee10b3dd0f715dbe5eaf0a9c1607ffa89426eba82b8406af2170046 | MATLAB | 8,697 | 181 | function jobm = osp_create_job_file(app)
%% osp_create_job_file
% This function creates an Osprey jobFile based onn the entries made in the GUI.
%
% AUTHOR:
% Dr. Peter Van Schuerbeek (UZ Brussel (VUB), 2020-09-03)
%
% CREDITS:
% The inital code is was created and kindly shared by Dr. Peter Van
% ... |
09113ab0ee73bc2530d7167b5412a817700bff2eecef6dd42c2fe4f8cb98dd2b | MATLAB | 8,699 | 225 | % EEGFILT - (high|low|band)-pass filter data using two-way least-squares
% FIR filtering. Optionally uses the window method instead of
% least-squares. Multiple data channels and epochs supported.
% Requires the MATLAB Signal Processing Toolbox.
% Usage:
% >> [smoothdata] = ee... |
9bd2f14ba91605378e94795e627cadf31022e20d7b0241f6aa30ed89d06e200d | MATLAB | 8,700 | 196 | % Analyse behvioural responses
%
% For all those subjects where they have been recorded, calculate responses
% to the task.
clear;
clc;
warning('off');
% % add spm to the path
% initiate bidspm
% Initialize report
% Start a new report
report = {'subject','run','trial_type','keyPress','response_type'};
reportExtr... |
f2e02bc8c371ed74d3aa3db45d9b21da1a6757026515e9d45b806d3879fe2527 | MATLAB | 8,701 | 205 | function info = step1RunCrossModalSearchlight(opt)
% Step 1 : running searchlight (SL)
% get the smoothing parameter for 4D map
funcFWHM = opt.funcFWHM;
% set output folder/name
savefileMat = fullfile(opt.pathOutput, ...
[opt.taskName, ...
'_SL_CrossMod... |
230cec610499341bdac2b2db9d754d86f69f9851ad59408fc34d9a30b948e60b | MATLAB | 8,705 | 244 | function c = tapas_hgf_whatworld_config
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Contains the configuration for the Hierarchical Gaussian Filter (HGF) for binary inputs restricted
% to 3 levels, no drift, and no inputs at irregular intervals, in the absenc... |
ad2841f5bae88ee2d302cee77ecd98fac9cbccd31dd1298c040b5f90211e04ba | MATLAB | 8,711 | 196 | % Analyse behvioural responses
%
% For all those subjects where they have been recorded, calculate responses
% to the task.
clear;
clc;
warning('off');
% % add spm to the path
% initiate bidspm
% Initialize report
% Start a new report
report = {'subject','run','trial_type','keyPress','response_type'};
reportExtr... |
df83b04e28fb3606e9b6e9f28fc70dcb304475af2cf81e299aae7daf8855c62e | MATLAB | 8,721 | 213 | % fig7_noGUI.m
% (center-surround): use fig4_noGUI
% RF parameters:
% C/S size ratio: 0.8 to 4.7 deg (resulting center frequency: 0.08 cpd)
% surround amplitude: 0.4
% (V1-like):
% RF parameters:
% LW ratio: 4 to 2
% # subregions: 2
% center frequency: 0.08 cpd
clear
close all
% simulated response parameters
deltaF... |
45c75b6c98465a1dda34d01ecae429872c47b5da19a26a42adbe725e61394500 | MATLAB | 8,727 | 363 | function varargout=sigstar(groups,stats,nosort)
% SIGSTAR Add significance stars to bar charts, boxplots, line charts, etc,
%
% H = SIGSTAR(GROUPS,STATS,NSORT)
%
% Purpose
% Add stars and lines highlighting significant differences between pairs of groups.
% The user specifies the groups and associated p-values. The f... |
0f1e2aa3804ec87dcc9c53e244de5af9bd86927d5e12c4c5cc5ab4f8faa070ab | MATLAB | 8,728 | 257 | function MCA = tor_mca(imatx,smeth,n,nms,decompmethod,niter)
% MCA = tor_mca(imatx,smeth,n,nms,decompmethod,niter)
%
% multiple correspondence analysis
% enter an indicator matrix and a scaling method
%
% *** NOW ONLY WORKS COMPLETELY FOR NMDS / CORR ***
% Choices:
% 1) Whether to center... |
bca765f8eaa9b951ecf63be9402dd0b0c3501ed91cca7594c58e07d7e0131076 | MATLAB | 8,728 | 206 | %this script is an example of multivariate pathway identification in Monica's data from SPLaT;
%% add toolboxes to path
addpath('/home/data/eccolab/Code/GitHub/spm12'); % per spm docs, do not genpath it
addpath(genpath('/home/data/eccolab/Code/GitHub/CanlabCore'));
addpath(genpath('/home/data/eccolab/Code/GitHub/Neuroi... |
205ced7484794092c4467a750b34fc23347ebc658f8e4e24fbf43f02972e75ba | MATLAB | 8,731 | 293 | %Run experiment
function [alltrials] = RunExperiment_Coarse(subjectID, trials, nstaircases, stimdur, block, judge, task, display, alltrials)
viewdist = 50;
scrnvbl = 27.2;
signaldirection = 90;
trialdur = 3;
conditions_depth = [0, 0.2, 0.3, 0.4, 0.5, 0.70, 1]; %proportion signal, disparity
conditions_GP =... |
b0f438e45e0b37eb57ea72c328b30f1cf7c4b45c38f0563df8c342a55afc5088 | MATLAB | 8,734 | 219 | function doBehaviourAnalysis(params)
% analyzes reaction times or error rates (right/wrong/missed) trials
% loads selected trials from: pred_prc (see: getTriggers_..._timesLabels.m)
% (c) Jiri, Jun20
if ~isfield(params.triggering, 'behaviour')
return;
end
disp(' - triggering: behavioural analysis ...');
%% react... |
5db198b13908ff94fef124a5786ff82d1a0ac361690dd4afe49b0204d42cb8d1 | MATLAB | 8,739 | 187 | function out = NL_ZeroOneTest(y, numC, maxN)
% NL_ZeroOneTest The 0-1 test for chaos
%
% Implements the "modified 0-1 test for chaos" of Gottwald & Melbourne,
% which classifies a scalar time series as arising from bounded
% (periodic/quasi-periodic/regular) or unbounded (chaotic) underlying
% dynamics, without requ... |
8850d7878892c844a5b3ae95d2a2a4dfa73a1651abfb2506b9d19a78f2feb2dc | MATLAB | 8,745 | 215 | function out = EN_DispEn(y, m, c, tau, mappingHow)
% EN_DispEn Dispersion entropy of a time series.
%
% Maps the time series onto c amplitude classes, symbolizes each embedding
% vector by the sequence of classes it visits (a 'dispersion pattern'), and
% returns the Shannon entropy of the resulting pattern distribu... |
e620dd05f8642181c890895e9424145b076b624b80f50f80efa08a3eda4f4245 | MATLAB | 8,748 | 185 | % bids_template_README() - Create template README file
% from https://github.com/bids-standard/bids-starter-kit/tree/main/templates
% and adopted from FieldTrip implementation
% Usage:
% strout = bids_template_README;
%
% Authors: Dung Truong, SCCN, INC, UCSD, April... |
3828057d0a992382d612a36022b934d6e1bcd437ea3bc61ad003bca9827614bd | MATLAB | 8,755 | 283 | function fear_coactModulationShBase(basename,varargin)
% basename='~/data/Fear/triple/hoegaarden181115/hoegaarden181115';
%%
load([basename '.basicMetaData.mat'])
fprintf('%s start %s with data of %s\n',datestr(now),mfilename,basicMetaData.SessionName)
param.templateSes=2;
param.recalculate=false;
param.nIte=500;
%%
p... |
71b686dfe617e663b78d90f87cc8552f2ea713222990cc29c7f25bf4a4c3395b | MATLAB | 8,755 | 186 | function Osprey
%% Osprey
% This creates the inital Osprey window. Here you pick exsisitng
% jobFiles or MRS container to be loaded into the OspreyGui.
%
% USAGE:
% Osprey;
%
%
% AUTHORS:
% Helge Zoellner (Johns Hopkins University, 2019-11-07)
% hzoelln2@jhmi.edu
%
%
% HISTORY:
% 201... |
ee06bd4020543b0199278f9807d081595fba6deff18c547bf3e1933740c12573 | MATLAB | 8,756 | 211 | function c = tapas_hgf_ar1_config
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Contains the configuration for the Hierarchical Gaussian Filter (HGF) for AR(1)
% processes and continuous inputs.
%
% The HGF is the model introduced in
%
% Mathys C, Daunizeau J,... |
605e9c8786031e3d22913ebf2d03127900c621634a12d34787c9509a11c20caf | MATLAB | 8,760 | 308 | function varargout=sigstar(groups,stats,nosort)
% sigstar - Add significance stars to bar charts, boxplots, line charts, etc,
%
% H = sigstar(groups,stats,nsort)
%
% Purpose
% Add stars and lines highlighting significant differences between pairs of groups.
% The user specifies the groups a... |
7cbc0afd44ca608e336c37c9738340a4a6de8bac140782f2621a9aaf3372b311 | MATLAB | 8,760 | 252 | function out = CO_AutoCorrShape(y, stopWhen)
% CO_AutoCorrShape How the autocorrelation function changes with the time lag.
%
% Outputs include the number of peaks, and autocorrelation in the
% autocorrelation function (ACF) itself.
%
% ---INPUTS:
% y, the input time series
% stopWhen, the criterion for the maximum l... |
55eb2201b231162f0638d75e1edeb33d7d4b6868b2f5fcffaad013f829dd8db7 | MATLAB | 8,764 | 234 | %% TriExpFitModelS0.m
% This function contains a triexponential diffusion model
%
% lossFunction - calculates loss function for optimizer
% forwardJacobian - calculates the forward jacobian for optimizer
% forwardModel - converts parameter struct into model prediction
% x2pars - converts x vec... |
b05f005c514ea8c0d8c2b1821441af7902d19aa59f2754b908452ec1ee3ed9e9 | MATLAB | 8,775 | 269 | function [hdr,record,P]=doSpectralAnalysis(filename,hdr,record,sigs,Tpre,Tpost,nrm)
%Makes cross power spectra for one session of a subject. This is a 31X31X2X256
%matrix for the number of each signal (1-31) and cross-signal (Note that not
%all signals in the data were signals of interest (eg signals 5,6, 15, 23-... |
7cb43defb6b845f8b4813436d724ad71f54969f61a1b3d0dfb90fc5d210131d4 | MATLAB | 8,778 | 254 | %% chi = R2sIOWrapper(input,output,maskFullName,algorParam)
%
% Input
% --------------
% input : input directory contains NIfTI (*localfield*, *magn* and
% *fieldmapsd*) files or structure containing filenames
% output : output directory that stores the output (susceptibility map)... |
2dcb53c6ed698938e763681176c139d9158cf20794a41b2c1d9d23b1383c5ee4 | MATLAB | 8,779 | 251 | function varargout=spm_platform(varargin)
% Platform specific configuration parameters for SPM
%
% FORMAT ans = spm_platform(arg)
% arg - optional string argument, can be
% - 'bigend' - return whether this architecture is bigendian
% - 0 - is little endian
% - 1 - ... |
0945726836a26a54fd9a83a1d79c0e1c058a92f9ad77b200cb3628431bbb6f0f | MATLAB | 8,783 | 240 | function fig = ARTwarp_Get_Parameters
% This function generates a graphical user interface to enter the
% parameters of an ARTwarp categorisation
global warpFactorLevel vigilance bias learningRate maxNumCategories maxNumIterations sampleInterval resample
if resample == 0
state = 'off';
else
state = 'on'; %if ... |
ff2a5e3ab6dd99440a215b24cdbe563e0e057581f827e7f203004e02ed264b68 | MATLAB | 8,783 | 240 | %% DEMO: One-click orientation maps, filters, weights, and a short simulation
% Purpose
% Let anyone (students to experts) run a quick end-to-end demo:
% 1) Generate V1 & V4/MT orientation maps
% 2) Build demo Gabor filters for V1
% 3) Create demo feedforward & recurrent weights
% 4) Preview V1 rates (toy)
% ... |
95f169916e399fd6035e0b8266eae88e070da88e34ae2c3da07dac09063fc5de | MATLAB | 8,784 | 251 | clear all;
close all;
clc;
warning('off')
scriptName = mfilename;
%% Ensure workers can see current code path (parfor safety)
p = gcp('nocreate');
if isempty(p); p = parpool; end
% Replicate current path on workers
pctRunOnAll addpath(genpath(pwd));
%% Selective Data Formatting
pathIn = ['..',filesep,'data',filesep,'... |
8bf331388637abce0d6542bbcab6dbfb685c1e4458f355dc8a9015491358ecdd | MATLAB | 8,788 | 253 | function M = rotationsfactory(n, k)
% Returns a manifold structure to optimize over rotation matrices.
%
% function M = rotationsfactory(n)
% function M = rotationsfactory(n, k)
%
% Special orthogonal group (the manifold of rotations): deals with matrices
% R of size n x n x k (or n x n if k = 1, which is the default)... |
7e76578d52dd4b0f799ffbc0bcd31c9e94aa88ce06441b582e208a166521501b | MATLAB | 8,794 | 250 | %%% THIS IS USED TO PLOT AVERAGED BEHAVIOR TYPE RELATED ACTIVITY FROM
%%% SELECTED NEURONS (both initiation and termination)
%% ========================== CONFIG ============================
dataDir = 'H:\Kaizhen\Anxiety_behavior_phenotyping_analysis\Ethological_Behavior\Correlation of neuronal activity with be... |
f3c9cddad083e2ee518e671c30c6f0416a942dc40b1d5b356d289fec7777d054 | MATLAB | 8,798 | 248 | function out = osp_plotOverviewSpec(MRSCont, which_spec, g, shift, xlab, ylab, figTitle, basis)
%% out = osp_plotOverviewSpec(MRSCont, which_spec, g, shift, xlab, ylab, figTitle, basis)
% Creates a figure with all spectra or fits.
%
% USAGE:
% out = osp_plotOverviewSpec, which,GUI, g, shift, xlab, ylab, figTi... |
48e2b56896c417aa7de0cde9fa56e5694ef42a1c7567414b35362b9263027610 | MATLAB | 8,800 | 217 |
function [net, clustAssign] = ARTwarp2(LineData,settings)
% Based on ARTwarp:
% Deecke, V. B. & Janik, V. M. 2006. Automated categorization of bioacoustic signals: Avoiding perceptual pitfalls. Journal of the Acoustical Society of America, 119, 645-653.
% Deecke and Janik (2006) modified fuzzy ART by Aaron Garrett:
% ... |
c01a149a61f1c4293d2e8b7e3196ca0533a1ac7a586e6746ea25766c87755ea6 | MATLAB | 8,803 | 181 | %% ms SEI: PLV (phase locking value) job - connectivity between 2 selected AAs
% (c) Jiri, Dec23
%% settings: v1 - relaxed conditions (p-level, length of significance, ...)
dirSuffix = '_msFig_AA_v1_relaxCond';
t_sel = [-1.0, 2.0]; % the true sel time will be cut by 1 s on edges (= template length): [-2, 2] -> [-1... |
b0947c45670587db6ff83f6bce6a7e9c32cd1b336262cfef39ea4b6274e08a27 | MATLAB | 8,805 | 257 | function plotFigureS6_otherAreas(ephysPath, v2Path, motorPath, piriformPath, codePath)
% Plot figure S6. YOU MUST RUN processEphysData_experts FOR V2, MOTOR, AND
% PIRIFORM BEFORE RUNNING THIS FUNCITON. Save output of each run to a
% separate folder.
% Plot decoder performance for OFC, V2, Piriform cortex,
% and Motor... |
d1fbe30cf600eec6195c7ae1e13f78eb7e11906447e4ab616b31b23dc38c3102 | MATLAB | 8,808 | 181 | function [psth_data, metrics] = calculate_psth_metrics(all_spike_times_s, stim_times_s, window_s, bin_width_s, varargin)
% CALCULATE_PSTH_METRICS Extracts spikes in a given window relative to
% stimulus times, computes a histogram, generates a smoothed PSTH using
% ssvkernel or Gaussian smoothing, and calculates key me... |
e58e9ee3793bc48f296eb080d8d15dababe7abad38100a30ee3d46e3c6f558b7 | MATLAB | 8,808 | 327 |
%io_loadspec_GE.m
%Jamie Near, McGill University 2014.
%
% USAGE:
% [out,out_w]=io_loadspec_GE(filename,subspecs);
%
% DESCRIPTION:
% Reads in GE P-files (.7 file) using code adapted from GERead.m, provided
% as part of the Gannet software package by Richard Edden (gabamrs.com).
%
% op_loadspec_GE outputs the data i... |
3f74852e677b9e61c1318f27e7e7e74665b8db79e0883b2fad7d2227b05d8e61 | MATLAB | 8,809 | 280 | %%
set(0, 'defaultaxesfontname', 'Arial'),set(0, 'defaulttextfontname', 'Arial')
rng(3)
clear all, close all
load fig4data
%% plotting setup and data preparation
YMIN = -1.5*10^-3;
YMAX = 3*10^-3;
F = figure('Position',[409 323 831 655]);
subplot(2,4,1:2),subplot(2,4,3:4),subplot(2,4,5:6),SP1 = subplot(2,4,7);S... |
b3be704663841401c8b2a339eafa61525648a4898069ac0020446e255398936b | MATLAB | 8,814 | 190 | function initialize_define_variables
%% VARIABLES
global DataRange KeyRange SelectionRangeR NCintRangeW NCintAvgW PCintRangeW PCintAvgW NCfinRangeW
global NCfinAvgW PCfinRangeW PCfinAvgW NCfoldScoreW PCfoldScoreW NClogScoreW PClogScoreW
global SelectionRangeW UdoseRangeR UdoseRangeW UfinAvgW UfinRangeR UfinRange... |
b5831a398ec0a24110ad98e5098571941256799a8fe9e04fc91741d7d5bdd98e | MATLAB | 8,829 | 236 | function [results] = task_complexity(config)
% Measure task complexity for each environment
% OUTPUTS
% results (struct) with two fields:
% - measures: table with reservoir outcomes (S, E), env and complexity
% - stats: table with all relevant stats from the GLMMs
% Fix random seed
rng(config.seed)
maxNumCompTh... |
a6cbd8bbd0330f7f2d65c4dcc04fe4bf98dd5903c33174fc4c5422361f4d4865 | MATLAB | 8,832 | 198 | function c = tapas_hgf_binary_mab_config
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Contains the configuration for the Hierarchical Gaussian Filter (HGF) in a multi-armded bandit
% situation for binary inputs in the absence of perceptual uncertainty.
%
% The... |
d067e28993cd6000bafd0ed0514ebedb96754bf3cf19c789e710ca5039b4371b | MATLAB | 8,842 | 239 | function demo_blind_unmixing_nnmf()
% DEMO_BLIND_UNMIXING_NNMF
%
% Public-release demo for NNMF-based blind spectral unmixing on multispectral
% photoacoustic (PA) volumes.
%
% This demo:
% 1) Loads Hb spectra and laser energy calibration from .xlsx files
% 2) Loads multispectral 3D PA volumes from .mat fil... |
ac2f19a64e9ef67f18eaa3f9b2d63c09f44a496d0716538c6098117f5771fef7 | MATLAB | 8,845 | 246 | function batch = StartBatch(mfile,bfile,varargin)
%StartBatch - Start a new batch job.
%
% Batch processing is useful if you need to repeatedly perform a given analysis
% on different data sets. Using batch processing is easier and more reliable
% than writing a simple 'for' loop:
%
% * You must only supply the code ... |
0673694c7f7bd7a2666faa92f6a7a702e5321060876b04b25310d7ce881cc60e | MATLAB | 8,856 | 222 | function fear_testSignificance_reacCCG(basename,varargin)
load([basename '.basicMetaData.mat'])
fprintf('%s start %s with data of %s\n',datestr(now),mfilename,basicMetaData.SessionName)
param.maxDelta=100;
param.redo=false;
param=parseParameters(param,varargin);
varList={};
if exist([basicMetaData.AnalysesName '-in... |
dc89613661f9eba3c0d1c0c79b7f24fc24f9057d3d4eb3d318b582ec37357871 | MATLAB | 8,858 | 268 | function PlotPhasePrecession(data,stats,varargin)
%PlotPhasePrecession - Plot phase precession plots and maps.
%
% USAGE
%
% PlotPhasePrecession(data,stats,<options>)
%
% data phase precession data obtained using <a href="matlab:help PhasePrecession">PhasePrecession</a>
% stats optional ph... |
4bfc3f79c031b38b7e867b2faa13baa13ef26dc44c6cb60a69a4eadb64e98492 | MATLAB | 8,865 | 285 | function sR=icassoEst(mode,X,M,varargin)
%function sR=icassoEst(mode,X,M,['FastICAparamName1',value1,'FastICAparamName2',value2,...])
%
%PURPOSE
%
%To compute randomized ICA estimates M times from data X. Output of
%this function (sR) is called 'Icasso result structure' (see
%icassoStruct). sR keeps the on all the meth... |
c7d2fe5cf20b91d580b9970c4184e7258d284392bfdf392a4659cad2aceb9054 | MATLAB | 8,866 | 212 | function [outMRSCont] = osp_fitMultiVoxel(MRSCont)
metFitTime = tic;
outMRSCont= MRSCont;
fitMRSCont = MRSCont;
if MRSCont.flags.isGUI
progressText = MRSCont.flags.inProgress;
else
progressText = '';
end
%% Get infos to set up a loop to process all voxels
if MRSCont.flags.isPRIAM == 1
XVox = MRSCont.raw{1}.... |
cb62a8a39c084757e05b1128066ba561d7e179fc56d0c86039deab2dbf73d1ba | MATLAB | 8,872 | 299 | function ft_spmT2x(spm_mat_in, path_output, name_output, name_sess)
% SPM contrast transformation.
%
% ft_spmT2x(spm_mat_in, path_output, name_output, name_sess)
%
% Inputs:
% spm_mat_in - filename of SPM.mat file.
% path_output - path where output is written.
% name_output - basename of output contrasts.
% na... |
18bba5c3a6f54b2975fab265555474d1ecae655d9d8b2a7fd8b96e4fe7207bb5 | MATLAB | 8,874 | 250 | function [movie,totalframes,summary]=loadDCIMG(filepath,varargin)
% Loading DCIMG file as a movie
% SYNTAX
% movie=loadDCIMG(filepath)
% movie=loadDCIMG(filepath,maxframe,...) - loading from 1 to maxframe
% movie=loadDCIMG(filepath,[frameFirst, frameLast]) - loading selected
% range of frames
% movie=loadDCIMG(filepat... |
2768a7b47f58dc0fbdbe2a561d927e1bdfbc3443119a907659e059c0e1befb98 | MATLAB | 8,874 | 201 | function [coords, outMat, imScale] = mrAnatXformCoords(xform, coords, transposedOutput)
%Transforms a list of coords given the transform structure 'xform'.
%
% [xformedCoords, outMat, imScale] = mrAnatXformCoords(xform, coords, [transposedOutput=true])
%
% Coords should be an 3xN array, although a Nx3 will work, as lon... |
db1c5ff0322c8ce1c9400ad1aae3fcef4348ea7e896552c957323ecb119675cc | MATLAB | 8,874 | 239 | function aggregate_and_plot(outdir, param1Name, param2Name, metricNames, Nlist, saveFigs)
% AGGREGATE_AND_PLOT Read aggregated CSV or metrics files, compute mean+95%CI
% and plot metrics vs param1 with one curve per param2 value and subplot per N.
% Usage:
% aggregate_and_plot('batch_out','sparsityval','snr_dbval', {... |
888e44905c7de8e90529285024bab55dc388cb025b552545c48c8ec22bad6be5 | MATLAB | 8,875 | 298 | % SPMT contrast transformation
%
% This script transforms t-maps to p, -log(p), r (correlation coefficient),
% d-maps (effect size) or z-maps.
%
% The following formulas are used:
% (1) r = sign(t) / sqrt( df / t*t + 1 )
% (2) d = 2*r / sqrt( 1 - sqrt(r) )
% (3) p = 1 - spm_Tcdf
% (4) -log10(1-p) = -log( 1 - spm_Tcdf ... |
f4abce11b94127a648f2106806ca014a189add1f6456820a98aa363d8968edb1 | MATLAB | 8,887 | 207 | % POP_STUDYERP - create a simple design for ERP analysis
%
% Usage:
% >> [STUDY ALLEEG] = pop_studyerp; % pop up interface
%
% Outputs:
% STUDY - an EEGLAB STUDY set of loaded EEG structures
% ALLEEG - ALLEEG vector of one or more loaded EEG dataset structures
%
% Author: Arnaud Delorme, SCCN, UC... |
b07ed5fe8d398592394c9dda344bf540f65719a8f671b7ac7e6bb32e5ea3314b | MATLAB | 8,894 | 273 | %io_writesdatspar.m
%Georg Oeltzschner, Johns Hopkins University 2019.
%
% USAGE:
% RF=io_writesdatspar(in,outfile);
%
% DESCRIPTION:
% Takes MRS jeader data in matlab structure format and writes it to a pair
% of Philips SDAT/SPAR files that can be read by LCModel, jMRUI etc.
%
% INPUTS:
% in = input data i... |
d33087df7e76f1f39a4b65fa3ad4c9b0cc0e843ccda98cb67a9b3fea77bd8979 | MATLAB | 8,899 | 327 | function f01_runFMRIPrep(subjectLabel, projectRoot)
% f01_runFMRIPrep
%
% Run fMRIPrep 23.2.1 for one BIDS participant using Docker.
%
% Associated article:
% Mano, Y. et al. (2026).
% Neural mechanisms underlying decisions to express or suppress emotions.
% Social Cognitive and Affective Neuroscience.
% https://doi.or... |
7bb84682cca9e04742b469dda13e0ca63869abc683618e731958ca61a04b947f | MATLAB | 8,913 | 184 | % POP_LIMO - prepare and convert EEGLAB data and structure to be
% processed by LIMO.
%
% Usage:
% >> STUDY = pop_limo( STUDY, ALLEEG, 'key', val)
% >> STUDY = pop_limo( STUDY, ALLEEG, 'dat', 'key', val)
% >> STUDY = pop_limo( STUDY, ALLEEG, 'ica', 'key', val)
%
% Inputs:
% STUDY - an EEGLAB... |
f49f7e26d2847635a34e43175283248d78dd1aa47fba7fc656b887c61087a1dc | MATLAB | 8,916 | 201 | %% This file is used to calculate experimental and simulated Pearson’s correlation coefficients for surface-localized endocytic pits
clear all;
close all;
clc;
% Define folder paths
folder_path = 'Y:\20250927 DIV14 OE_EndoA2_583 b2_647\Analysis\diat_regions\2 Type Puncta';
saving_path = fullfile(folder_path, 'PCC');
... |
a959d8b55067288cce7c1d30e396088b595f9929d44b14c9f9684311afb2bb54 | MATLAB | 8,924 | 311 | function varargout=sigstar(groups,stats,nosort)
% sigstar - Add significance stars to bar charts, boxplots, line charts, etc,
%
% H = sigstar(groups,stats,nsort)
%
% Purpose
% Add stars and lines highlighting significant differences between pairs of groups.
% The user specifies the groups a... |
ffc3547758fab9cc1a51ae33c912902140d1a5940bae2319ed34c9470628af05 | MATLAB | 8,927 | 196 | % EEG_REJMACRO - Internal EEGLAB macro for all pop_ functions that
% perform data rejection.
%
% Author: Arnaud Delorme, CNL / Salk Institute, 2001
%
% See also: EEGLAB
% Copyright (C) 2001 Arnaud Delorme, Salk Institute, arno@salk.edu
%
% This file is part of EEGLAB, see http://www.eeglab.org
% fo... |
8b8bca14b7f97385a822fee4bf3cd123160b477721a8f56483e453f128b72cd5 | MATLAB | 8,929 | 176 | % osp_fit_Quality.m
% This function calculates the relative amplitude of the residual
% compared to the standard deviation of the noise. This is one of the
% seven quality control parameters defined in the MRS consensus paper by
% Wilson et al. ( https://doi.org/10.1002/mrm.27742). The original
% desciption c... |
d62565dda0b3a504932fe79691783865fe5a032abe819b218fbec8ce892434ed | MATLAB | 8,931 | 214 | function shuffle_icaReacCCG_dropSWR(basename)
[rootPath,sesName,~]=fileparts(basename);
fprintf('%s load files for %s\n',datestr(now),sesName);
load(fullfile(rootPath,'data', [sesName '-icaReac.mat']))
load(fullfile(rootPath,'data', [sesName '.sleepstate.states.mat']))
load(fullfile(rootPath,'data', [sesName '.session... |
a23b8d192b307057be64267bbeee95270a33553602b14c957bf1c74dca5debcd | MATLAB | 8,935 | 282 | function [beta,R2,p] = CircularRegression(x,angles,p,varargin)
%CircularRegression - Linear-circular regression.
%
% There are three possible methods to estimate the regression parameters:
%
% 1) Use the method of Kempter et al. (2012). The slope maximizes the resultant length
% of the residual distribution, the... |
6bbebf0f9c4060f4a89cfa543cca93e0326fcea1c53cc8c88a645a68489e5291 | MATLAB | 8,942 | 234 | % COMPSORT - reorder ICA components, first largest to smallest by the size
% of their maximum variance in the single-component projections,
% then (if specified) the nlargest component projections are
% reordered by the (within-epoch) time point at which they reach
% ... |
9de10fc5b5b141541d5ed32ca81f2608b38e555a540315d932294db13fe29875 | MATLAB | 8,942 | 257 | %%%%%%%%%%%%%%% postprocess the bad stuff into outlines
todo = {'subj01' 'subj02' 'subj03' 'subj04' 'subj05' 'subj06' 'subj07' 'subj08' 'groupavg'};
things = {'signaldropout' 'surfaceimperfections'};
threshs = [4/8-1/16 1/8-1/16];
cmaps = {winter(256) winter(256)};
colors = {hsv2rgb([30/360 100/100 90/100]) hsv2rgb([1... |
31e6810b950c6946bc40993a041b3b3145fc1554b846ca44688e8f4b59ba4699 | MATLAB | 8,944 | 212 | function PSM_fluiditySLM(varargin)
%% PSM_fluiditySLM.m
%% Written to accomodate files with multiple creep sections
%%
%% Syntax: PSM_fluiditySLM [chosen_creep] [bead_radius_um]
%% steps:
%% open files
%% transfer segments into tables/matrices
%% ask user which segments should be analyised (if more than one pause segm... |
b20aa4fadaadac28c1c6fae43a3e8458248a8b381d4693372e8362d4ecb26212 | MATLAB | 8,946 | 206 | % Support function for pop_studydesign
% Copyright (C) 2012- Arnaud Delorme
%
% This file is part of EEGLAB, see http://www.eeglab.org
% for the documentation and details.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are met... |
30207a9b25056d8d0050a1ecc646e9754471d4c2310cb060f067227e5192dc18 | MATLAB | 8,949 | 179 | function [MRSCont] = OspreyMinReport(MRSCont)
%% [MRSCont] = OspreyMinReport(MRSCont)
% This function generates a markdown report with the minimal reporting standards defined in
% MRSinMRS (doi.org/10.1002/nbm.4448) by Lin et al. (2021).
%
% USAGE:
% MRSCont = OspreyMinReport(MRSCont);
%
% INPUTS:
% ... |
e699e9f56a67ac7997e32949765dd07e67d7a9afe598ba55d6af49e0802aeec3 | MATLAB | 8,954 | 220 | function PlotFigure5(datadir, codedir)
%PlotFigure5 - Plots Figure 5.
% INPUTS:
% datadir - Local directory where ProcessData_Figure5.mat was saved after running ProcessData_Figure5
% codedir - Local directory where code (e.g., published/EstrousRPE/) was saved
%% Set up paths
s = pathsep;
pathStr = [s, path, s];
... |
562704a19038cb484f4bd7274717e418caa91d819a130bbf1896c91cea4a4307 | MATLAB | 8,955 | 239 | function params = arg_guidialog(func,varargin)
% Create an input dialog that displays input fields for a Function and Parameters.
% Parameters = arg_guidialog(Function, Options...)
%
% The Parameters that are passed to the function can be used to override some of its defaults.
% The function must declare its arguments... |
48f6ba9b797f0c69bedcfd08e84972fca47aaa28bb5d631cc21df33816f474f1 | MATLAB | 8,960 | 97 | function plot_RNN_choice_switch_robustness_analysis
close all
clear all
clc
% Plot perturbation-induced choice switching in RNNs using different choice mode durations (0.5 or 1.5 s).
% Select a folder containing data.
folder_name = uigetdir;
cd(folder_name)
% Choice mode duration from 5 s to 5.5 s.
load('RNN_choice_... |
141ceff094ba71a0ca277e8aadc8d501166acd64de7a6e4a0a489195b0d8097d | MATLAB | 8,963 | 258 | %% sepiaIO(input,output,maskFullName,algorParam)
%
% Input
% --------------
% input : input directory contains NIfTI files or structure containing filenames
% output : output directory that stores the output
% maskFullName : mask filename
% algorParam : structure contains method and method ... |
beea0d9d4a9a0c155813f58475ef34a80d80ca4bd7c44417519391a9448cb745 | MATLAB | 8,965 | 190 | % POP_WRITELOCS - load a EGI EEG file (pop out window if no arguments).
%
% Usage:
% >> EEG = pop_writelocs(chanstruct); % a window pops up
% >> EEG = pop_writelocs(chanstruct, filename, 'key', val, ...);
%
% Inputs:
% chanstruct - channel structure. See READLOCS
% filename - Electrode loc... |
a160a7a7fd60118cb9c75fbd84536551d5b8c5306c6cbd9de51e4513e1dcb1a9 | MATLAB | 8,971 | 193 | function [mri, hdr] = read_ctf_mri(filename)
% READ_CTF_MRI reads header and image data from a CTF version 2.2 MRI file
%
% Use as
% [mri, hdr] = read_ctf_mri(filename)
%
% See also READ_CTF_MRI4
% Copyright (C) 2003-2010 Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% f... |
2e9d82d00425f5ab715c0b1d855ca71274fe24827e215bd0df90f34856cb8397 | MATLAB | 8,972 | 239 |
settings.target_fs = 600; %sampling frequency
settings.lcmv_reg = 0.05;
settings.fres = settings.target_fs;
settings.smoothcortex = 0.3; %less smoothing
% epoch length
settings.winlength = 2*settings.target_fs;
% model order for the spectral/connectivity analysis
settings.morder = 20;
load cm17
% settings.cma = cm17a;... |
2895b756f4ec2f44dd20a12c2ac4fb9826bfe3286124d2b745f19def24d5af73 | MATLAB | 9,001 | 228 | %% Contrastive Variational Autoencoder for Synthetic Smaples Fluorescence
%% Detection - Main
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Script Name : synthFluorescenceDetection_clVAE_main.m
%
% Description : A training sequence for a contarstive learning Variational
% ... |
c79538a24f031904d297107f20f1f71ec7aa53ebd7a182badd99562753ad0909 | MATLAB | 9,003 | 264 | function [ subject ] = nmri_align_mri(subject, params)
%[ subject ] = nmri_align_mri(subject, params)
%
% This function will do (interactive) MRI alignement to CTF
% and also define the SUMA dir
%
%
% subject = subject structure, see nmri_read_subject
% could be a struct or .m file or .mat file
% ... |
33fabaa4beba56b921f562a74c529f224ceab01951c8f1d0ebdcdbcf6b674e22 | MATLAB | 9,005 | 230 | function out = SY_nstat_z(y, numSeg, embedParams)
% SY_nstat_z Cross-forecast errors of zeroth-order time-series models
%
% Uses the nstat_z routine from the TISEAN package for nonlinear time-series
% analysis to calculate cross-forecast errors of zeroth-order models for the
% time-delay embedded time series.
%
% T... |
94d8b8a7c72530ce331ba70a1a0d23a7fa5e9cb3ba6830264ae8714cd5d583c9 | MATLAB | 9,011 | 217 | % STD_PROPPLOT - Command line function to plot component cluster
% properties for a STUDY set.
% Displays mean cluster scalp map, ERP, ERSP;
% dipole model, spectrum, and ITC in one figure
% per cluster. Only measures computed during
% ... |
beb023eed818a7d40b2bf837e4d4f63974e661c97d582dc0689330ecd624f348 | MATLAB | 9,017 | 235 | function [Wrr,Wrf,outdegreeEE,outdegreeIE,outdegreeEI,outdegreeII,outdegreeEX,outdegreeIX,seqindX,seqindE,seqindI] = ...
generate_weights_match_indegree(Ne,Ni,Nx,sigmaRX,sigmaRR,Prr,Prx,P_ts,TS_th,varargin)
% GENERATE_WEIGHTS_MATCH_INDEGREE Connectivity with matched indegree per postsynaptic unit.
%
% Syntax
% [... |
580abe6b1ade13649b1acc7da8f07c8cd59da228472de887561d645fd119fd5d | MATLAB | 9,021 | 333 | %SIFREADNK Read SIF multi-channel image file.
%
% This version works with Andor Solis version 4.16.30003.0 and version
% 4.23.
%
% This function reads a sif file taken with Andor Solis software on our
% Shamrock spectrograph and Andor Newton CCD camera. With each new
% iteration of andor's solis software, they make a n... |
aad5e733613941b7d5d697d4e5feb9429a8fb0368002fa592ddd8e94414b71e6 | MATLAB | 9,021 | 263 | function varargout = filetype_check_uri(filename, ftyp)
% FILETYPE_CHECK_URI
%
% Use as
% status = filetype_check_uri(filename, type)
%
% Supported URIs are
% buffer://<host>:<port>
% fifo://<filename>
% global://<varname>
% mysql://<user>:<password>@<host>:<port>
% rfb://<password>@<host>:<port>
% seri... |
869f912de928aa6fea0b16798a7c3937cb9386c1e0ed815c3c35ee49470107e4 | MATLAB | 9,028 | 234 | %% TMS caused target-network connectivity pattern shifting
% load the symptom txt
load('/home/NCPL04/Desktop/OCD_data/rTMS_analysis/FMRIAnalysis/Results/YBChangesReal.txt')
load('/home/NCPL04/Desktop/OCD_data/rTMS_analysis/FMRIAnalysis/Results/YBChangesSham.txt')
load('/home/NCPL04/Desktop/OCD_data/rTMS_analysis/FMRIA... |
953c059c0ce442c0b618822b03b685b65f3fff44fe70f1335beb92d644dc65dc | MATLAB | 9,034 | 196 | %{
# beads extracted from bead scan$
-> quality.BeadStack
bead_idx : smallint # bead number in the stack
---
dx : float # (um) pixel pitch
dy : float # (um) pixel pitch
dz ... |
5501245b5d5861966f5e33f5f163fa4123fe8ef9ca88b492f088585b181d92ce | MATLAB | 9,035 | 225 | function [hx,px,lx,c] = TOL_plotter(ax,dat,idx,params)
% TOL_plotter, plots data figures for Duvelle and Grieves (2026)
% Main code to plot figures for: Duvelle and Grieves (2026) Tolman's Sunburst Maze 80
% years on: A meta-analysis reveals poor replicability and little evidence for
% shortcutting. European Journal ... |
97cc049c2024700b2f4ce62e4fc9189f487040155b731434097803351a274e54 | MATLAB | 9,039 | 292 | function [h,Coord,Color,height] = som_dendrogram(Z,varargin)
%SOM_DENDROGRAM Visualize a dendrogram.
%
% [h,Coord,Color,height] = som_dendrogram(Z, [[argID,] value, ...])
%
% Z = som_linkage(sM);
% som_dendrogram(Z);
% som_dendrogram(Z,sM);
% som_dendrogram(Z,'coord',co);
%
% Input and output arguments ([]'s ... |
238ab0d1e736e680088ea70467abf85c3f20e3b1fa759310ff5efe60592c4872 | MATLAB | 9,042 | 221 | % eeg_compare - compare EEG structures. Differences are shown on the command
% line and stored in EEG.etc.compare
% Usage:
% [EEG, res] = eeg_compare(EEG1, EEG2);
%
% Input:
% EEG1 - first EEGLAB structure
% EEG2 - second EEGLAB structure
%
% Output:
% EEG - modified EEG1 structure with comparison r... |
5e01f7546af1e1833dc07a26fa4dc3b7101fa0424b83a2b8d2f638d34f575d1b | MATLAB | 9,043 | 262 | function [a,b,c] = Accumulate(variables,values,varargin)
%Accumulate - Accumulate repeated observations.
%
% Accumulate repeated observations Y(i) = f(X1(i),X2(i),...,Xn(i)), where
% the Xj(i) are binned variables (i.e. they run from 1 to Nj). This
% is useful for instance to compute:
%
% * a PSTH, where Y(i) = 1... |
08473ead570d8f2deeadec6f42ec47ad20f03f88855736c4495eb28b4a523795 | MATLAB | 9,045 | 66 | function map = magma(N)
% Perceptually uniform sequential colormap from MatPlotLib.
%
% Copyright (c) 2017-2020 Stephen Cobeldick
%
%%% Syntax:
% map = magma
% map = magma(N)
%
% Colormap designed by Nathaniel J. Smith and Stefan van der Walt.
%
% For MatPlotLib 2.0 improved colormaps were created in the perceptually... |
f70bf0a92813f48ea76ca9ae7f2fae43dd8da16e624ccbafdfcf79c0af800144 | MATLAB | 9,046 | 263 | % EEG_ADDNEWEVENTS Add new events to EEG structure. Both EEG.event and
% EEG.urevent are updated.
%
% Usage:
% >> EEG = eeg_addnewevents(EEG, latencies, types, fieldNames, fieldValues);
%
% Inputs:
% EEG - input dataset
% latencies - cell containing numerical arrays for latencies of new
% ... |
5f827a9f5d9c7c2049d2c720807eca178e0d19455d0395059bf2e2f0b5a91eac | MATLAB | 9,049 | 134 | function res = arg(varargin)
% A (rich) specification of a function argument, for use in arg_define() clauses.
% Spec = arg(Names,Default,Range,Help,Options...)
%
% In:
% Names : The name(s) of the argument. At least one must be specified, and if multiple are
% specified, they must be passed in a cell array... |
a52e903429caf716d018c704e68ef546bbc28bfd92c8fbec8e96cc7d326c5322 | MATLAB | 9,052 | 66 | function map = plasma(N)
% Perceptually uniform sequential colormap from MatPlotLib.
%
% Copyright (c) 2017-2020 Stephen Cobeldick
%
%%% Syntax:
% map = plasma
% map = plasma(N)
%
% Colormap designed by Nathaniel J. Smith and Stefan van der Walt.
%
% For MatPlotLib 2.0 improved colormaps were created in the perceptua... |
ef9d40219035f377f6b367e55916c41fc80a4965686b62ce849e1a265d039a15 | MATLAB | 9,055 | 256 | function factor = ft_scalingfactor(old, new)
% FT_SCALINGFACTOR determines the scaling factor from old to new units, i.e. it
% returns a number with which the data in the old units needs to be multiplied
% to get it expressed in the new units.
%
% Use as
% factor = ft_scalingfactor(old, new)
% where old and new are... |
d6acc6d63163425092c71546ceb0e47d4f33448733ca5a8d08f1cb8410770502 | MATLAB | 9,059 | 66 | function map = inferno(N)
% Perceptually uniform sequential colormap from MatPlotLib.
%
% Copyright (c) 2017-2020 Stephen Cobeldick
%
%%% Syntax:
% map = inferno
% map = inferno(N)
%
% Colormap designed by Nathaniel J. Smith and Stefan van der Walt.
%
% For MatPlotLib 2.0 improved colormaps were created in the percep... |
2c53778cf2a698967f61871cdf261b50a116918f653031e94422a463b104b79f | MATLAB | 9,064 | 293 | function M = essentialfactory(k, strSigned)
% Manifold structure to optimize over the space of essential matrices.
%
% function M = essentialfactory(k)
% function M = essentialfactory(k, 'signed')
% function M = essentialfactory(k, 'unsigned')
%
%
% Quotient representation of the essential manifold: deals with the
% re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.