sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
16ad1eabb3bee713d00cfc0479c3ad5a12806b2d1acb39e8138435c694b1c314 | MATLAB | 27,988 | 804 | function ea_addobj(resultfig, obj, options)
if iscell(obj) % dragndrop for tract and roi, 'obj' is a cell of the files
if all(cellfun(@numel, regexp(obj, '\.mat$', 'match', 'once'))) % tract/reco
for i=1:length(obj)
vars = whos('-file', obj{i});
if any(ismember({'fibsin', 'fibers'},... |
e2e143db9008b6f7afc8f9f7f9d3f288504d85c31c16826c1d1f4b18d35f1820 | MATLAB | 28,141 | 660 | function varargout = ea_lg_stats(varargin)
% EA_LG_STATS MATLAB code for ea_lg_stats.fig
% EA_LG_STATS, by itself, creates a new EA_LG_STATS or raises the existing
% singleton*.
%
% H = EA_LG_STATS returns the handle to a new EA_LG_STATS or the handle to
% the existing singleton*.
%
% EA_LG_STA... |
f21ca88b911770419034b88f037db9c5eecf33e1bcf81786a9f579097a9d6232 | MATLAB | 28,190 | 813 | function json=savejson(rootname,obj,varargin)
%
% json=savejson(obj)
% or
% json=savejson(rootname,obj,filename)
% 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
%
... |
4211af1873369a862e577cf05364ff758753c6d92f2cf4eb41ca197dc2242002 | MATLAB | 28,213 | 606 | %Copy of coherency_test_all_regions_multi_drift_fixed
%NOTE: NOT SURE IF RUN SPEED IS BEING HANDLED CORRECTLY
%**Edited to concatenate data across windows instead of calculating each
%window and taking weighted average. Downside to this is the number of
%channels of data used for a given animal + layer is the ... |
e8036bfdea1fd7df2b9827ac072b2491c0484909398dbfb7d74992a473e211ad | MATLAB | 28,216 | 603 | function outstruct = cifti_parse_xml(bytes, filename)
outstruct = struct();
%truncate at null terminator to remove extension padding
nulls = bytes == 0;
if any(nulls)
bytes = bytes(1:(find(nulls, 1) - 1));
end
tree = xmltree(bytes);
setfilename(tree, filename);%probably helps with er... |
d5e9dbaa389d4d815998cb2066e3990d5c56b40addac56184860a41d707afab6 | MATLAB | 28,275 | 754 | function varargout = FAnalyze(varargin)
% FANALYZE
% For all your trajectory analysis needs! . See documentation for usage details.
%Written by Dan Valente
%November 2007
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui... |
178ab4e686bf097475663508f1a2cc50911eb3b16ffaae983f1f3ebb46ce08a4 | MATLAB | 28,288 | 722 | function [fig, methodsText] = generateSupplementaryFigure(exampleDatasetPath, allDatasetPaths, varargin)
% bc.qm.generateSupplementaryFigure - Generate publication-ready supplementary figure
%
% Creates a multi-panel figure with:
% (a) Histograms of quality metric distributions (using standard BombCell style)
% (b)... |
b69f338e448a913f09f0b59e00477b574a0b3ab5531e21bd145a8eb58aed5c2f | MATLAB | 28,301 | 771 | %%*****************************************************************************
%% HSDsqlp: solve an semidefinite-quadratic-linear program
%% by infeasible path-following method on the homogeneous self-dual model.
%%
%% [obj,X,y,Z,info,runhist] =
%% HSDsqlp(blk,At,C,b,OPTIONS,X0,y0,Z0,kap0,tau0,theta0);
%%
%% ... |
7561207f5af336b1ea67b99eeff19f7af64ff4bd33714d9fb6c76d30d4d7267d | MATLAB | 28,336 | 647 | function count = ea_cprintf(style,format,varargin) %#ok<*JAPIMATHWORKS>
% CPRINTF displays styled formatted text in the Command Window
%
% Syntax:
% count = cprintf(style,format,...)
%
% Description:
% CPRINTF processes the specified text using the exact same FORMAT
% arguments accepted by the built-in... |
768b83b2043289870f8c53fb3a3b7bb3556ce26ff8cb5911f32ddf1e2655605c | MATLAB | 28,501 | 524 | % pop_studydesign() - create a STUDY design structure.
%
% Usage:
% >> [STUDY, ALLEEG] = pop_studydesign(STUDY, ALLEEG, key1, val1, ...);
%
% Inputs:
% STUDY - EEGLAB STUDY set
% ALLEEG - vector of the EEG datasets included in the STUDY structure
%
% Optional inputs:
%
% Authors: Arnaud Delorme, Apri... |
7cc518d58bb7c5dec7f972d417d09cb23564c048422d1e22dd49d08a0e0fa70b | MATLAB | 28,638 | 613 | function outstruct = cifti_parse_xml(bytes, filename)
outstruct = struct();
%truncate at null terminator to remove extension padding
nulls = bytes == 0;
if any(nulls)
bytes = bytes(1:(find(nulls, 1) - 1));
end
tree = xmltreemod(bytes);
setfilename(tree, filename);%probably helps with... |
f12e55167b542a7ea3d912db9b6c68b1f193cd91a4d352a6d92bcbbd27e114e2 | MATLAB | 28,690 | 723 | function ea_manualreconstruction(mcfig,patientname,options)
% This is the function that enables the user to manually correct the
% electrode positions that have been reconstructed by the algorithm. A
% handle for the figure, the coordinates of the contacts in millimeter
% notation, optionally manually measured coordina... |
4e339aa4704b1b8247e38482691bb05b7ee93aa9fc99bce9eda8f44c3678658e | MATLAB | 28,767 | 664 | %%Runs permutation tests for baseline neural efficiency and the contribution of single edges to neural efficiency
%
%% Configuration
clear
clc
fprintf(' *** Estimate the contribution of single edges to similarity between rest and tau ...\n')
%Define cohort, sess... |
0bbd47bc719eecf2ca723105abc6c52aa104520fa26ccfb172f01a161306f05f | MATLAB | 28,834 | 585 | %% Visualize individual responses upon stimulus presentation
close all; clearvars; clc;
% Make the user pick the two "ResponsePattern" mat files to compare
scriptFullPath = matlab.desktop.editor.getActiveFilename();
try load(regexprep(scriptFullPath, 'Scripts.*', 'Scripts\\userDataPath.mat'), 'cohortPath');
catch
e... |
f338b13a3d75dab55b5f4a8c743f2d4f095affe31310a4a2db530448e72ac833 | MATLAB | 28,953 | 652 | function [q, pi0, info] = LaBGAScore_Storey_FDR(p, varargin)
% Storey's positive FDR q-values, with a pi0 estimate that is checked rather
% than trusted.
%
% *USAGE*
%
% q = LaBGAScore_Storey_FDR(p)
% [q, pi0] = LaBGAScore_Storey_FDR(p)
% [q, pi0, info] = LaBGAScore_Storey_FDR(p, 'method', 'lam... |
8e76b619c03e8db916e01926dd810299fe55af71a0eeb86ca48fab469d83753a | MATLAB | 28,999 | 669 | % pop_select() - given an input EEG dataset structure, output a new EEG data structure
% retaining and/or excluding specified time/latency, data point, channel,
% and/or epoch range(s).
% Usage:
% >> OUTEEG = pop_select(INEEG, 'key1', value1, 'key2', value2 ...);
%
% Graphic interface:... |
7e5a1e75768c43cff066838306563faa1368a5efdecd3d46b5b4d230fce878d3 | MATLAB | 29,097 | 722 | % loadcnt() - Load a Neuroscan continuous signal file.
%
% Usage:
% >> cnt = loadcnt(file, varargin)
%
% Inputs:
% filename - name of the file with extension
%
% Optional inputs:
% 't1' - start at time t1, default 0. Warning, events latency
% might be innacurate (this is an open issue).
% ... |
6b2183893f04e8d761162a910991d87c3f0a6fb6de6b4df23f881d4a8e8a53ad | MATLAB | 29,219 | 598 | %% Load data
load data_fig6
num_subs = length(data_fig6.lfp_odorTasks);
%% Fig 6A - Time series of gamma for odor vs. air
% Calculate amplitude by frequency for odor tasks vs. air tasks
% Odor Tasks
for sub = 1:num_subs
ts = data_fig6.lfp_odorTasks{sub};
sniffonset_conds = { data_fig6.sniffonsets_odorTasks{sub... |
f60b7cbe4c714190bffa94c00c02f91e24cb6122be4fba667a1ef57e888c9cb9 | MATLAB | 29,473 | 767 | function Params = CBIG_ArealMSHBM_dMSHBM_estimate_group_priors_parent(project_dir, mesh, ...
num_sub, num_sess, num_clusters, tmp_dir, max_iter)
% Params = CBIG_ArealMSHBM_dMSHBM_stimate_group_priors_parent(project_dir,mesh,num_sub, ...
% num_sess,num_clusters,tmp_dir,max_iter)
%
% This is the parent script to es... |
29085f40c7926817cc2d19200ecd6ec9b947cd59e106a5544fc0bd43a4fee081 | MATLAB | 29,562 | 895 | function [samples, stats, structArray] = matjags(dataStruct, jagsFilenm, initStructs , varargin)
% MATJAGS, a Matlab interface for JAGS
% Version 1.3.1. Tested on JAGS 3.3.0, Windows 64-bit version
%
% This code has been adapted from MATBUGS that was written by Kevin Murphy and Maryam Mahdaviani
%
% [samples, sta... |
ef14bd0be3713afaad79c7d8213aa0de1891c54fec227d80516fd0c60e3bc739 | MATLAB | 29,573 | 500 | % pop_editset() - Edit EEG dataset structure fields.
%
% Usage:
% >> EEGOUT = pop_editset( EEG ); % pops-up a data entry window
% >> EEGOUT = pop_editset( EEG, 'key', val,...); % no pop-up window
%
% Graphic interface:
% "Dataset name" - [Edit box] Name for the new dataset.
% In the right column... |
84397d7795f3e828a7d6ad539d4c0526dfc88c50dfd13cf5eec22a612f70ef32 | MATLAB | 29,628 | 731 | function [lh_labels, rh_labels] = CBIG_ArealMSHBM_cMSHBM_generate_individual_parcellation(project_dir,...
mesh, num_sess, num_clusters, subid, w, c, beta, subject_set)
% [lh_labels, rh_labels] = CBIG_ArealMSHBM_cMSHBM_generate_individual_parcellation ...
% (project_dir, mesh, num_sess, num_clusters, subid, w, c, ... |
867a03a426edd06714217db73512c59e33edebce16159fcd479af0d1623e09d9 | MATLAB | 29,647 | 680 | function [T, G] = LaBGAScore_firstlevel_task_motion_diagnostics(BIDSdir, derivdir, varargin)
% Quantify task-correlated head motion and its leakage into first-level betas
%
% :Usage:
% ::
%
% [T, G] = LaBGAScore_firstlevel_task_motion_diagnostics(BIDSdir, derivdir, 'conditions', C, ...)
%
% Answers two questions ab... |
d3cc46015178fd1889ab6a9450e383470753699b7047dc61f058f5e9f63cee5a | MATLAB | 29,673 | 581 | % std_plotcurve() - plot ERP or spectral traces for a STUDY component
% or channel cluster
% Usage:
% >> std_plotcurve( axvals, data, 'key', 'val', ...)
% Inputs:
% axvals - [vector or cell array] axis values for the data.
% data - [cell array] mean data for each subject group and/or d... |
2255f7db77f53d56f1a26cab6cefb9013d5eed307af443d9592c0c875219ac5c | MATLAB | 29,756 | 781 | function Params = CBIG_ArealMSHBM_cMSHBM_estimate_group_priors_parent(project_dir, mesh, ...
num_sub, num_sess, num_clusters, beta, tmp_dir, max_iter)
% Params = CBIG_ArealMSHBM_cMSHBM_estimate_group_priors_parent(project_dir,mesh,num_sub, ...
% num_sess,num_clusters,beta,tmp_dir, max_iter)
%
% This is the parent... |
8ffc53be6c2272cc230ce9068a6ef2dbfea424721dba358008227f1c8de62a50 | MATLAB | 29,793 | 944 | %% Create schematics of connectomes with nonrandom properties
clear; clc;
% Load model parameters
loadparam;
% Set number of FNPs in schematics
N = 10;
% Create Random ensemble of Connectomes with specified number of FNPs
rng(1, "twister");
a_array = zeros(2, N);
b_array = zeros(2, N);
for j = 1:N
a = topology.L... |
12169ad33ed85e8b45cc89055f594b76ddedeea5bb9fb28d4afea27d1b1d22a3 | MATLAB | 29,812 | 818 | %%*************************************************************************
%% sqlp: main solver
%%
%%*************************************************************************
%% SDPT3: version 3.1
%% Copyright (c) 1997 by
%% K.C. Toh, M.J. Todd, R.H. Tutuncu
%% Last Modified: 16 Sep 2004
%%****************************... |
316d8ccb305fd3af0fbd87af383df562c341bb7bbfee0e754384e343f0ef5820 | MATLAB | 29,829 | 810 | %EXPORT_FIG Exports figures suitable for publication
%
% Examples:
% im = export_fig
% [im alpha] = export_fig
% export_fig filename
% export_fig filename -format1 -format2
% export_fig ... -nocrop
% export_fig ... -transparent
% export_fig ... -native
% export_fig ... -m<val>
% export_fig... |
7bfe0cb79a48d2fa2b83c70e9552954f8a9f207eb5f91fffc250c5b99845c3f0 | MATLAB | 29,881 | 581 | % std_precomp() - Precompute measures (ERP, spectrum, ERSP, ITC) for channels in a
% study. If channels are interpolated before computing the measures,
% the updated EEG datasets are also saved to disk. Called by
% pop_precomp(). Follow with pop_plotstudy(). See Exampl... |
d1c8e35c5591682d94492dea37dc00ac47a3c51a44a045b9775d9162f3d7b848 | MATLAB | 29,953 | 569 | %% LaBGAScore_firstlevel_s1b_fit_phMRI_model.m
%
%
% *USAGE*
%
% This scripts performs first-level model specification, estimation, and
% contrast definition and estimation for phMRI designs with two or three
% conditions (more than three would need hard-coded adaptations).
%
% *OPTIONS*
%
% For LaBGAS_options fields (... |
86610f662234f8ce323a20adecf36be1fc4b337b98873503166151c735edfad3 | MATLAB | 30,010 | 779 | function Params = CBIG_ArealMSHBM_gMSHBM_estimate_group_priors_parent(project_dir, mesh, ...
num_sub, num_sess, num_clusters, beta, tmp_dir, max_iter)
% Params = CBIG_ArealMSHBM_gMSHBM_estimate_group_priors_parent(project_dir,mesh,num_sub, ...
% num_sess,num_clusters,beta,tmp_dir, max_iter)
%
% This is the parent... |
d08bd14bc4eb5ae8981483a933a69d27dd536eba42a9f187229becb5fd68bb92 | MATLAB | 30,011 | 558 | function combinePropPerTimeInt = smactinPropPerTimeInt(smPropPerTimeInt,...
actinPropPerTimeInt,combineConditions,threshMet,smactinFlag)
%SMACTINPROPPERTIMEINT : put together single molecule tracklets and associated local actin speckle properties in SM-centric strategy
%
%SYNOPSIS: combinePropPerTimeInt = smact... |
8f327e30cc4e54ac8dfeb2903c93d2d05639050831b503384d2663c317dacbea | MATLAB | 30,083 | 535 | function [tracksReform,modificationCount] = removeSimultaneousMergeSplit( tracksIn )
%REMOVESIMULTANEOUSMEGESPLIT resolves merges and splits that occur with the same segment at the same time
%
% SYNOPSIS [tracksReform,modificationCount] = removeSimultaneousMergeSplit( tracksIn )
%
% INPUT
% tracksIn : Tr... |
7cc46e21dbec01665f33d0f2d855be54bd74506bc01d6a846f4ad099cad8d0c2 | MATLAB | 30,132 | 734 | function [cumDistrNGauss,J] = calcCumDistrNGauss(param,abscissa,variableMean,...
variableStd,logData,gaussParamIn,ratioTol)
%CALCCUMDISTRNGAUSS calculates the cumulative distribution of N Gaussians
%
%SYNOPSIS cumDistrNGauss = calcCumDistrNGauss(param,abscissa,variableMean,...
% variableStd,logData,gaussParamIn... |
250f99b6d634b3ec48729b7aafd5792bacb732bf85123dc76a73f94b908aec83 | MATLAB | 30,178 | 729 | function results = ENet_neuroimaging_pipeline(X,Y,opts)
% ENet_neuroimaging_pipeline Robust Elastic Net pipeline for neuroimaging feature matrices.
%
% This function implements Elastic Net regularized logistic-style classification
% (via lassoglm / elastic net on a binary outcome) with repeated nested k-fold
% cross-v... |
824956db8d62ada40039f9a4278700f83f83ad816ec7d17ed87779aea0816175 | MATLAB | 30,261 | 919 | function [Ypk,Xpk,Wpk,Ppk] = findpeaks_SleepScore(Yin,varargin)
%FINDPEAKS Find local peaks in data
% PKS = FINDPEAKS(Y) finds local peaks in the data vector Y. A local peak
% is defined as a data sample which is either larger than the two
% neighboring samples or is equal to Inf.
%
% [PKS,LOCS]= FINDPEAKS(Y) a... |
96c3ccb92ae79f5d71aa47e78d56d6dfac5da7ee462f300f6b4f7ad1dd279873 | MATLAB | 30,368 | 963 | function ConvertSpykingCircus2Neurosuite(basepath,basename)
% Converts hdf5 files from SpykingCircus into klusters-compatible
% fet,res,clu,spk files. Works on all shanks of a recording. Assumes a
% 16bit .dat and an .xml file is present in "basepath" (home folder) and
% that they are named basename.dat and base... |
852f25d98f013b3898b8a068423f8f551cc1d867e6ea9e2df2b9e7bbc9c52a68 | MATLAB | 30,464 | 967 | %% neurDemo2
%
% neuroDemo2 reproduces the 2 or 3 neuron information transmition
% figures. Note, the scratch directory in the simulations folder will be
% used to save data. These simulations will take up about 2 minutes to
% run and it will require about 12 GB of space.
%
% Other m-files required: modeltype... |
3dc9f7581862191f283d132659dea3d3bccebc3534356666609333f8e6b96cc2 | MATLAB | 30,514 | 551 | %% INITIAL ANALYSIS -> FLUORDATA
% [data, filenames] = rotoball_importer('210619','f3e2')
% fly = balldata_struct(data,filenames)
[out filenames] = AF_OF_importer('220308','f3e1')
fly = AFOFdata_struct(out,filenames)
analyzeCalciumExperiment_newThor5D_roishift(pwd,'hdB_apr142022_f3e1',[],[],1,1,1,0,1)
%% PR... |
07b132d0fc49ce0d1b05bca6493220d2bb498b1f58749e598da53fbd089b2b46 | MATLAB | 30,821 | 767 | % plottopo() - plot concatenated multichannel data epochs in a topographic
% or
% rectangular array. Uses a channel location file with the same
% format as topoplot(), or else plots data on a rectangular grid.
% If data are all positive, they are assumed to be spectra.
% Usage:
... |
e861519267efa8e2519c14c8fb37a58d7662c19e3bd4ad5d56841e7776a92391 | MATLAB | 31,032 | 766 | function [modelstatus constatus linkstatus] = canlab_glm_subject_levels_run1subject_old(wd, s)
% child process of canlab_glm_subject_levels
% (see canlab_glm_README.txt for an overview)
%
% ..
% Copyright (C) 2013 Luka Ruzic
% ..
load(fullfile(wd,sprintf('env_%04d',s)));
%% PREP
diaryfile = fullfile(wd,sprintf('d... |
415300e87afa6fa9458b853479191683a9550fe78b2916a1c6988d90695f93ff | MATLAB | 31,112 | 814 | % configure file for operations on streamline trackings results
%
% for BATCH EDITOR system (Volkmar Glauche)
%
% File created by Marco Reisert
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function fodop = dti_cfg_fodop
% ----------------------------------------------------------------... |
95f3706eb1e1a19799676477a6acee71a26da0f13411b7363ad7eb20fced2d7c | MATLAB | 31,321 | 849 | function ft_write_cifti(filename, source, varargin)
% FT_WRITE_CIFTI writes functional data or functional connectivity to a cifti-2
% file. The geometrical description of the brainordinates can consist of
% triangulated surfaces or voxels in a regular 3-D volumetric grid. The functional
% data can consist of a dense o... |
4d27b6ce029b66a9dbf7a254a9dc05f246ecb0f152e7b0d6c0991695a4012e21 | MATLAB | 31,389 | 756 | function [lh_labels, rh_labels] = CBIG_ArealMSHBM_gMSHBM_generate_individual_parcellation(project_dir, ...
mesh, num_sess, num_clusters, subid, w, c, beta, subject_set)
% [lh_labels, rh_labels] = CBIG_ArealMSHBM_gMSHBM_generate_individual_parcellation ...
% (project_dir, mesh, num_sess, num_clusters, subid, w, c, ... |
db5d6672b51bc7aa3c052e0e3244edf77d89e8a193bb7db1d100b09ac0cd31e6 | MATLAB | 31,399 | 661 | %% Using_CANLab2023_atlases
% This script demonstrates some of the features of canlab atlases using
% CANLab2023 as an example atlas. CANLab2023 is the most featureful atlas
% at this point and provides a comprehensive account of how to use features
% found with other atlases as well as an illustration of the intent be... |
d738abd73d20ecfb358c6329d204b2d425e8cffc410c5ab7f2ee3f2033867775 | MATLAB | 31,439 | 514 | classdef pvalue_object < handle
% This helper object calculates p-values from a file that has the decoding results in standard format,
% and a directory of files that has a number of 'null distribution' decoding results which were created by running
% the same decoding experiment a number of times with the labe... |
fe72fbe80dac053f58852a2637bdcd6457ae97f7becc73e948d9831ef8a5f751 | MATLAB | 31,778 | 929 | function [res, errStr, res2, res3]= maskstruct_modify(varargin)
% function [res, errStr, res2, res3]= maskstruct_modify(maskStruct, command, parm1[, parm2[, ...[, parmN]]])
%
% maskStruct: should contain a valid maskStruct Ver2
% command: spezifies the action and should contain a string like
% {'insertMas... |
2bbcdf4d21d4b2550d33e2ee29ed0789e81a5c242b97c28fdcf79b2ae88394b9 | MATLAB | 31,807 | 1,018 | function CFA_ReGroupData
uiwait(msgbox({'This is a simple function for Re-Group Data!',...
'Suitable conditions:',...
'1. Each subfold contains 1 ROI and 1 EPI/T1/T2/CT file',...
'2. Each subfold contains 1 ROI 1 T1 file and 1 other file',...
'3. One Fold contains ROI files, and one fold contains EPI/T1... |
10fe010248c795d9c4a877eb659b055fc004cf0d286b97beb23686a80e573a7f | MATLAB | 32,179 | 671 | classdef ea_sweetspot < handle
% Sweetspot analysis class to handle visualizations of sweetspots in lead dbs resultfig / 3D Matlab figures
% A. Horn
properties (SetObservable)
M % content of lead group project
resultfig % figure handle to plot results
ID % name / ID of sweetspot obj... |
5125811d690fa984ac6c2c654b746c30b43d712bfa4423d0f61571bd61c95b35 | MATLAB | 32,210 | 705 | function [] = uw_overlay_convert2dicom(dicom_file, merged_file, newSeriesNumber, newSeriesDescription, outputDirectory, mergedImageVolume, outputImagePosition, outputOrientation) %#ok<INUSD>
% FUNCTION uw_overlay_convert2dicom
% Version 1.1
%
% A function to take a merged NIfTI or ANALYZE dataset (anatomica... |
fc0d9eb4fd4128347cc1d2bc347c4eb811a6fb814735274c4b7c09aad5eab950 | MATLAB | 32,318 | 710 | function OUT = LaBGAScore_firstlevel_refit_motion_comparison(modeldir, varargin)
% Refit first-level models with corrected motion regressors and compare con images
%
% :Usage:
% ::
%
% OUT = LaBGAScore_firstlevel_refit_motion_comparison(modeldir, 'subjects', {'sub-001','sub-003'})
%
% Measures what the motion-regre... |
d4edbb4f411b9b6a5326e846774a77e865810f7847b3d722c1ab3633584b79de | MATLAB | 32,468 | 528 | function specEv_struct = spectralevents_find(findMethod, eventBand, thrFOM, tVec, fVec, TFR, classLabels)
% SPECTRALEVENTS_FIND Algorithm for finding and calculating spectral
% events on a trial-by-trial basis of a single subject/session. Uses
% one of three methods before further analyzing and organizing event
... |
1443be1279fede80c66e189070a4427902414440b5ca187e0adf18bdb6e62671 | MATLAB | 32,771 | 826 | % toporeplot() - re-plot a saved topoplot() output image (a square matrix)
% in a 2-D circular scalp map view (as looking down at the top
% of the head). May also be used to re-plot a mean topoplot()
% map for a number of subjects and/or components without all
% ... |
baf87b9aecf469fe036ea7c783a745701d35373bb8c3ba310b4bda5e0ac3f46b | MATLAB | 32,803 | 873 | function ft_write_cifti_mod(filename, source, varargin)
% FT_WRITE_CIFTI writes functional data or functional connectivity to a cifti-2
% file. The geometrical description of the brainordinates can consist of
% triangulated surfaces or voxels in a regular 3-D volumetric grid. The functional
% data can consist of a den... |
d31e4cc4fb9c007fd5db96fcb222bd3df55710ab8140b2ad65976c9590bce48a | MATLAB | 32,837 | 677 | % pop_study() - create a new STUDY set structure defining a group of related EEG datasets.
% The STUDY set also contains information about each of the datasets: the
% subject code, subject group, experimental condition, and session. This can
% be provided interactively i... |
7282d6eaf1597c89abeb77839003598e6255548758bf0e5d2816f495da5226fd | MATLAB | 32,955 | 664 | % std_readdata() - LEGACY FUNCTION, SHOULD NOT BE USED ANYMORE. INSTEAD
% USE std_readerp, std_readspec, ...
% load one or more requested measures
% ['erp'|'spec'|'ersp'|'itc'|'dipole'|'map']
% for all components of a specified cluster.
% ... |
2391a6f00373abc75802bd4f5b72f369355c9680a7f1468ed8af845491802410 | MATLAB | 33,034 | 1,014 | % eegplotold() - display data in a horizontal scrolling fashion
% with (optional) gui controls (version 2.3)
% Usage:
% >> eegplotold(data,srate,spacing,eloc_file,windowlength,title)
% >> eegplotold('noui',data,srate,spacing,eloc_file,startpoint,color)
%
% Inputs:
% data - Input data matr... |
101d5ff2aa02e020003cdece53849d6a6c9ed065b71b05927e4c2f9a47d66957 | MATLAB | 33,091 | 687 | classdef LeG_vox2atlaslabel < handle
properties
NMMDir; %default atlas (required)
AtlasDir; AtlasNames;
AtlasLabels; AtlasVals;
AtlasData; AtlasMat; AtlasCnt; AtlasImg;
DefFile; DefMat; Def; %ptvox2mnimm deformation (iy_MR.nii)
VoxDef; %ptvox2atlasvox d... |
0accfa9d56331756ac964d710975ad69ed26fa88a4b11f0be97e64ef126d93c3 | MATLAB | 33,243 | 917 | function varargout = venn(varargin)
%VENN Plot 2- or 3- circle area-proportional Venn diagram
%
% venn(A, I)
% venn(Z)
% venn(..., F)
% venn(..., 'ErrMinMode', MODE)
% H = venn(...)
% [H, S] = venn(...)
% [H, S] = venn(..., 'Plot', 'off')
% S = venn(..., 'Plot', 'off')
% [...] = venn(..., P1, V1, P2, V2, ...... |
b131650861558506de61c8183fff8c5d3fd879768527d94cf311ec0fd7960939 | MATLAB | 33,303 | 765 | function [roll_y,y,solution] = ea_diode_auto(side,ct,head_mm,unitvector_mm,tmat_vx2mm,elspec)
if ~strcmp(elspec.matfname, 'boston_vercise_directed')
msg = sprintf(['Warning: DiODe has only been phantom-validated for Boston Scientific direcional lead!']);
choice = questdlg(msg,'Warning!','Continue','Continue');
... |
62813f7e83253a373152a12573f231e8cee32c3f49b43833b7fa2b278f77a87f | MATLAB | 33,427 | 729 | % timefreq() - compute time/frequency decomposition of data trials. This
% function is a compute-only function called by
% the more complete time/frequency functions newtimef()
% and newcrossf() which also plot timefreq() results.
%
% Usage:
% >> [tf, freqs, times] =... |
6460768a24f98f092adaefb880c0f20c0a041f94bed2e1399f287e65575ac62d | MATLAB | 33,541 | 333 | %% LaBGAScore_pet_a2_set_default_options.m
%
%
% *USAGE*
%
% * Set default options used in various core secondlevel pet analysis
% scripts included in LaBGAScore repo
% * This script is automatically called by many other scripts, including
% LaBGAScore_pet_a_set_up_paths_always_run_first, hence it does not often need t... |
b9e9abe308cb2f0726d90e28503999878d371a40ec6ab4a3bf026b4349c42cf4 | MATLAB | 33,595 | 849 | function varargout = ea_checkstructures(varargin)
% EA_CHECKSTRUCTURES MATLAB code for ea_checkstructures.fig
% EA_CHECKSTRUCTURES, by itself, creates a new EA_CHECKSTRUCTURES or raises the existing
% singleton*.
%
% H = EA_CHECKSTRUCTURES returns the handle to a new EA_CHECKSTRUCTURES or the handle to
%... |
faaff59def4f9f6678fb213e3600f460bbece5ab292292d0a39814dad6304585 | MATLAB | 33,714 | 951 | classdef TabPanel < uix.Container & uix.mixin.Panel
%uix.TabPanel Tab panel
%
% p = uix.TabPanel(p1,v1,p2,v2,...) constructs a tab panel and sets
% parameter p1 to value v1, etc.
%
% A tab panel shows one of its contents and hides the others according
% to which tab is selected.
%
... |
0e20b516db83c67e3fc4816f7104fcf8d32b1356ae2531a19a6b11938586c699 | MATLAB | 33,845 | 642 | function print2eps(name, fig, export_options, varargin)
%PRINT2EPS Prints figures to eps with improved line styles
%
% Examples:
% print2eps filename
% print2eps(filename, fig_handle)
% print2eps(filename, fig_handle, export_options)
% print2eps(filename, fig_handle, export_options, print_options)
%
%... |
4aa027ab71be14b1b94e01e9721a5633297e3b223f98eaf8d727c679c4739c76 | MATLAB | 33,881 | 657 | % readlocs() - read electrode location coordinates and other information from a file.
% Several standard file formats are supported. Users may also specify
% a custom column format. Defined format examples are given below
% (see File Formats).
% Usage:
% >> eloc = readlocs( ... |
d0bcacf668c438df1322e884a2f020f5ab1b0fe73d43431a2c715a40daa351ed | MATLAB | 34,127 | 697 | % pop_erpimage() - draw an ERP-image plot of a given EEG channel or independent
% component. Uses a pop-up window if less than three (or four
% in one condition) input arguments are supplied. Calls erpimage().
% For futher details see >> help erpimage
% Usage:
% >>... |
47c26438edde2691a347b54e992a25f087524aa1a57bfb9f8687cc2ec050f26f | MATLAB | 34,248 | 807 | function [x,y,info] = sedumi(A,b,c,K,pars)
% [x,y,info] = sedumi(A,b,c,K,pars)
%
% SEDUMI Self-Dual-Minimization/ Optimization over self-dual homogeneous
% cones.
%
% > X = SEDUMI(A,b,c) yields an optimal solution to the linear program
% MINIMIZE c'*x SUCH THAT A*x = b, x >= 0
% x is a vecto... |
bf3ee70f5a55878a56ff0b4f791bf51715a2daac912f713a6799e540f4b0234b | MATLAB | 34,279 | 932 | function varargout = uw_overlay_bwgui(varargin)
% UW_OVERLAY_BWGUI M-file for uw_overlay_bwgui.fig
% Version 1.1
%
% GUI - uw_overlay_bwgui
%
% An interface desiged to create and preview overlays using the
% uw_overlay_bwthresh function. All of the settings avaliable on the
% command line of bwthres ar... |
6e475cc3fac1262611dad360743ab0c9264cba99ad620b2a9c679f1475db3514 | MATLAB | 34,308 | 885 | % Part of cest-kidney-ph-kinetics
% Author: Zinia Mohanta
% Purpose: Dynamic renal CEST MRI pH mapping and kinetic modeling.
% Note: This code requires local Bruker/CEST loading functions and does not include raw imaging data.
%% ===================== In vivo CEST dynamic analysis (with WASSR B0 gating) =========... |
e5c4963bbf3be47a9a17d00038a8d4b431020f87df809c9e4ee71264db932225 | MATLAB | 34,589 | 784 | %%% Supplementary Figure 3A-F
% Structure:
% 1) Compute all 400-ms ISI data for monkey X and C
% 2) Plot Supplementary Fig. 3A-F
% 3) Save only Prediction XX ext.mat / Prediction CC ext.mat as intermediate files
% 4) Save final panel-level Zenodo MAT files at the end
%
% Notes:
% - No local functions are used... |
f0edd64f5be2cef7b30eb41385d41ce2edc34fbfcfa72ebe0428af37784ad4e3 | MATLAB | 34,693 | 824 | function tmp
[x,y]=meshgrid(-1:1/21:1);
z=x.*exp(-x.^2-y.^2);
[c,h]=contour(x,y,z);
set(h,'EdgeColor',0.45*[1 1 1])
ndx=1:3:length(x);
x=x(ndx,ndx); y=y(ndx,ndx); z=z(ndx,ndx);
[u,v]=gradient(z,1/7);
p1=[x(:),y(:)]; u=u(:); v=v(:);
m=abs(u+i*v); % gradient magnitude
daspect([1 1 1]), set(gca,'color',0.3*[1 1 1])
hold o... |
7efb058dbd8cb7e63905d33bb93b3fff464edd48716cb680c71b118a68fb0f7b | MATLAB | 34,780 | 837 | % headplot() - plot a spherically-splined EEG field map on a semi-realistic
% 3-D head model. Can 3-D rotate the head image using the left
% mouse button.
% Example:
% >> headplot example % show an example spherical 'eloc_angles' file
% >> headplot cartesian % show an example cartesian... |
82bcc6a7551680f45f491db35d73bd4f924e36e9cb8480619050a3b36ea5d4e2 | MATLAB | 34,987 | 601 | classdef plot_standard_results_TCT_object
% This object allows one to display the results for training and testing at different time points in the experiment
% i.e., temporal cross-training (TCT) results, for results that were saved using the standard_resample_CV.run_cv_decoding method.
% The results are plott... |
ed64a964256ba003f65c1fc39264bd8832bc3eb213400b33c182966d8627edc6 | MATLAB | 35,047 | 706 | function GUI
% Create the main figure
hFig = figure('Position', [100, 100, 900, 700], 'MenuBar', 'none', ...
'Name', 'MRI Phantom and Simulation', 'NumberTitle', 'off', 'Resize', 'on');
% Create a tab group
tabGroup = uitabgroup(hFig);
% Create tabs for ... |
d98ab74c4487e1967da92c045607468aa66b7b00074939eba38c7eba9d9c0801 | MATLAB | 35,145 | 814 | function [roll_y,y,solution] = ea_diode_medtronic(side,ct,head_mm,unitvector_mm,tmat_vx2mm,elspec)
%% constant variables
% colorscale for ct figures
cscale = [-50 100];
cscale2 = [-500 2000];
% diameter of the slices shown in visualizations in vox
extractradius = 30;
% sidenames
sides = {'right','left','3','4','5','6',... |
ed3effa3d1a03c61429ec96f7e21d9010d43547cd0b86494ea73eaf8a17651e9 | MATLAB | 35,171 | 813 | classdef Import
methods (Static)
function varargout = NL(varargin)
import CMBHOME.NL2Mat.* % imports NL import utilities for windows only
import CMBHOME.Utils.*
import CMBHOME.Session
import CMBHOME.Spike
global noprompt
... |
03d869926276797a5fb5879533a62b24fa39c97be8499e8b868803c64e6781b2 | MATLAB | 35,224 | 878 | function DatsMetadata = bz_DatFileMetadata(basepath)
% Store basic info about the original dat files: names and bytes
% Brendon Watson 2016-8
%% Input and directory handling
if ~exist('basepath','var')
basepath = cd;
elseif isempty(basepath)
basepath = cd;
end
basename = bz_BasenameFromBasepath(basepath);
... |
7b613852cc0fa9b01a946c3f10fb329cbf0d093b51f3970e799a4505db67549a | MATLAB | 35,310 | 1,010 | function [shape] = ft_read_headshape(filename, varargin)
% FT_READ_HEADSHAPE reads the fiducials and/or the measured headshape from a variety
% of files (like CTF and Polhemus). The headshape and fiducials can for example be
% used for coregistration.
%
% Use as
% [shape] = ft_read_headshape(filename, ...)
% or
% ... |
7a05314d897c9da3733c32a3e35b46851950512d1188cddfd91cd81abff6c4f9 | MATLAB | 35,559 | 565 | % pop_preclust() - prepare STUDY components' location and activity measures for later clustering.
% Collect information in an interactive pop-up query window. To pre-cluster
% from the commandline, use std_preclust(). After data entry into the pop window,
% selected me... |
5497b9f43c9126875a717ddf27f022afd46a4e9340c71ed86c3330231caa1028 | MATLAB | 35,798 | 672 | function print2eps(name, fig, export_options, varargin)
%PRINT2EPS Prints figures to eps with improved line styles
%
% Examples:
% print2eps filename
% print2eps(filename, fig_handle)
% print2eps(filename, fig_handle, export_options)
% print2eps(filename, fig_handle, export_options, print_options)
%
%... |
30ea0b99ffcaa7e38f51dad0734f196dd1a2538c772df55b635ade7ff1dcfbe6 | MATLAB | 35,847 | 977 | function varargout = lead_connectome(varargin)
% LEADFIGURE MATLAB code for leadfigure.fig
% LEADFIGURE, by itself, creates a new LEADFIGURE or raises the existing
% singleton*.
%
% H = LEADFIGURE returns the handle to a new LEADFIGURE or the handle to
% the existing singleton*.
%
% LEADFIGURE(... |
a2c6e096d69b21f1b8109bc0177928e1786a44d2ef910608de07b186f55e87c7 | MATLAB | 35,941 | 896 | %% c2g_run_multivariate_mediation_single_trial.m
%
%
% *USAGE*
%
% This script runs multivariate mediation analysis (PDM) on a continuous
% outcome Y, on an fmri_data_st object created by
% prep_3f_create_fmri_data_single_trial_object.m. That script should be run
% first, or this script will load the saved data object ... |
5625c182bfa4f35cf919502368ecdfc2674a887f15519cd73b399d25d245036e | MATLAB | 36,039 | 946 | %% c2_SVM_contrasts_masked.m
%
%
% *USAGE*
%
% This script displays second-level (i.e. across subjects) support vector
% machine (SVM) results generated by prep_3c_run_SVMs_on_contrasts_masked.m
%
% Run this script headless from the Linux command line (the default), which
% publishes the html report and fails loudly if... |
173a303564d5aa02f4b6cc50f30771c75afdd051bb8041eb2312ebd55d4bce76 | MATLAB | 36,311 | 889 |
% configure file for calculation of tensors
% DTI Configuration file
% BATCH system (Volkmar Glauche)
%
% File created by Susanne Schnell
function tracking = dti_cfg_tracking
% ---------------------------------------------------------------------
% filename Input dtdstruct
% ----------------------------------------... |
edbdf24a614392cd3adde95b184327ef35d4fca90c9451e2215fa6cd5bad693d | MATLAB | 36,710 | 1,006 | function ROI_table = plot_PLSR_diagnostics_neuroimaging(results, XL, roiNames, atlasFile, varargin)
% plot_PLSR_diagnostics_neuroimaging Plot and diagnose PLSR neuroimaging results (ROI/parcellation).
%
% This function provides generic visualization and diagnostics for PLSR
% results produced by pipelines such as PLSR... |
258e7c4c42a7fe18708efb75ea94dc112405e8d163e828568220b0bc12e37a56 | MATLAB | 36,863 | 850 | function [roll_y,y,solution] = ea_diode_manual(side,ct,head_mm,unitvector_mm,tmat_vx2mm,elspec)
%% constant variables
% colorscale for ct figures
cscale = [-50 100];
cscale2 = [-500 2000];
% diameter of the slices shown in visualizations in vox
extractradius = 30;
% sidenames
sides = {'right','left','3','4','5','6','7'... |
156cc55f44fcf439545f294393199df64fe34e20cc8eff5889d1f75fe422ad9e | MATLAB | 36,887 | 959 | %% prep_3c_run_SVMs_on_contrasts_masked.m
%
%
% *USAGE*
%
% This script
%
% # Runs second-level (i.e. across subjects) support vector machines
% for each within-subject CONTRAST registered in DAT.contrasts
% # Plots montages of the uncorrected results
% # Saves the results using standard naming and location
%
% Run t... |
83d8556e240fd457f2179ee14f0575bf4331d6595141f7aaff6d0b0e94ac3e1d | MATLAB | 37,000 | 805 | %% prep_2_load_image_data_and_save.m
%
%
% *USAGE*
%
% This prep script
%
% # calls a_set_up_paths_always_run_first, then loads DAT from
% image_names_and_setup.mat if not already in the workspace (falling back
% to prep_1_set_conditions_contrasts_colors and prep_1b_prep_behavioral_data
% if that file doesn't exi... |
746c82ecfa5dc981b10a53f53f8d1fadd2a56fe03c55757614706aa0b9709823 | MATLAB | 37,087 | 885 | function [ SlowWaves,VerboseOut ] = DetectSlowWaves( basePath,varargin)
%[SlowWaves] = DetectSlowWaves(basePath) detects neocortical slow
%waves using a combination of a positive deflection in the LFP (delta wave)
%and a dip in gamma power.
%
%INPUTS
% basePath -(default: pwd) basePath for the recording file, in b... |
3918f5906418d58031ef26f91ace5bc00f11aba45e856e0cb69a0af4a8288fdb | MATLAB | 37,120 | 1,121 | function [res, errStr, oArg]= dtdstruct_query(varargin)
%function [res, errStr]= dtdstruct_query(dtdStruct, command[, op1[, op2[... [, opN]]]])
%
%
% General method query a infomations and data dtdStruct
%
% dtdStruct: should contain a valid dtdStruct
% command: {'sizeAy' | 'vox' | 'user' | 'hMatrix' | 'patien... |
d2bb5f99056f93605ccd7404573e3940467c869c37bb3c0b10126db02f3a3210 | MATLAB | 37,214 | 866 | classdef BIDSFetcher
% BIDS dataset fetcher
properties
settings
spacedef
datasetDir
subjId
subjDataOverview
end
properties (Access = private, Constant)
anchorSpace = 'anchorNative';
end
methods
%% Constructor
function obj = BIDSF... |
8d60433746adb240ed3b4c96f722d990523bfd01bde5e1565e750079e5ee25bc | MATLAB | 37,237 | 923 | function varargout = ea_checkreg(varargin)
% EA_CHECKREG MATLAB code for ea_checkreg.fig
% EA_CHECKREG, by itself, creates a new EA_CHECKREG or raises the existing
% singleton*.
%
% H = EA_CHECKREG returns the handle to a new EA_CHECKREG or the handle to
% the existing singleton*.
%
% EA_CHECKR... |
fab9bfae36d7a0c9662cb2f71bd7bd0c050270c75bb8d380ae1ad6f10854925e | MATLAB | 37,862 | 942 | function [source] = ft_read_cifti_mod(filename, varargin)
% FT_READ_CIFTI read functional data or functional connectivity from a cifti-1 or
% cifti-2 file. The functional data can consist of a dense or a parcellated
% representation. The geometrical description of the brainordinates can consist of
% triangulated surfa... |
985d9b8a39f3378f36eed1ff39baf12ddab5fa07197d4fe44dc4f7efa21bad99 | MATLAB | 38,139 | 930 | %% Step 4 Tiny Dancers: Group analyses for ERP
% load all ERP data
%%
addpath 'C:\Users\tnguyen\OneDrive - Fondazione Istituto Italiano Tecnologia\Documenti\MATLAB\functions'
addpath 'D:\MUSICOM_EEG/onsets'
addpath('D:\MUSICOM_EEG/EEG/')
addpath('C:/Users/tnguyen/OneDrive - Fondazione Istituto Italiano Tecnolog... |
1bebfb2d26f97978f305639bf68ce14219127411f71b2dd0e84bb2234f39e73f | MATLAB | 38,376 | 815 | function [thresholdsTable, inputParam, varOfResid, evalInfoBIC, biphasicThreshArr, stat, nonVshapeList, randPlotData] = ...
scan4smSpeckleThreshold(tassm, matchindx, smactinFlag, scanInfo, motionType, figureInfo, scanParamArray)
%SCAN4SMSPECKLETHRESHOLD checks whether 1-line or 2-line fit describes the input data b... |
e299a91d38c9fdae5420d4fd1319c9d2de4a05a77dcfbe437b1f4a2be6d14114 | MATLAB | 39,203 | 837 | classdef ea_networkmapping < handle
% DBS network mapping class to handle visualizations of DBS network mapping analyses in lead dbs resultfig / 3D Matlab figures
% A. Horn
properties (SetObservable)
M % content of lead group project
resultfig % figure handle to plot results
ID % na... |
637266ee5b30be226ae6d2fa18c701aee120a224ef1ed3ccdc561fb51d63fe3f | MATLAB | 39,228 | 1,038 | function Visualize(self)
% Displays a GUI for browsing through typical first-pass plots
%
% Allows user to set active epoch from within GUI, but starts with epochs
% set in root.epoch.
%
% Only cells that meet root.cell_thresh are available at each instance.
%
% root.Visualize
if isempty(self.spatial_scale)
... |
820975a48c1ffb72e97ad94b2017aeb842d57ecf22dc33d7c19d47eccf985fa0 | MATLAB | 39,331 | 892 | % coregister() - Co-register measured or template electrode locations with a
% a reference channel locations file. For instance if you
% want to perform dipole modeling you have to coregister
% (align) your channel electrodes with the model (and the
% ea... |
cbff4fe5964a9820b2765818f6ec9fbad5e7e9b5e7150690f35b96b6909df7ba | MATLAB | 40,305 | 1,016 | function source = ft_read_cifti(filename, varargin)
% FT_READ_CIFTI read functional data or functional connectivity from a cifti-1 or
% cifti-2 file. The functional data can consist of a dense or a parcellated
% representation. The geometrical description of the brainordinates can consist of
% triangulated surfaces or... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.