sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
babfecdf58b2d266b989a0fd06077b212a528d5cf3607ecb3c726ff8abd9f452 | MATLAB | 16,702 | 270 | function cm_data=plasma(m)
cm = [[ 5.03832136e-02, 2.98028976e-02, 5.27974883e-01],
[ 6.35363639e-02, 2.84259729e-02, 5.33123681e-01],
[ 7.53531234e-02, 2.72063728e-02, 5.38007001e-01],
[ 8.62217979e-02, 2.61253206e-02, 5.42657691e-01],
[ 9.63786097e-02, 2.51650... |
d3576adac1972f5fcf883a3c827954f34cdc30fd2e94b12652fb760df0d28aaa | MATLAB | 16,713 | 424 | %% modeltype2 - three Izhikevich neuron system (2 RS, 1 FS)
% Generates data for a three Izhikevich neuron network. Pulse stimulus is
% applied to a RS neuron (E1) that sends connections to another RS neuron
% (E2) and an inhibitory FS neuron (I1). I1 also sends a connection to E2.
% The stimulus to E1 can either be a... |
5795cf44c232d621a7172a17386ed038037664737a988f70b3ae4fbe75b4142a | MATLAB | 16,744 | 403 | function [rawdata,brainshift,coregistration,normalization,preprocessing,reconstruction,prefs,stimulations,headmodel,ftracking,lead_mapper] = ea_create_bids_mapping()
%create a list of old files along with their full path:
%%
rawdata{:,1} = {'raw_anat_t1.nii';
'raw_anat_t1.nii';
'raw_anat_t1.nii';
'raw_anat_... |
e693006ab84eb4b09ae0bd189953be67c8b733b6d4fe700aee95201666d78fe3 | MATLAB | 16,853 | 507 | clc
clear all
close all
set(0,'defaultfigurecolor',[1 1 1]);% set figure background color
%% ===================================================
% ===============2025 PB perfusion====================
% ====================================================
ifrun = 0;
if ifrun
%% set parameters
which_gene_data = 2; % 1... |
e94ff660fc5252931b80fee7d10ad089a890228c523a3cf101d80022d282e04c | MATLAB | 16,858 | 424 | function GCO_UnitTest
% GCO_UnitTest Compile, load, and test the GCO_MATLAB library.
% GCO_UnitTest will make sure the wrapper compiles on the target
% platform and then exercises the library to look for silly bugs.
function Assert(cond,msg) % for older MATLAB without assert()
if (exist('a... |
0bddd630238bd082566c06b5b7b964398452ac2be1f6457d75e0793ad2bad4b4 | MATLAB | 16,862 | 343 | addpath('/home/bogdan/.matlab/spm/spm12');
addpath(genpath('/home/bogdan/.matlab/canlab/CanlabCore'));
addpath(genpath('/home/bogdan/.matlab/canlab/Neuroimaging_Pattern_Masks'));
addpath(genpath('/home/bogdan/.matlab/canlab/canlab_single_trials'));
addpath(genpath('/home/bogdan/.matlab/canlab/canlab_single_trials_priva... |
2d65bd92fd5255a6ec58575b018fba61a294c233c6da1d3355995348b0a7372b | MATLAB | 16,880 | 475 | % mtimesx_build compiles mtimesx.c with BLAS libraries
%******************************************************************************
%
% MATLAB (R) is a trademark of The Mathworks (R) Corporation
%
% Function: mtimesx_build
% Filename: mtimesx_build.m
% Programmer: James Tursa
% Version: 1.4... |
a735bbb53e112b67edb5032c7a698b824fdcfeb0687f2f572c810170f1b0f08d | MATLAB | 16,883 | 377 | function [elrender,ellabel,eltype,eltext]=ea_showelectrode(obj,cmd,options)
% This function renders the electrode as defined by elspec and coords_mm.
% _______________________________________________________________________________
% Copyright (C) 2014 Charite University Medicine Berlin, Movement Disorders Unit
% Andre... |
43c70db754e51ac7766fd764316a0873f528242ef026a6062ad70ed6433a2cf7 | MATLAB | 16,915 | 429 | function tree = xml_parser(xmlstr)
% XML (eXtensible Markup Language) Processor
% FORMAT tree = xml_parser(xmlstr)
%
% xmlstr - XML string to parse
% tree - tree structure corresponding to the XML file
%__________________________________________________________________________
%
% xml_parser.m is an XML 1.0... |
d7687c96de17f16398793821bfafc7390073ae242f68ff4fa0f1f711854b9563 | MATLAB | 16,957 | 519 | clc
clear all
close all
set(0,'defaultfigurecolor',[1 1 1]);% set figure background color
if ~contains(path, '/Users/guofanhua/Desktop/gfh/tools/MatlabTools/BrainSpace-latest/matlab')
addpath(genpath('/Users/guofanhua/Desktop/gfh/tools/MatlabTools/BrainSpace-latest/matlab'));
end
%% ======================= compare... |
4b880f8c7e2c325361b6567db08c9cdfdaadc2f578a04969655f002268918d17 | MATLAB | 17,024 | 487 | function [ EMGwhisk ] = GetWhiskFromEMG( basePath,varargin )
%[ EMGwhisk ] = GetWhiskFromEMG(basePath )
%This is a detector that extracts whisking/nonwhisking epochs from
%implanted EMG in the whisker pad. Extracts also the EMG and EMG envelope.
%
%INPUT
% basePath
% Assumes presence of the following f... |
1143473f624ac2b37e0d0b2ba2973dbc06d6a6501d575a11c2adb4cfdbf8c9cc | MATLAB | 17,026 | 381 | function [A, bcol, alpha] = print2array(fig, res, renderer, gs_options)
%PRINT2ARRAY Exports a figure to a bitmap RGB image array
%
% Examples:
% A = print2array
% A = print2array(figure_handle)
% A = print2array(figure_handle, resolution)
% A = print2array(figure_handle, resolution, renderer)
% A = ... |
076caef6f72ed8a7bf78e61bd6e113f30de647c76b57812cfa424a71237522c8 | MATLAB | 17,056 | 316 | % pop_chancoresp() - define correspondances between two channel locations structures
% (EEG.chanlocs) automatically (by matching channel labels)
% else using a user input gui.
% Usage:
% >> [chanlist1 chanlist2] = pop_chancoresp(chanstruct1, chanstruc2, 'key', 'val', ...);
%
% ... |
1b22c8eee228bebcf636074691638a4253be970c3a7a1b57ad68c326bc3f474e | MATLAB | 17,066 | 402 | % pop_epoch() - Convert a continuous EEG dataset to epoched data by extracting
% data epochs time locked to specified event types or event indices.
% May also sub-epoch an already epoched dataset (if sub-epochs are
% same size or smaller). This pop_function calls epoch().
% U... |
8d3e9860800b0f2f343e7f20b39f4f13120b31de53f6ed48b91c106849bef9ff | MATLAB | 17,080 | 422 | % Script that analyses and plots the boxplots and correlations for
% NB delamination durations and transcription durations shown in
% Figures 4 and S3
close all
clear all
%% NB Delamination Duration
load('CystsData.mat')
load('ControlData.mat')
load('CanoeData.mat')
load('BayData.mat')
load('BayControlData.mat')
%%... |
a1a8eb63ebc60f90ec52fe775a3b31fd2dcfcd5108dad26f90214e27de6ff143 | MATLAB | 17,084 | 446 | addpath('.'); addpath('helperFunctions'); addpath('helperFunctions/circstat');
clear all; close all; clc;
%% load processed data
globalsMain;
% load experiment data
load('../03_data/02_processed_data/processedData.mat');
% load clinical data
opts = detectImportOptions('../03_data/01_raw_data/Clinical_data.... |
998fb309772b68fddeb14fe17df80e5e4f574aff6c7613df21d8fd0fb5b9e3a9 | MATLAB | 17,090 | 334 | % pop_spectopo() - Plot spectra of specified data channels or components.
% Show scalp maps of power at specified frequencies.
% Calls spectopo().
% Usage:
% >> pop_spectopo( EEG, dataflag); % pops-up interactive window
% OR
% >> [spectopo_outputs] = pop_spectopo( EEG, dataflag,... |
b3b15c2a3df4a0e3623b7168cca868c188d35870ca8721594f241919d8c666ce | MATLAB | 17,108 | 392 | %% LaBGAScore_prep_mrs2bids.m
%
%
% *USAGE*
%
% This script converts raw mrs data (as exported from Philips or GE scanners
% and stored in sourcedata folder under standard LaBGAS file organization)
% to BIDS structure.
%
% MRS sourcedata need to be in a separate subfolder 'mrs', for example
% (Philips data)
% > sourced... |
1a9350143d4a2dfbaefc4c774f892e58ea2e9a529f6d200636fee430ade2a525 | MATLAB | 17,152 | 338 | %% NiftiSeg - Class representing a Nifti Segmentation File
% No frills full volume variant of the NifitSegmentationSubvolume class by Andreas Husch / Florian
% Bernard
%
% Andreas Husch 2017
classdef NiftiSeg < NiftiMod & matlab.mixin.Copyable & configurable & plotable3D
properties (SetAccess = protected, GetAc... |
6cc390c4ff2607f7d5b937401374fe26b2c3cff2be57cb25c1245b8c2189057c | MATLAB | 17,227 | 293 | %% CANlab second-level batch scripts
%
% <https://www.github.com/Canlab>
% <https://github.com/canlab/CANlab_help_examples>
% NOTE: these instructions are now on canlab.github.io
% so these will become dated.
%% WHAT THESE TEMPLATE SCRIPTS ARE AND WHAT THEY DO
% This is a set of scripts that is designed to facili... |
42d37ec37a3c06aad6cf1e275952c20a28970ceafcd967b964289f8789b216c8 | MATLAB | 17,238 | 309 | function outbytes = cifti_write_xml(cifti, keep_metadata)
if ~(nargin > 1 && keep_metadata)
prov = cifti_metadata_get(cifti.metadata, 'Provenance');
cifti.metadata = struct('key', 'Provenance', 'value', 'cifti_write_xml.m v1.0');
if ~isempty(prov)
cifti.metadata = cifti_metadata_... |
dd510fb97d08ca722e4011f1886210f72bcd589bddf8c381b8d8e025c111c732 | MATLAB | 17,316 | 298 | %% CANlab second-level batch scripts
%
% <https://www.github.com/Canlab>
% <https://github.com/canlab/CANlab_help_examples>
%
% NOTE: This is now in Github Pages at canlab.github.io
%% WHAT THESE TEMPLATE SCRIPTS ARE AND WHAT THEY DO
% This is a set of scripts that is designed to facilitate second-level analysis
% ... |
74a09143d5ed04db6dada7acb8f4a71fbc893942d1b0b2458ed8b31206909373 | MATLAB | 17,317 | 426 | function [lh_labels, rh_labels] = CBIG_MSHBM_parcellation_single_subject(params)
% [lh_labels, rh_labels] = CBIG_MSHBM_parcellation_single_subject(params)
%
% This function is a simplified wrapper to perform MSHBM individual 17-network
% parcellation for a single subject. This function takes simple inputs (strings)
% a... |
aa20b273f411a79eeff715e1cd3ce7d028f6fdf5c04ff33ecb5559d737dfddcf | MATLAB | 17,319 | 512 | % Script from Jennifer Colonell's SpikeGLX_Datafile_Tools repo
% =============================================================
% Simple class of MATLAB functions deomonstrating
% how to read and manipulate SpikeGLX meta and binary files.
% When this file is included in the MATLAB path, the individual methods
% are ca... |
be76d3544cb9b39128a3e07ac3f8472ea9c86e645e9453f2842f7666ee68259a | MATLAB | 17,338 | 421 | % Date: 12/20/2025
% For reviewer 3's comments on the number of selective units
clear; clc;
% Put the output directory here.
out_dir = '<put the output directory here>';
% Put the trained model directories here.
one_modality_model_dir = '<put the one-modality model directory here>';
two_modality_model_dir = '<put th... |
5bb246eb7ebab7d3cd10daa004b0897c90b0fe9765d5f11f0cab92f49fe3e954 | MATLAB | 17,342 | 423 | % rejstatepoch() - reject bad eeg trials based a statistical measure. Can
% be applied either to the raw eeg data or the ICA
% component activity. This is an interactive function.
%
% Usage:
% >> [ Irej, Irejdetails, n, threshold, thresholdg] = ...
% rejstatep... |
0928ade3343e60d3f05599eaa0925f3f686503fcb8a064ed192d5857f7124d66 | MATLAB | 17,345 | 415 | % adjustlocs() - read neuroscan polar location file (.asc)
%
% Usage:
% >> chanlocs = adjustlocs( chanlocs );
% >> chanlocs = adjustlocs( chanlocs, 'key1', val1, 'key2', val2, ...);
%
% Inputs:
% chanlocs - EEGLAB channel location data structure. See
% help readlocs()
%
% Optional inputs:... |
37262cf9e47e6ef6c1cd9a0b470a556bda5955cb653ad7509758886893f15c00 | MATLAB | 17,359 | 468 | function fit=locfit(varargin)
% Smoothing noisy data using Local Regression and Likelihood.
%
% arguments still to add: dc maxit
%
% Usage: fit = locfit(x,y) % local regression fit of x and y.
% fit = locfit(x) % density estimation of x.
%
% Smoothing with locfit is a two-step procedure. The locfit()
%... |
4c89cdb1d188c152a5df63953c49b35694d083118774c57a9f24f8692b37d912 | MATLAB | 17,366 | 618 | function [res, errStr, res2]= ftrstruct_modify(varargin)
%
% function [res, errStr, res2]= ftrstruct_modify(ftrStruct, command, parm1[, parm2[, ...[, parmN]]])
%
% ftrStruct: should contain a valid ftrStruct
% command: spezifies the action and should contain a string like
% {'setVox' | 'setPatient' | 'set... |
f1e3c7f1e6003749a4684dc8c14c94943bef8308b7797498f7672ad8a098b3fa | MATLAB | 17,395 | 469 | function varargout = configure_classify(varargin)
% CONFIGURE_CLASSIFY M-file for configure_classify.fig
% CONFIGURE_CLASSIFY, by itself, creates a new CONFIGURE_CLASSIFY or raises the existing
% singleton*.
%
% H = CONFIGURE_CLASSIFY returns the handle to a new CONFIGURE_CLASSIFY or the handle to
% ... |
60abda0fc6bc165fc6f6153d4ae0d2f9a3ffe471dc31170e00aa550bc9094e94 | MATLAB | 17,403 | 379 | % std_spec() - Returns the ICA component spectra for a dataset. Updates the EEG structure
% in the Matlab environment and in the .set file as well. Saves the spectra
% in a file.
% Usage:
% >> [spec freqs] = std_spec(EEG, 'key', 'val', ...);
%
% Computes the mean s... |
b33fa0a3b857d31576b6e7618bbfd9b8255e02b383dd0df84327fb4088cfadf6 | MATLAB | 17,403 | 376 | % pop_clust() - select and run a clustering algorithm on components from an EEGLAB STUDY
% structure of EEG datasets. Clustering data should be prepared beforehand using
% pop_preclust() and/or std_preclust(). The number of clusters must be
% specified in advance. If called i... |
f512d4d45644556e08279b46dbdc3b2ecdbcb5a8b0010d6246086466a7165ef0 | MATLAB | 17,404 | 309 | %first column = channel number on probe. Convention is ch. 1 is at top left of PCB
%and number wrap around in counter-clockwise fashion.
%second column = x coordinate, horizontal distance to reference electrode in microns. Convention is
%for reference electrode to be at bottom left corner of array when array
%p... |
1ec54b7f9e8dbbec26a3c246d3761b01cd43054aa9aa630a24a17c65a17d5412 | MATLAB | 17,447 | 419 | % pac_cont() - compute phase-amplitude coupling (power of first input
% correlation with phase of second). There is no graphical output
% to this function.
%
% Usage:
% >> pac_cont(x,y,srate);
% >> [pac timesout pvals] = pac_cont(x,y,srate,'key1', 'val1', 'key2', val2' ...);
%
% Inputs:
% x ... |
b60cf3b4e8451d3797169611fac68cc1797ae8be9c72353bf10d8901fc142c33 | MATLAB | 17,603 | 313 | function [tassm, matchindx] = smactinMat(combinePropPerTimeInt,combineConditions,smactinFlag, diffMode)
%SMACTINMAT Converts selected fields from combinePropPerTimeInt into data matrix format
%
%SYNOPSIS: [tassm,matchindx] = smactinMat(combinePropPerTimeInt,combineConditions,smactinFlag, diffMode)
%
%INPUT: combinePr... |
bba5d9ebf6b086c09e26322471e3dffa526033af86e08e2d8dd353cf21cf4ad5 | MATLAB | 17,604 | 524 | function data = TDTfilter(data, epoc, varargin)
%TDTFILTER TDT tank data filter.
% data = TDTfilter(DATA, EPOC, 'parameter', value, ...), where DATA is
% the output of TDTbin2mat or TDT2mat, EPOC is the name of the epoc to
% filter on, and parameter value pairs define the filtering conditions.
%
% If no... |
6e03a512b72ff1d4d5ca2b5db0535ba3171f9dfb48d1939d752937d777fb3908 | MATLAB | 17,633 | 569 | function [sROI, matROIs] = ReadImageJROI(cstrFilenames, shape)
% ReadImageJROI - FUNCTION Read an ImageJ ROI into a matlab structure
%
% Usage: [sROI] = ReadImageJROI(strFilename)
% [cvsROIs] = ReadImageJROI(cstrFilenames)
% [cvsROIs] = ReadImageJROI(strROIArchiveFilename)
%
% This function reads the Ima... |
89cb22815f13e40105beb6bc17dbb65089d5fddfeaa8af27cc1226365a37fbb8 | MATLAB | 17,633 | 379 | function [vals] = ea_unified_sweetspot_calcstats(obj,patsel,Iperm)
if ~exist('Iperm','var')
I=obj.responsevar;
else % used in permutation based statistics - in this case the real improvement can be substituted with permuted variables.
I=Iperm;
end
val = obj.results.sweetspotmapping.efield;
% quickly recalc s... |
54bde7927f1a5144f8e21e714fd35921d9806288c1890d208c4cd9ceba1c0d24 | MATLAB | 17,648 | 384 | function [vals] = ea_sweetspot_calcstats(obj,patsel,Iperm)
if ~exist('Iperm','var')
I=obj.responsevar;
else % used in permutation based statistics - in this case the real improvement can be substituted with permuted variables.
I=Iperm;
end
val = obj.results.efield;
% quickly recalc stats:
if ~exist('patsel',... |
b88330cd3770b35704c07d82f8f7461906786f68bd6ac7960ebc41c08324acca | MATLAB | 17,713 | 411 | function CBIG_MMLDA_visualize_factors(in_dir, out_dir, k, min_thresh, max_thresh, ...
mask, behavior_name, behavior_domain, mni_space)
% CBIG_MMLDA_visualize_factors(in_dir, out_dir, k, min_thresh, max_thresh, mask)
%
% This function will visualize atrophy maps and cognitive deficits of estimated factors.
% The at... |
60748c62f9bedfea83ecaf00052b584e7c064e3904314554b16250285521f8bf | MATLAB | 17,718 | 504 | function z = ea_normal(data, varargin)
% Sacha van Albada, Dec 11 2006
%----------------------------------------------------------------------
% This function takes a set of observations and transforms these to the
% normal distribution.
%
% If the data contain ties, the default is to map these to equal values,
% so th... |
ccd97001b077ac38dcd1f72c2be9291f175bbf66acda5db3452d945a6822259f | MATLAB | 17,752 | 643 | % Main script with ODEs and solvers for imposed perimeter model
% Adapted from Troost et al., 2023
function [yout,tout,params] = SOP_multicell_LI_adapted_weighted_with_trigger_PerimSave(model,params,y0)
%% prepare
pp = genpath('functions');
addpath(pp)
% load defaults if absent
if(nargin < 2)
switch model.ratio... |
84225be39eaaf6c7d89b7a96788609f6c55cb663ebe2bf12c96f362cc246a88d | MATLAB | 17,772 | 327 | function outbytes = cifti_write_xml(cifti, keep_metadata)
if ~(nargin > 1 && keep_metadata)
prov = cifti_metadata_get(cifti.metadata, 'Provenance');
cifti.metadata = struct('key', 'Provenance', 'value', 'cifti_write_xml.m v1.0');
if ~isempty(prov)
cifti.metadata = cifti_metadata_... |
34dffc931ffa3a3367850c6b3df96d6062c13e156e7e6ffa0886cf0c93225b25 | MATLAB | 17,780 | 377 | % std_readerp() - load ERP measures for data channels or
% for all components of a specified cluster.
% Called by plotting functions
% std_envtopo(), std_erpplot(), std_erspplot(), ...
% Usage:
% >> [STUDY, datavals, times, setinds, cinds] = ...
% ... |
d28b78d73f481bd3f61d80d3cf98bf0dc471d6c876d7b93669ccf8ce6d591a43 | MATLAB | 17,839 | 457 | function [type] = ft_senstype(input, desired)
% FT_SENSTYPE determines the type of acquisition device by looking at the
% channel names and comparing them with predefined lists.
%
% Use as
% [type] = ft_senstype(sens)
% [flag] = ft_senstype(sens, desired)
%
% The output type can be any of the following
% 'ctf64'... |
7f80fc1f63dcd0d17945bd0c2b23f1d5906bf464449ecc530a3e144041889334 | MATLAB | 17,862 | 340 | % pop_newtimef() - Returns estimates and plots of event-related (log) spectral
% perturbation (ERSP) and inter-trial coherence (ITC) phenomena
% timelocked to a set of single-channel input epochs
%
% Usage:
% >> pop_newtimef(EEG, typeplot); % pop_up window
% >> pop_newtimef(EEG, typep... |
e949f250e8c9776c90dafe038ae0a0c159f657557e0fe316f9c55aba6dbf87ca | MATLAB | 17,864 | 469 | function varargout = configure_classify(varargin)
% CONFIGURE_CLASSIFY M-file for configure_classify.fig
% CONFIGURE_CLASSIFY, by itself, creates a new CONFIGURE_CLASSIFY or raises the existing
% singleton*.
%
% H = CONFIGURE_CLASSIFY returns the handle to a new CONFIGURE_CLASSIFY or the handle to
... |
113b990d8b286ed4396cf60f52d9d13a0c8c2978b2374410504c7d7bb1f62038 | MATLAB | 17,882 | 558 | function [poscl, negcl, results_table] = LaBGAScore_region_table(cl, varargin)
% LaBGAScore_region_table Region table, with the Z ceiling applied only to infinities.
%
% VENDORED FROM CANLABCORE - RE-CHECK THIS FILE WHEN CANLABCORE IS UPGRADED.
%
% Source : CanlabCore/CanlabCore/@region/table.m
% Commit : 8c5992... |
eb9ca60d972ced291a9490d6d510bab2ad39bfcf039a4e8c9113f3821539bd34 | MATLAB | 17,930 | 564 | function CFA_template(H)
% function CFA_template
movegui(H.fig,'west');
load('SetUpPara.mat');
pathss = which('CFA_template.m');
[pth nam ext] = fileparts(pathss);
ParaSavedir = [pth,filesep,'IOparameter',filesep];
Htemp.ParaSavedir = ParaSavedir;
Htemp.fig = figure('unit','norm',...
'pos',[0.2,0.2,0.6,0.6],...
... |
2be025e49e097b61380f3bf740f0690d16c9b47c950705a11c7109eedf2d9c1d | MATLAB | 17,940 | 302 | function c = sprott_catalog(name)
%SPROTT_CATALOG The 62 systems of Sprott (2003) Appendix A.
%
% c = nonantest.sprott_catalog() all systems, as a struct array
% c = nonantest.sprott_catalog(name) one system by name
%
% Fields
% name short identifier
% pretty the name as printed in the... |
3ebf6e0b7b85a01c8d7a49409c62fab1bfd85626f5a027caeb9ef8657fe8cabc | MATLAB | 17,995 | 277 | % Contact ythomas@csail.mit.edu or msabuncu@csail.mit.edu for bugs or questions
%
%=========================================================================
%
% Copyright (c) 2008 Thomas Yeo and Mert Sabuncu
% All rights reserved.
%
%Redistribution and use in source and binary forms, with or without
%modification, a... |
925ec58cbcad79244088ba25c09a3d9a6287050c5618f83d1cf9b688b8710fbb | MATLAB | 18,008 | 504 | classdef spikeRasterPlot < matlab.graphics.chartcontainer.ChartContainer & ...
matlab.graphics.chartcontainer.mixin.Legend
% spikeRasterPlot Create a spike raster plot
% spikeRasterPlot(spikeTimes) create a spike raster plot with the
% specified spike timestamps. spikeTimes must be a vector of d... |
dbddbea78676a39d35be4f34600cab850d9ed27644da9bfd3b31af17c4c3c9dc | MATLAB | 18,081 | 430 | function hh = xticklabel_rotate( ax, angle, varargin )
%rotateXLabels: rotate any xticklabels
%
% hh = rotateXLabels(ax,angle) rotates all XLabels on axes AX by an angle
% ANGLE (in degrees). Handles to the resulting text objects are returned
% in HH.
%
% hh = rotateXLabels(ax,angle,param,value,...) also allows... |
89b4ae7d67ecaee085ecff473189cf87c9e63dfafb34e5d8d49af631a45a0355 | MATLAB | 18,088 | 530 | function [stack, img_read] = tiffread2(filename, img_first, img_last)
% tiffread, version 2.4
%
% [stack, nbImages] = tiffread;
% [stack, nbImages] = tiffread(filename);
% [stack, nbImages] = tiffread(filename, imageIndex);
% [stack, nbImages] = tiffread(filename, firstImageIndex, lastImageIndex);
%
% Reads 8,1... |
44a4213749890a4203603162c5584b5a4988f6c059e39e75bae897234615408e | MATLAB | 18,107 | 521 | % internal function
% 'xform_nii.m' is an internal function called by "load_nii.m", so
% you do not need run this program by yourself. It does simplified
% NIfTI sform/qform affine transform, and supports some of the
% affine transforms, including translation, reflection, and
% orthogonal rotation (N*90 degree... |
37babf1b6acf562d19a0ed0017703a0e11f3d7ca821a54ba557ecb908689c536 | MATLAB | 18,109 | 440 | function [likelihood, results, label, tau] = CBIG_hMRF_update_labels_via_graphcut(full_corr_mat,...
params, lh_mask, rh_mask, avg_mesh, label, Neighborhood, Smooth_cost, i, tau)
% [likelihood, results, label, tau] = CBIG_hMRF_update_labels_via_graphcut(full_corr_mat,...
% params, lh_mask, rh_mask, avg_mesh, label, ... |
b2ce51adf8b8af2b1ffd1a750021701eb97f7a1e3f314cd399cdacd0fe16b825 | MATLAB | 18,124 | 383 | %% LaBGAScore_mrs_osprey_single_sess_jobfile_GE.m
%
%
% *USAGE*
%
% This function describes an Osprey job defined in a MATLAB script.
%
% A valid Osprey job contains four distinct classes of items:
% 1. basic information on the MRS sequence used
% 2. several settings for data handling and modeling
% ... |
e8d49ae2b29c48b522490c5208dcb181caebd39ee0b8161fde3cd3ac4c0cd105 | MATLAB | 18,140 | 289 | % pop_importdata() - import data from a Matlab variable or disk file by calling
% importdata().
% Usage:
% >> EEGOUT = pop_importdata(); % pop-up a data entry window
% >> EEGOUT = pop_importdata( 'key', val,...); % no pop-up window
%
% Graphic interface (refer to a previous version of the GUI):
... |
a1ff3d342f2d7d97ca49b399301a9016b9bcbf8d44e1ab56bdfc9dabcb93ccb1 | MATLAB | 18,189 | 400 | function CBIG_gwMRF_regenerate_Schaefer2018_parcellations(output_dir)
% CBIG_gwMRF_regenerate_Schaefer2018_parcellations(output_dir)
%
% This function uses current Schaefer2018 parcellation to regenerate new
% version of Schaefer2018 parcellation under given folder.
%
% In our previous versions (v0.8.1-Schaefer2018_... |
362a456e1732118c40b2dcc68bab2942808f9882c5e07c51e8b0938f3a223e06 | MATLAB | 18,249 | 452 | function [ ISIstats ] = bz_ISIStats( spikes,varargin )
%ISIstats = bz_ISIStats(spikes,varargin) calculates the statistics
%inter-spike intervals for the spiketimes in spikes.
%
% INPUTS
% spikes Structure with spikes.times and spikes.UID
%
% (options)
% 'ints' A structure with intervals... |
eccb78ac38f37e8060ad1075d0a8e5fffc195bd0c88612c6bb294b4136914391 | MATLAB | 18,276 | 568 | function [sROI, matROIs] = ReadImageJROI_C(cstrFilenames, shape)
% ReadImageJROI - FUNCTION Read an ImageJ ROI into a matlab structure
%
% Usage: [sROI] = ReadImageJROI(strFilename)
% [cvsROIs] = ReadImageJROI(cstrFilenames)
% [cvsROIs] = ReadImageJROI(strROIArchiveFilename)
%
% This function rea... |
db8108e52aee661396e81989826ca35b050a4a074165fa314ac53bb1c32dbfec | MATLAB | 18,284 | 516 | %%% Figure 3 and Supplementary Figure 4
% Structure:
% 1) Compute all data for Figure 3A-B and Figure 3C/SFigure 4
% 2) Plot all panels
% 3) Save independent Zenodo MAT files for each final panel
%
% No local functions.
ccc;
%% Paths
% Figure 3A-B example: monkey C, nSTD = 9, active condition
SINGLEPATHs = dir(... |
04d11809a4e9aa5f3ef63502051bca0c22d90609aeb415fccb939f1c1ae62ac5 | MATLAB | 18,289 | 522 | clc
clear all
close all
set(0,'defaultfigurecolor',[1 1 1]);% set figure background color
if ~contains(path, '/Users/guofanhua/Desktop/gfh/tools/MatlabTools/BrainSpace-latest/matlab')
addpath(genpath('/Users/guofanhua/Desktop/gfh/tools/MatlabTools/BrainSpace-latest/matlab'));
end
%% ======================= compare... |
563c352bb8f6f3fda1ed812315e60a16fd49ce532503e2e303e784ab1c4c3a4b | MATLAB | 18,312 | 367 | function [actinPropPerTimeInt] = actinPropPerTimeInterval(qfsmPackPaths, actinConditions)
%ACTINPROPPERTIMEINTERVAL : reads results from QFSM Package and calculates spatiotemporal properties of speckles per FSM frame
%
%SYNOPSIS: [actinPropPerTimeInt] = actinPropPerTimeInterval(qfsmPackPaths, actinConditions)
%
%INPUT:... |
55b57dbba1aa7e9894dd5b13ed8c21f21cf9661fae5308fffb07d1226fbd850b | MATLAB | 18,318 | 564 | function mvtk_write(M,filename,format)
% Write geometric data on disk using VTK file format (legacy/XML,ascii/binary)
% FORMAT mvtk_write(M,filename,format)
%
% M - data structure
% filename - output filename [Default: 'untitled']
% format - VTK file format: legacy, legacy-ascii, legacy-binary, xml,
% ... |
b322509b81a0e89a6fb646a34e978b474302e447202e3ec7e8f59e851009ddc6 | MATLAB | 18,351 | 390 | function [roll_y,y,solution] = ea_diode_manualGUI(side,ct,head_mm,unitvector_mm,tmat_vx2mm,elspec)
%% constant variables
% colorscale for ct figures
cscale = [-50 100];
cscale2 = [1500 3000];
% diameter of the slices shown in visualizations in vox
extractradius = 30;
% sidenames
sides = {'right','left','3','4','5','6',... |
8b0ce4e014814c7e714f7576937b6b9c48502dc1b94a629a40100f05532f7568 | MATLAB | 18,360 | 501 | %%% Supplementary Figure 10
% Passive prediction GC analysis.
%
% Structure:
% 1) Compute SFigure 10A data
% 2) Compute SFigure 10B data
% 3) Plot SFigure 10A-B
% 4) Save one independent MAT file per panel
%
% Notes:
% - No local functions.
% - No old upload mixed MAT files.
% - No intermediate "Predictio... |
cb7b0713d8ea32729dd17d614e5bfebbd9787e25869c6c2be4414acd70277789 | MATLAB | 18,402 | 328 | function in = intriangulation(vertices,faces,testp)
% intriangulation: Test points in 3d wether inside or outside a (closed) triangulation
% usage: in = intriangulation(vertices,faces,testp)
%
% arguments: (input)
% vertices - points in 3d as matrix with three columns
%
% faces - description of triangle... |
20c27710e8293d095d94b7506eadae8e59380f929bce2093ef264df5ef7686d3 | MATLAB | 18,479 | 569 | function mvtk_write(M,filename,format)
% Write geometric data on disk using VTK file format (legacy/XML,ascii/binary)
% FORMAT mvtk_write(M,filename,format)
%
% M - data structure
% filename - output filename [Default: 'untitled']
% format - VTK file format: legacy, legacy-ascii, legacy-binary, xml,
% ... |
2ce3e578f721556ea9df419eb8d464871ea984a630586e7bd30e1b52fe88e40f | MATLAB | 18,501 | 385 | %% LaBGAScore_mrs_osprey_single_sess_jobfile_Philips.m
%
%
% *USAGE*
%
% This function describes an Osprey job defined in a MATLAB script.
%
% A valid Osprey job contains four distinct classes of items:
% 1. basic information on the MRS sequence used
% 2. several settings for data handling and modeling
... |
45790e77e95faa7ebd060b7d5754f74ff7ad10032dd69a0575d1324dae5c7557 | MATLAB | 18,506 | 430 | function hh = rotateXLabels( ax, angle, varargin )
%rotateXLabels: rotate any xticklabels
%
% hh = rotateXLabels(ax,angle) rotates all XLabels on axes AX by an angle
% ANGLE (in degrees). Handles to the resulting text objects are returned
% in HH.
%
% hh = rotateXLabels(ax,angle,param,value,...) also all... |
a05084562a9b6c68e533699589ae355ac907762cd1a41dae2f65ae4842f5af99 | MATLAB | 18,587 | 560 | %% modeltype5 - model canonical experiments
%
% Syntax: [data] = modeltype5(expType, varargin)
%
% Inputs:
% expType - sets the type of experiment to run (string). Options are:
% 'CenterOut': a movement direction encoding by primary motor
% cortex neurons experiment similar to Georgopoulis.
... |
f228e76670468ed2d3659eed19ad4f1c47aa097a8d40ba87a5cfa21c86dcf5b0 | MATLAB | 18,608 | 429 | %% Load data
load(data_fig3)
%% Calculate spectrogram for odor detection - concatenated 6 subs
ts = data_fig3.lfpData_odorDetect_combinedSubs;
sniffonset_conds = { data_fig3.sniffonsets_odorDetect_combinedSubs, data_fig3.sniffonsets_airDetect_combinedSubs};
para = [];
para.freq = logspace( log10( 1), log10( 200), 100... |
e6cb5b388ded3be50e192f00a9091a775201da403b576e46cd593e3102f2affd | MATLAB | 18,681 | 435 | function results = CBIG_hMRF_optimize_cost_function(full_corr_mat, dim, params)
% results = CBIG_hMRF_optimize_cost_function(full_corr_mat, dim, params)
%
% This is the main clustering algorithm of generating the parcellation.
% For the notations below:
% N = no of vertices per hemisphere;
% Input
% - full_corr_ma... |
842ffbf5d73d73b0779e7e291cd1eb3968e03f7e8c23019941e621cdc7463c20 | MATLAB | 18,717 | 509 | function [SleepScoreLFP,PickChannelStats] = PickSWTHChannel(basePath,scoretime,SWWeightsName,...
Notch60Hz,NotchUnder3Hz,NotchHVS,NotchTheta,SWChannels,ThetaChannels,...
rejectchannels,OVERWRITE,varargin)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
% Optional
% 'noPromp... |
218db71ed9b8ac99af78ef39dbe3d0c575482fddf0658cca818b149fc6890f19 | MATLAB | 18,740 | 381 | function [fh, actual_size] = plugin_set_figure_size(varargin)
% Size a figure for capture into a publish() HTML report.
%
% Lives in LaBGAScore/figures/ and is used by BOTH the first-level scripts in
% LaBGAScore and the second-level templates in the LaBGAS fork of
% CANlab_help_examples. It started life in that fork, ... |
14792095357865370d8e80bd0a821433a8a4c36dcfa95bb00597a7732f180ce3 | MATLAB | 18,772 | 430 | % mri3dplot() - plot 3-D density image translucently on top of the mean MR
% brain image used in dipplot(). Plot brain slices in directions
% 'top' (axial), or 'side' (sagittal), or 'rear' (coronal).
% Creates a new figure(). Smoothing uses Matlab smooth3()
% Usage:
% >> ... |
1f86a2bda75c33a0322ffb97edd0686d02e3bbf0c8b163a9e9e0be44fcc5aaaa | MATLAB | 18,782 | 551 | classdef BoxPanel < uix.Panel & uix.mixin.Panel
%uix.BoxPanel Box panel
%
% p = uix.BoxPanel(p1,v1,p2,v2,...) constructs a box panel and sets
% parameter p1 to value v1, etc.
%
% A box panel is a decorated container with a title box, border, and
% buttons to dock and undock, minimize, g... |
3f40137dcc4e230fb4ea8db411560bbf9bab133f74255ac06c83f401ff948176 | MATLAB | 18,811 | 393 | %% LaBGAScore_mrs_osprey_jobfile_GE.m
%
%
% *USAGE*
%
% This function describes an Osprey job defined in a MATLAB script.
%
% A valid Osprey job contains four distinct classes of items:
% 1. basic information on the MRS sequence used
% 2. several settings for data handling and modeling
% 3. a list... |
650f7d7ffeb0854a81b325cde970b4c4b6701c2c864983506b3da35b31244c61 | MATLAB | 18,811 | 496 | function varargout = lead_mapper(varargin)
% LEAD_MAPPER MATLAB code for lead_mapper.fig
% LEAD_MAPPER, by itself, creates a new LEAD_MAPPER or raises the existing
% singleton*.
%
% H = LEAD_MAPPER returns the handle to a new LEAD_MAPPER or the handle to
% the existing singleton*.
%
% LEAD_MAPP... |
663344b767956ecb9eaf9f9f21302149985b2be2e95542a5de5165eb9caf12e4 | MATLAB | 18,837 | 388 | %% prep_3g_create_fmri_data_runwise_contrast_object.m
%
%
% *USAGE*
%
% This script creates and saves an fmri_data_st object with runwise contrast
% images, calculated by subtracting one condition's beta image from
% another's, from rootdir/firstlevel/model_x_yyy/sub-zz. It
%
% # loads DAT if not already in the workspa... |
721053be97c959d169f96670af8eab631a0405590aed4d79407db63af82cd5a3 | MATLAB | 18,882 | 564 | function mvtk_write(M,filename,format)
% Write geometric data on disk using VTK file format (legacy/XML,ascii/binary)
% FORMAT mvtk_write(M,filename,format)
%
% M - data structure
% filename - output filename [Default: 'untitled']
% format - VTK file format: legacy, legacy-ascii, legacy-binary, xml,
% ... |
f485a4d5c52704b29f90814d48635a9feb6a28e8864d773d2dfa66434b4f434a | MATLAB | 18,892 | 500 | %%% Supplementary Figure 8
% Multi-band deviant-minus-standard GC topographic maps in active condition.
%
% Updated STAT source:
% This version no longer reads the old:
% ..\MAT Data\granger statistics\PE\**\average\**\*Active\grangerstat.mat
%
% Instead, each frequency band uses the day-combined permutation-... |
2b353b6c30a0fa20a949ac20d253aea75ed556de515fe548164adb8a4b65578b | MATLAB | 18,949 | 494 | function [diffAnalysisRes,errFlag] = trackDiffusionAnalysis1(tracks,...
extractType,probDim,checkAsym,alphaValues,plotRes,confRadMin)
%TRACKDIFFUSIONANALYSIS performs diffusion analysis, checking first for asymmetric tracks
%
%SYNOPSIS [diffAnalysisRes,errFlag] = trackDiffusionAnalysis1(tracks,...
% extractType,... |
2c2384cdad340a9d4e9e6820b4cef969d17abfaa8529cb5ef6ac3cacf99d137c | MATLAB | 18,968 | 632 | function outdata=specscope(indata)
% record and plot audio spectrogram
%
% Usage: outdata=specscope(indata)
%
% Input: indata (optional)
% Displays a recorded piece of data, if an argument is passed
% Otherwise displays audio data from an attached microphone
%
% Output: outdata (optional)
% If present, will ... |
a4f0d7786ca10642b86d3d0be8bbf7e512fdb376c4f7df52883436466577da38 | MATLAB | 19,038 | 513 | function CFA_RunAllJob(SetUpPara,Template,Para)
Indir = SetUpPara.Indir;
Outdir = SetUpPara.Outdir;
filp = which('CFA_RunAllJob.m');
[pth,nam,ext] = fileparts(filp);
spmjobdir = [pth,filesep,'NormJobmat',filesep];
Atlasdir = [pth,filesep,'TemplateUsed',filesep];
voxelsize = SetUpPara.OutVsize;
BrainMaskdir = [pth,files... |
98ecde7b00ba0301e1243b427c28e0e4ba4f476adb91dbd84ffefd69b80db884 | MATLAB | 19,055 | 434 | function ea_export_symptoms_tracts(obj, symptomTractsfile)
% this function creates symptom-specific tracts from fiber filtering
% results. Those will be separated based on the spatial distribution and
% the distribution of vals (fiber statistic, e.g. t- or r-values)
% IMPORTANT: use either positive or negative tract... |
980376b62cd27811c7e6b183e632e8ca083b4ff7c2125cb2a7d292b7033e63e5 | MATLAB | 19,096 | 495 | function success = cvx_grbgetkey( kcode, overwrite )
% CVX_GRBGETKEY Retrieves and saves a Gurobi/CVX license.
%
% This function is used to install Gurobi license keys for use in CVX. It
% is called with your Gurobi license code as a string argument; e.g.
%
% cvx_grbgetkey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
% ... |
0e7b9c340da016c325d4d0bb6bfbb5b2196accf9aeda6a4ccdf4ed8ebbab1ade | MATLAB | 19,103 | 394 | %% Load data
load data_fig2_OdorImageCue.mat
%% Calculate spectrogram on concatenated data - odor cue vs. image cue
% odor
ts = data_fig2_OdorImageCue.lfp_OdorCue_concat;
sniffonset_conds = { data_fig2_odorVisualCue.cueonsets_odor};
para = [];
para.freq = logspace( log10( 1), log10( 200), 100); % center frequencies fo... |
59ce03981c8912e16db8cb9d4e4ce32375b4e43abebbab3933bc2ae52f28966d | MATLAB | 19,110 | 478 | % icademo() - a sample ICA analysis script using the ICA/ERP package
% of Matlab functions distributed via
% http://www.sccn.ucsd.edu/eeglab
%
% Notes:
% Reads ascii ERP data file: pnas.adt
% Reads example ascii ERP data files: chan.nam chan14.locs (=chan_locs)
%
% Author: Sc... |
2a90d803e07afcc16b2e60ae613eb738e73862b0a663e3c0788a2ee0d124298b | MATLAB | 19,113 | 395 | %% LaBGAScore_mrs_osprey_jobfile_Philips.m
%
%
% *USAGE*
%
% This function describes an Osprey job defined in a MATLAB script.
%
% A valid Osprey job contains four distinct classes of items:
% 1. basic information on the MRS sequence used
% 2. several settings for data handling and modeling
% 3. a... |
bf17d6d2bf0f16d96ef15d24fe98da5b6ed2facae75cae8ffd42cafecd25cf79 | MATLAB | 19,125 | 535 | function [stack, img_read] = tiffread(filename, img_first, img_last)
% tiffread, version 2.2c
%
% [stack, nbImages] = tiffread;
% [stack, nbImages] = tiffread(filename);
% [stack, nbImages] = tiffread(filename, imageIndex);
% [stack, nbImages] = tiffread(filename, firstImageIndex, lastImageIndex);
%
% Reads 8,1... |
ab4aa463c87cbf0e3fa1de6f0eb3bd9ed03e261f0b4daedc7617edff98824028 | MATLAB | 19,140 | 455 | %%
% list ids for flies you want to analyze
% flies = ['mar1722_f1';'mar1722_f4';'mar1822_f3';'mar2422_f2';'apr0722_f1'];
% flies = [flies;'apr1422_f2';'apr1522_f1';'apr1522_f4'];
% flies = ['may0522_f1';'may1122_f2';'may1222_f1';'may1222_f4'];
% flies = [flies;'may2622_f3';'may2722_f2';'jun0122_f1'];
flies = ['j... |
231f4d2d5a395f740766699620159fcbf8000b36fc9e8459ce9451974b4f38b8 | MATLAB | 19,187 | 484 | function Hash = DataHash(Data, Opt)
% DATAHASH - Checksum for Matlab array of any type
% This function creates a hash value for an input of any type. The type and
% dimensions of the input are considered as default, such that UINT8([0,0]) and
% UINT16(0) have different hash values. Nested STRUCTs and CELLs are parsed
%... |
3fa12822e1e126cbb1852bcc5b25bcc7bcd7ad877629a67d09f5386ec566daf5 | MATLAB | 19,264 | 414 | % pop_dipfit_nonlinear() - interactively do dipole fit of selected ICA components
%
% Usage:
% >> EEGOUT = pop_dipfit_nonlinear( EEGIN )
%
% Inputs:
% EEGIN input dataset
%
% Outputs:
% EEGOUT output dataset
%
% Author: Robert Oostenveld, SMI/FCDC, Nijmegen 2003
% Arnaud Delorme, SCCN, La Jolla... |
c27fe450008064d05a368ed4bb5578bf269b89759f02c3e1a89d1a096f8d12b9 | MATLAB | 19,268 | 515 | %%% Figure 4
% Figure 4A-D
% Workflow: compute all data -> plot Figure 4 panels -> save panel-level Zenodo data
ccc;
%% Settings
run("private\plotConfig.m");
monkeys = ["XX", "CC"];
alphaVal = 0.05;
windowStat = [0, 350]; % ms
exampleCh.XX.AC = 38;
exampleCh.XX.PFC = 47;
T = 10e3; % ms, kept for compatibility with... |
87953095d556da71b26f952f753119e8e6bab198475fcd1c7c74cbbc801929cc | MATLAB | 19,319 | 533 | function PROV = LaBGAScore_prov_snapshot(varargin)
%
%
% *USAGE*
%
% Records exactly which version of every dependency was in place at the
% moment an analysis script ran, and writes that record next to the
% script's results.
%
% The problem it solves: LaBGAS analysis scripts are copied into a study's
% code subdatase... |
fe37c6ba732d0cab9105f246bc56a828fc559dd82344e3abdb411ebe45a8bad5 | MATLAB | 19,397 | 467 | function [spindlesAll, spindleSummary, segms, params] = fun_sleep_spindles(data, chans, srate, varargin)
% Sleep spindle detection. Automatically detect sleep spindles in
% multichannel data using a wavelet-based detection method.
%
% Required inputs:
%
% data: A channel x timepoints array
%
% chans: cell {1xn} with t... |
641608b01c0b4a394f6748f62257d70a0ee6a7964a2e6c8798aac9861b9dab11 | MATLAB | 19,418 | 544 | function [At,b,c,K,prep,origcoeff] = pretransfo(At,b,c,K,pars)
% [At,b,c,K,prep] = pretransfo(At,b,c,K)
%
% PRETRANSFO Checks data and then transforms into internal SeDuMi format.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
% Nearly complete rewrite for SeDumI 1.4
% Copyright (c) 2013 ... |
b80cfea5d1bdaa61607c979f5d94f9cecc5dc089d8f791b354b48a716c1cb1ce | MATLAB | 19,451 | 526 | % writecnt() - Write a Neuroscan continuous signal file.
%
% Usage:
% >> writecnt(filename, CNT-dataset, varargin)
%
% Inputs:
% filename - name of the file with extension
% dataset - name of the CNT-dataset, a structure with the following fields
% cntdataset.header
% cntdata... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.