sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
071b54b18cbc62bc3c300f4b0f2c6899d00c81d806fea4d3c6986d339f661209 | MATLAB | 21,396 | 552 | 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... |
35b301cec27105ad2ec530204c4628fa8ffe22cf7d5414adb29785f25f8f1125 | MATLAB | 21,444 | 489 | % DIPOLEDENSITY - compute and optionally plot a measure of the 3-D spatial
% (in)homogeneity of a specified (large) set of 1- or 2-dipole
% component models, either as physical dipole density or as
% dipole-position entropy across subjects. In either case,
% ... |
750ac91e62d17ff536ee0f63668f9f041c719cda2de97313b267d2a0e5401da1 | MATLAB | 21,451 | 508 | % BOOTSTAT - accumulate surrogate data to assess significance by permutation of some
% measure of two input variables.
%
% If 'distfit','on', fits the psd with a 4th-order polynomial using the
% data kurtosis, as in Ramberg, J.S., Tadikamalla, P.R., Dudewicz E.J.,
% ... |
de7c01432a834fcda506ae4fcf80de21daf2a126efb64640a6e8de7ec7f92d91 | MATLAB | 21,463 | 574 | function varargout = preprocWavelets_grid(S, params)
% Usage: [Spreproc, params] = preprocWavelets_grid(S, params);
%
% A script for preprocessing of stimuli using a Gabor wavelet basis set
%
% INPUT:
% [S] = A X-by-Y-by-T matrix containing stimuli (movie);
% range of images will a... |
3f92903f37829add22d04147ad4d2e4486df3a014fab689b1c0650478246d92f | MATLAB | 21,549 | 459 | % fit_makeBasis.m
% Georg Oeltzschner, Johns Hopkins University 2019.
%
% USAGE:
% [BASIS] = fit_makeBasis(folder, addMMFlag, sequence, editTarget)
%
% DESCRIPTION:
% Generates a basis set in FID-A structure. The code will search all *.mat
% files in the input folder for FID-A structures with simulated spectra. It
% a... |
74c2ef44623aaba09864d5341ecfa0d8a334f035b75dbf94b883514b8493675f | MATLAB | 21,670 | 554 | function varargout = WhiteFun(varargin)
% WHITEFUN M-file for WhiteFun.fig
% WHITEFUN, by itself, creates a new WHITEFUN or raises the existing
% singleton*.
%
% H = WHITEFUN returns the handle to a new WHITEFUN or the handle to
% the existing singleton*.
%
% WHITEFUN('CALLBACK',hObject,eventDa... |
a5ee8b5cc287ce8bdb83d9c88444657c546ca81dc7086bed0adacc9d9fd68b92 | MATLAB | 21,716 | 421 | function state = asr_calibrate_r(X,srate,cutoff,blocksize,B,A,window_len,window_overlap,max_dropout_fraction,min_clean_fraction,maxmem)
% Calibration function for the Artifact Subspace Reconstruction (ASR) method.
% State = asr_calibrate(Data,SamplingRate,Cutoff,BlockSize,FilterB,FilterA,WindowLength,WindowOverlap,MaxD... |
befe759d715f4dc3b54cab4507c14b57a1c06c319c988e4a6f910a58b7d2e06e | MATLAB | 21,788 | 732 | function coactPaper_figureS08()
labelWeight=true;
labelCase=false;
labelSize=9;
letGapX=5;
letGapY=6;
fontsize=6;
close all
fh=initFig('width',18.6,'height',5.5+0.5,'font','Arial','fontsize',fontsize);
x=14;y=5;
panel_01(x,y,fontsize);
panelLetter2(x-letGapX-4,y-letGapY+3,alphabet(1,labelCase),'fontSize',labelSize,'... |
a4c3f4f015e280badb182a34679ddc8232549c348e2ced5f164df0bfc7282661 | MATLAB | 21,797 | 445 | function [C2,cfg] = mahal_multiclass_trialwise_xgen(dat,labels,task,cfg)
% [C2,cfg] = mahal_multiclass_trialwise(dat,labels,task,cfg)
% authors: M Stokes, E Spaak, N Myers
if nargin < 2
help mahal_multiclass_trialwise_xgen
error('missing input arguments!')
end
ntrl = size(dat,1); % number of ... |
5928ffe65237cdb3006f19cacd7c8e5751de05397a59c3380a03d03c32156f95 | MATLAB | 21,807 | 492 | function env_startup(varargin)
% Start the BCILAB toolbox, i.e. set up global data structures and load dependency toolboxes.
% env_startup(Options...)
%
% Does all steps necessary for loading the toolbox -- the functions bcilab.m and eegplugin_bcilab.m
% are wrappers around this function which provide a higher level o... |
281ea6e031aa5fab9764f4f657805df2f21e6d77620e1deb231374cbdcfa9cc7 | MATLAB | 21,897 | 540 | function [map,num,typ] = brewermap(N,scheme)
% The complete selection of ColorBrewer colorschemes (RGB colormaps).
%
% (c) 2014 Stephen Cobeldick
%
% Returns any RGB colormap from the ColorBrewer colorschemes, especially
% intended for mapping and plots with attractive, distinguishable colors.
%
%%% Syntax (basic):
% ... |
17650513f11ea0e36977ed1306b240ddea1905f72d60fbc8065cc514706dd728 | MATLAB | 21,900 | 436 | % teststat - EEGLAB statistical testing function
%
% Statistics are critical for inference testing in Science. It is thus
% primordial to make sure than all the statistics implemented are
% robust and at least bug free. Statistical function using complex
% formulas are inherently prone to bugs. EEGLAB functions are a... |
238f436e735b26b345c28acaf5578b756b084d0fecbc278c1ba7b4139fc41a16 | MATLAB | 21,903 | 567 | function rsa_save_gii(this,filename,encoding)
% Save GIfTI object in a GIfTI format file
% FORMAT save(this,filename)
% this - GIfTI object
% filename - name of GIfTI file to be created [Default: 'untitled.gii']
% encoding - optional argument to specify encoding format, among
% ASCII, Base64Binary, G... |
9e573c9c21eb3d992ba6213795f83b1b3ead0ce3c2918d7d63a98b0df706d06c | MATLAB | 21,947 | 510 | %% χ-separation Tool
% This tool is MATLAB-based software forseparating para- and dia-magnetic susceptibility sources (χ-separation).
% Separating paramagnetic (e.g., iron) and diamagnetic (e.g., myelin) susceptibility sources
% co-existing in a voxel provides the distributions of two sources that QSM does not p... |
7288f0ec69a4e8d180dde6c0218d670f7c3a1cb3b2ab47129c8ac0d3992a0b20 | MATLAB | 21,976 | 684 | % TOPOIMAGE - plot concatenated multichannel time/frequency images
% in a topographic format
% Uses a channel location file with the same format as TOPOPLOT
% or else plots data on a rectangular grid of axes.
% Click on individual images to examine separately.
%... |
a3b308ff778a1afe0d25bfbbd6361db0c666ed6e43ee4531475c091bbc814b15 | MATLAB | 21,986 | 361 | function osp_phaseProWindow(gui)
%% osp_phaseProWindow
% This function updates the process tab for manual phasing.
%
%
% USAGE:
% osp_updateProWindow(gui);
%
% INPUT:
% gui = gui class containing all handles and the MRSCont
%
%
% AUTHORS:
% Dr. Helge Zoellner (Johns Hop... |
2588a381e3ba58b76756bb6ce3a392869cd702b38a560ed0d7f0eb612375a78e | MATLAB | 21,987 | 407 | %% Reminder ---------------------------------------------------------------
% 1. update Fall.mat in GUI (version 0.6.14)
% 2. load Fall.mat into workspace (update 25.04.22: now automatic)
% 3. give pathname the folder containing .sbx, .mat and .ephys data
% 4. give saving name and other parameters in User setting ... |
ea38e1c5833d18b749abcca4d42ded342ab3a0ac3be9cc4654c399b77551053d | MATLAB | 22,026 | 426 | function state = asr_calibrate(X,srate,cutoff,blocksize,B,A,window_len,window_overlap,max_dropout_fraction,min_clean_fraction,maxmem)
% Calibration function for the Artifact Subspace Reconstruction (ASR) method.
% State = asr_calibrate(Data,SamplingRate,Cutoff,BlockSize,FilterB,FilterA,WindowLength,WindowOverlap,MaxDro... |
176b03bcc136b74353b47dd8e0cf3f5bcd7e0bd406308248e532c2bed2d7fc97 | MATLAB | 22,034 | 734 | %%
clear;
working_dir = 'G:\CEST-fMRI'; % the actual directory to put the codes
SPM_modified_path = [working_dir,'\scripts\SPM_modified'];
addpath(SPM_modified_path);
BM_sim_path = [working_dir,'\scripts\simulation\CEST_coef'];
addpath(BM_sim_path);
ds_dir = [working_dir,'\datasets\sim\exp3']; % directory ... |
96b58d00aa1df8ffc1daa873f9f6cdcf3e96c6344b8c50b12ff8bad4787e604b | MATLAB | 22,225 | 665 | function [counts,indices] = RadialMaze(data,baitedArms,varargin)
%RadialMaze - Compute simple statistics for the 8-arm radial maze task.
%
% Compute the number of reference and working memory errors, rewards found, etc.
%
% USAGE
%
% [counts,indices] = RadialMaze(data,baitedArms,<options>)
%
% data li... |
38589734a6a1be6fa1644740527b7d18b4f347b6767c854a61497d0cb5b781cc | MATLAB | 22,286 | 553 | function TWIXDeIdentify(fnames)
%% TWIXDeIdentify(fnames)
% Reads Siemens TWIX files (*.dat) and removes participant information. New
% de-identified TWIX files are then output, with filenames appended with
% '_noID'. The original files are not overwritten.
%
% If TWIXDeIdentify has already been run, and de-... |
9578a4b5adeb5b24c9d2d1079f1c97ea1a199864944c7c2bfd9f60f956b68024 | MATLAB | 22,309 | 286 | function [MRSCont] = osp_import_LCModel_spectra(MRSCont)
%% Get sequence type
if MRSCont.flags.isUnEdited
name = 'off_A';
end
PathName = uipickfiles('FilterSpec',MRSCont.outputFolder,'REFilter', '\','NumFiles',1,'Prompt','Select the folder containing all LCModel .coord-files.');
PathName = PathName{1};
d1 = dir(... |
1c32b7050aac24555c3904a51dee14f501594bb60b6753529207ea8aa3efac57 | MATLAB | 22,311 | 468 | function out = SP_Specparam(y, aperiodicMode, maxNPeaks, peakThreshold, peakWidthLimits, segLength, maxSegments)
% SP_Specparam Separates the power spectrum into aperiodic (1/f) and periodic (oscillatory) components
%
% Parameterizes the power spectrum as a smooth aperiodic '1/f' background
% plus a small number of G... |
8567609c2072c8cd2993b45fcae8a69a4d5167538f4b222373016a042f36892a | MATLAB | 22,396 | 499 | function TS_Compute(parallelHow,ts_id_range,op_id_range,computeWhat,customFile,howVocal,beVerbose,autosaveEvery)
% TS_Compute Computes missing elements of TS_DataMat
%
%---EXAMPLE USAGE:
% TS_Compute;
%
%---INPUTS:
% parallelHow: how to use Matlab's Parallel Computing Toolbox:
% 'none' (default):... |
e407b2467a857bc3aa6256cba8ab3d40732f0ba74c9049739fb1bb43293e11e8 | MATLAB | 22,451 | 431 | function varargout = anovabox(data,groups,varargin)
%anovabox - Plots box-and-whisker plot for each group
%
% Plots box-and-whisker plot for each group, indicating significant
% differences between the groups. Each group is also tested against 0.
% For non-parametric data, median +/- standard error of the median... |
243e0a7b7e6ef155e5aaa196bac72cf2d26966d6bf29c91e40e021917ef4663d | MATLAB | 22,460 | 512 | function TOL_fig_stats2(config,params,dat)
% TOL_fig_stats2, comparisons testing what the sunburst maze actually measures
% Figure 4 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 of Neuroscience... |
3fc95be48c29edfd2e7f78bd7f79ba82edf5797cf6c8d58a121472168adb57bb | MATLAB | 22,463 | 276 | function osp_iniProcessWindow(gui)
%% osp_iniProcessWindow
% This function creates the initial processed window in the gui.
%
%
% USAGE:
% osp_iniProcessWindow(gui);
%
% INPUT: gui = gui class containing all handles and the MRSCont
%
% OUTPUT: Changes in gui parameters and MRSCont are writt... |
d7130afea9c7548a3fb98579afabaa9814376a1b53af4f950fcb42344d651bf1 | MATLAB | 22,478 | 437 | % PAC - compute phase-amplitude coupling (power of first input
% correlation with phase of second). There is no graphical output
% to this function.
%
% Usage:
% >> pac(x,y,srate);
% >> [coh,timesout,freqsout1,freqsout2,cohboot] ...
% = pac(x,y,srate,'key1', 'val1', 'key2', val2'... |
05927ebaa45e5311802e4f909bc9fede4f75e5fbae23c3827e0d09e15cb75d23 | MATLAB | 22,488 | 516 | %%Extract features other than FF using SAT.
audio_path_prefix="F:\songs\org003\";
basepath="J:\Dreadd\org003\230930-231117\sap\";
csvFiles = dir(strcat(basepath,"syllable_features*.csv"));
%Do this as needed
load('SAT_params.mat')%Ensure the appropriate path is added
hop=SAT_params.FFT_step;
SAT_params.pitch_met... |
04e99577d64887053c3265af55b82aab26e05fe2b568fa035dd2b75701a8081a | MATLAB | 22,505 | 599 | function varargout = BrainNet_MergeMesh(varargin)
%BrainNet Viewer, a graph-based brain network mapping tool, by Mingrui Xia
%Function to merge two hemisphere files into one
%-----------------------------------------------------------
% Copyright(c) 2017
% State Key Laboratory of Cognitive Neuroscience and Learning, Be... |
8feee29090b56b3c268cb8c29e6e24126a77fda2f9634096b3a9245e24b95f09 | MATLAB | 22,514 | 745 | function coactPaper_figureS01()
labelWeight=true;
labelCase=false;
labelSize=9;
letGapX=6;
letGapY=5;
fontsize=6;
close all
fh=initFig('width',18.6,'height',12,'font','Arial','fontsize',fontsize);
x=8;y=4;
panel_01(x,y,fontsize);
panelLetter2(x-letGapX,y-letGapY+5,alphabet(1,labelCase),'fontSize',labelSize,'isBold',l... |
17d57954d667558c72b36ffaa3c5c44b76de299eb405ba9975ea16e84f3581c0 | MATLAB | 22,716 | 543 | function [estimations,actual,errors,average,lambda] = ReconstructPosition(positions,spikes,windows,varargin)
% Bayesian reconstruction of positions from spike trains.
%
% Instantaneous positions are reconstructed using a Bayesian algorithm.
% Instantaneous population firing rates can be estimated either over fixed tim... |
adfc9a6d700bee4112a75d7bafcf9ac7035118ee831e26d05f20c45e794cd98a | MATLAB | 22,773 | 564 | function [cameraParams, imagesUsed, estimationErrors] = estimateCameraParametersPar(varargin)
%estimateCameraParameters Calibrate a single camera or a stereo camera
%
% [cameraParams, imagesUsed, estimationErrors] =
% estimateCameraParameters(imagePoints, worldPoints) estimates intrinsic,
% extrinsic, and distort... |
3eaece7d4ab6bace3dbb329dcb494e18c6c7a2f263c51532fa2fdbd2378c9e00 | MATLAB | 22,803 | 743 | function [B,map] = nanimresize(varargin)
% nanimresize resizes an image using the Image Processing toolbox function
% imresize, but first fills NaNs to prevent missing data along NaN boundaries.
%
%% Requirements
% This function requires Matlab's Image Processing Toolbox. This function
% includes John D'Errico's inp... |
03af8ff1e6e5083c70027d05aaa5fab323971e9c65041347f9cf1cb58d169c53 | MATLAB | 22,822 | 588 | 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)
% or
% [flag] = ft_senstype(sens, desired)
%
% The output type can be any of the following
% 'c... |
88b6a712a0c5c5060829c8ede5f0e2741c155099cc3b476cfd58445a0e4cc139 | MATLAB | 22,873 | 552 | function varargout = readCMRRPhysio(varargin)
% -------------------------------------------------------------------------
% readCMRRPhysio.m
% -------------------------------------------------------------------------
% Read physiological log files from CMRR MB sequences (>=R013, >=VD13A)
% E. Auerbach, CMRR, 2015-202... |
685efca94057f824d4e347e1ac13483d655c019ff282481528d04cb39409d985 | MATLAB | 22,933 | 657 | function readsett = inifile(fileName,operation,keys,style)
%readsett = INIFILE(fileName,operation,keys,style)
% Creates, reads, or writes data from/to ini (ascii) file.
%
% - fileName: ini file name
% - operation: can be one of the following:
% 'new' (rewrites an existing or creates... |
234864f0535968376a9f86f3db52a866a29af9d61258da0500db9b869d218f01 | MATLAB | 23,067 | 531 | function plot_reduced_rank_regression_and_communication_subspace
close all
clear all
clc
% Plot results of reduced-rank regression and communication subspace.
% Select a folder containing data.
folder_name = uigetdir;
cd(folder_name)
% Control.
load('population_regression_control.mat')
optDimLambdaReducedRankRegress... |
bdfa1af29cb8dac7d3a0ff768124b8789e63f39b043bb716853c853bea8026c2 | MATLAB | 23,103 | 405 | % STUDY - studyset structure containing some or all files in ALLEEG
% measure - Measure to display. One from: {'daterp','datspec','icaerp','icaspec'}
% dataflag - [1|0] Flag for 'data' or 'limoresults' respectively
% level - [1|2] Level of analysis to plot. [1] Single subject
% ... |
9a833d30129ba26cf538cbd0ed23a4ae1947b8f2cc2dd1ffc817daaff846f2e8 | MATLAB | 23,112 | 580 | %% AnalyzeFineDistanceData
basePath = 'D:\Data\Lobster\FineDistanceResult_syncFixed_June';
behavDataPath = 'D:\Data\Lobster\BehaviorData';
filelist = dir(basePath);
sessionPaths = regexp({filelist.name},'^#\S*.mat','match');
sessionPaths = sessionPaths(~cellfun('isempty',sessionPaths));
load("Apparatus.mat");
px2cm ... |
84653e0c3e1aa43ffa72e37a416db22d6ab20a70625234ff1b24bf5c17eed932 | MATLAB | 23,149 | 413 | function res=woe_corr(res,i)
%for i=1:length(res.CATMoS_VT_pred)
M=zeros(5,7);
W=zeros(5,7);
AD=zeros(5,7);
ADi=zeros(5,7);
Cfi=zeros(5,7);
if res.CATMoS_VT_pred(i,1)==1
M(1,1:2)=ones(1,2);
W(1,1:2)=repelem((res.AD_index_VT(i,1)+res.Conf_index_VT(i,1))*res.AD_VT(i,1)/2,2);
AD(1,1:2)=repe... |
2a5a1e5d13a9e9aa71ba212e1e351b711ba056bf920d2b72a7759bbefb652324 | MATLAB | 23,218 | 491 | % op_validateniimrs.m
% Georg Oeltzschner, Johns Hopkins University 2024.
%
% USAGE:
% op_validateniimrs(nii_file);
%
% DESCRIPTION:
% Validates a FID-A struct similar to the 'nifti_mrs/validator' class by
% William T. Clarke (https://github.com/wtclarke/nifti_mrs_tools/blob/master/src/nifti_mrs/validator.py)
%
% Requ... |
f82dbdd6a4e5add5d716223363d5ebbef9d7fa7835b801b4343b55716bfde5fe | MATLAB | 23,243 | 288 | function osp_updateLoadWindow(gui)
%% osp_updateLoadWindow
% This function updates the load tab.
%
%
% USAGE:
% osp_updateLoadWindow(gui);
%
% INPUT:
% gui = gui class containing all handles and the MRSCont
%
%
% AUTHORS:
% Dr. Helge Zoellner (Johns Hopkins University, 2020-01-16)
% ... |
c0741b8a2d0470b18212746b54221becf1dda3f1e65db02d36e3ae69e272fe99 | MATLAB | 23,294 | 532 | function varargout = process_gedai( varargin )
% PROCESS_GEDAI: Wrapper for GEDAI.m function to be used in Brainstorm
%
% USAGE: sProcess = process_gedai('GetDescription')
% sInput = process_gedai('Run', sProcess, sInput)
% [Generalized Eigenvalue De-Artifacting Intrument (GEDAI)... |
6186d145dd5d5b9cfb0e1a7e19e186ef331440ec936310654585a615ff1c870a | MATLAB | 23,337 | 436 | function RSNregression(InputFile, InputVNFile, Method, ParamsFile, OutputBeta, varargin)
optional = myargparse(varargin, {'GroupMaps' 'tICAMM' 'VAWeightsName' 'VolInputFile' 'VolInputVNFile' 'VolCiftiTemplate' 'OldBias' 'OldVolBias' 'GoodBCFile' 'VolGoodBCFile' 'SpectraParams' 'OutputZ' 'OutputZMM' 'OutputVolBeta' ... |
2d08c6edd339ff82e3b3aef748a3088331ef4525ac9e32a6d844b7249ba92dad | MATLAB | 23,386 | 488 | function [M_final,shifts_g,template,options,col_shift] = normcorre_batch(Y,options,template)
% online motion correction through DFT subpixel registration
% Based on the dftregistration.m function from Manuel Guizar and Jim Fienup
% INPUTS
% Y: Input data, can be already loaded in memory as a 3D
% ... |
abf39065835f44ea3074fb71814458ac78159893783d339df0b7e83e9d08d170 | MATLAB | 23,489 | 619 | function [input] = ft_apply_montage(input, montage, varargin)
% FT_APPLY_MONTAGE changes the montage (i.e. linear combination) of a set of
% electrode or gradiometer channels. A montage can be used for EEG rereferencing, MEG
% synthetic gradients, MEG planar gradients or unmixing using ICA. This function not
% only ap... |
175083321cc01cf1b1f23e468b2814ee99e577b1d7e4547f6d1eedaff828ab35 | MATLAB | 23,503 | 558 | %% Neural Rejuvenation Hypothesis - Population Model (Publication Quality)
% This model demonstrates the key concepts of neural rejuvenation in addiction
% at the population level for scientific publication
clear all; close all; clc;
%% Simulation Parameters
dt = 0.1; % Time step (arbitrary ... |
697e6eee6c223dbb5ad519a89e55d8e39d051866e8eff5f118577a7519ed7e82 | MATLAB | 23,505 | 595 | function figureHandle = StandardisedNetworkPlot(adjM, coords, edge_thresh, z, zShortForm, plotType, FN, pNum, ...
Params, lagval, e, figFolder, figureHandle, saveFigure, cellTypeMatrix, cellTypeNames)
% Plot the graph network
% Parameters
% ----------
% adjM : N x N matrix
% adjacency matrix
% coords :... |
a9e08c164a83b79914b7f56627c49f15b27572102c64dcacbd20591f8e8d8694 | MATLAB | 23,578 | 535 | function Sharpening_Dynamics(GenPlots,ProcData_FamIT1,ProcData_FamIT2,ProcData_FamHC1,ProcData_FamHC2,ProcData_LureIT1,ProcData_LureIT2,ProcData_LureHC1,ProcData_LureHC2,HC_Fam_FV,HC_Lure_FV,IT_Fam_FV,IT_Lure_FV,Population)
% This function plot sharpening dynamics over time as well as plots
% individual time slices a... |
a55f331bb45fcbb489bd7c85fb39184ff2d6ba42ca356561f970ca7feef7f1bd | MATLAB | 23,592 | 502 | classdef McsAnalogStream < McsHDF5.McsStream
% Holds the contents of an AnalogStream.
%
% Important fields:
% ChannelData - (channels x samples) array of the sampled data.
% Samples are given in units of 10 ^ Info.Exponent
% [Info.Unit]
%
% Cha... |
2410997552dd74ba2cdfa050204618533210915d20fe80d960261fba39ba3401 | MATLAB | 23,707 | 492 | % 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, April ... |
39efce6485f4b403c0afcb95afd52647b350608c1612eea4bd7c45954f067315 | MATLAB | 23,784 | 585 | function [NLL,evidence,ops,wML,wML_cov,hyperparam,paramav] = fun_glmfit(ops,varargin)
%core worker function to fit GLMS
%updated version
%
%inputs:
% ops: data structure containing all important aspects of training
%ouputs:
% NLL: negative log likelihood of optimal solution
% evidence: value of evidence, useful f... |
370c18735386912a49603d401f3665d282d8632a89d5d1a9ec6f3d9a75636fb7 | MATLAB | 23,787 | 361 | % pop_taskinfo() - BIDS task information
%
% Usage:
% EEG = pop_taskinfo(EEG);
%
% Inputs:
% EEG - EEGLAB dataset or group of dataset
%
% Optional input:
% 'default' - generate BIDS event info using default values without
% popping up the GUI
%
% Authors: Arnaud Delorme, Dung Truong SCCN, INC,... |
7bd00b0f21d970def2cd3bdd660261e449d3b818070a1a9bc08e58d509a898cd | MATLAB | 23,796 | 441 | function ITIbyBlock = ITIbyBlock_dox_stages(ratlist,...
lentirats, DoxBeh)
%input:
%ratlist = dox rats (e.g. {'G067', 'G069', 'G076'})
%project = shEsr1 or control
%% GET DATA
%settings
% twin = 18;
twin = 40;
smoothfactor = 15;
nback = 7;
prctile_cutoff = 99;
cycle = {'Proestrus', 'Diestrus'};
cyclenames = cycle;... |
69cb586e7ac22de159e0630b2ecc3b9bcc54f48b5846a5e72723492b6268b1c1 | MATLAB | 23,908 | 568 | %% TO DO !!! ms SEI suppl. fig: PSD & MVAR spectra (S)
% TO DO: remove the discrepency !!!
% works for two NN: DMN & DAN
% loads EC results (for 17 subjects with at least 5 signif. channels in the FBs)
% loads PSD results for the same subjects & channels
% FIGURE
% cols = FBs (delta, ..., hiGamma)
% rows =
% - PSD
% ... |
a482ea98f9d1b44e662e5324010398038f43e5a40852f9b540a53328f619ac31 | MATLAB | 23,909 | 474 | function statsTable = doStats(recordingLevelData, tableType, Params)
%DOSTATS Summary of this function goes here
% Detailed explanation goes here
% statsTable : table
% recording/node level metrics table with statistical results
uniqueLags = unique(recordingLevelData.Lag);
% Look at how the example logitudi... |
c44b4db78b844e9ac19406bb4f1fc9a3ee86443f6c13dac472856b2dd8f1f7fe | MATLAB | 23,978 | 278 | function computeRecleanFeatures(StudyFolder, ...
Subject, ...
fMRIListName, ...
hp, ...
Resolution, ...
CorticalParcellationFile, ...
... |
67fb7a49011c59e60637c3f1fde5377b3c925cdcf211d94d9da337a2955ee3da | MATLAB | 23,983 | 522 | % open window of FOV which allows to zoom and pan and select neurons
% manually ('f' for freehand) or automatically ('x' for
% crosscorrelation-based). Areasize can be chosen with the numbers 1-9 and
% 0; 'd' allows to delete a ROI; qwerty allow to switch between differents
% modes of presentation of the FOV.
function ... |
3cb8079e03c2e81a5c78f3646623c05185d31fd35ef5eaaa03621ca3d0047b5e | MATLAB | 24,025 | 624 | % POP_VIEWPROPS See common properties of many EEG channel or component
% Creates a figure containing a scalp topography or channel location for
% each selected component or channel. Pressing the button above the scalp
% topopgraphies will open pop_prop_extended for that component or
% channel. If pop_viewprops... |
a0eab8ee8b7e9bb734f5c632d6fc4cb48345513df247672c010bed429c472ebe | MATLAB | 24,100 | 601 | function preprocess_nsd_calculatetransformations(subjix,mode)
% function preprocess_nsd_calculatetransformations(subjix,mode)
%
% <subjix> is 1-8
% <mode> is
% 1 means EPI to ANAT
% 2 means ANAT to EPI
% 3 means ANAT to SURF
% 4 means FSAVERAGE TO SURF
% 5 means SURF TO FSAVERAGE
% 6 means ANAT to MNI
% ... |
475358dfc23235410610d360d6367666ebf0271388dbbe82dbf627ec38fd4fe6 | MATLAB | 24,104 | 633 | function r = tapas_fitModel(responses, inputs, varargin)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is the main function for fitting the parameters of a combination of perceptual and
% observation models, given inputs and responses.
%
%%%%%%%%%%%%%%%%%%... |
60b735a3995a56ae333c51f50f7f61d1f73d45e3c03be0da8bb884cb83b0c4a9 | MATLAB | 24,146 | 748 | %% Load all rat data
datpath = 'C:\Users\mld9131\Documents\GitHub\Papers\MLD\Figure1\Data';
load(fullfile(datpath,'ratList.mat'));
%datapath = 'path to the S structs'; %path to the Sstructs;
WT = struct;
[WT.high, WT.low, WT.mixed] = deal(nan(length(ratList), 5));
% Process each rat's data
for rr = 1:length(ratList)... |
0333e8cee023c58c53e5f3dd2f358225ce2834cf37a64675b029b44aebd56e89 | MATLAB | 24,154 | 552 | % STD_SPEC - Returns the data or 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 ... |
c8fc45673b40afac85572d7712b74e0315b68ed012d0d768722c8e1b28a07f87 | MATLAB | 24,282 | 583 | function c = multiprod(a, b, idA, idB)
% Multiplying 1-D or 2-D subarrays contained in two N-D arrays.
%
% C = MULTIPROD(A,B) is equivalent to C = MULTIPROD(A,B,[1 2],[1 2])
% C = MULTIPROD(A,B,[D1 D2]) is eq. to C = MULTIPROD(A,B,[D1 D2],[D1 D2])
% C = MULTIPROD(A,B,D1) is equival. to C = MULTIPROD(A,B,D1,D1)
... |
dc9ed61305fb1d7a78ce274c7501fc06c8645c4f4c0e9cec5ed3bdc30e968d79 | MATLAB | 24,311 | 494 | function varargout = anovabar(data,groups,varargin)
%anovabar - Plots bars of the mean +/- s.e.m. for each group
%
% Plots bars of the mean +/- s.e.m. for each group, indicating significant
% differences between the groups. Each group is also tested against 0.
% For non-parametric data, median +/- standard error... |
034632e56bea6b0383fcff6422a702aef9d7b34bcb7a2172c34d20ecda1798e1 | MATLAB | 24,328 | 726 | function varargout = legendflex(varargin)
%LEGENDFLEX Creates a more flexible legend
%
% legendflex(M, param1, val1, ...)
% legendflex(h, M, param1, val1, ...)
% [legend_h,object_h,plot_h,text_str] = legendflex(...)
%
% This offers a more flexible version of the legend command. It offers a
% different method of posit... |
cc8540b7ae03e51d0172977f7e6296a8fc5b980668c051650b8a145495c22d23 | MATLAB | 24,365 | 390 | % POP_REJMENU - Main menu for rejecting trials in an EEG dataset
%
% Usage: >> pop_rejmenu(INEEG, typerej);
%
% Inputs:
% INEEG - input dataset
% typerej - data to reject on (0 = component activations;
% 1 = raw electrode data). {Default: 1 = reject on raw data}
%
% Author: Arnaud Delorme, C... |
2f83425d07c97e87045b30701294ff9e8b31cd083c206dc7d976c4612d096c83 | MATLAB | 24,376 | 626 | function varargout = tapas_uniqc_slider4d(varargin)
% provides interactive movie & slider frame plot capability for 3D-data and arbitrary plot functions
%
% tapas_uniqc_slider4d(Y, handlePlotFunction, nSli, yMin, yMax)
%
% IN
% Y [nX,nY, nSlices, nDynamics] - will be transformed into 3D
% ... |
164f3e52ab82605915d370ad50b0ee2271df30d6ed2590883e11cfa6153584af | MATLAB | 24,447 | 590 | function count = cprintf(style,format,varargin)
% 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 SPRINTF and FPRINTF functions.
... |
cca65eecdd238ea7c81d938f3e00793a37e02d58aacf8d3210c7a24a5435453e | MATLAB | 24,475 | 619 | %% ########################################################################
% sideProject4_1_2_detect_HFO_varying_exp.m
% #########################################################################
% Creates simulated data with varying spectral expone... |
b53ca19456b045c7dcaf08405457ab3aa90cf89efefae0dcf580d50bfc8bad17 | MATLAB | 24,485 | 527 | % POP_STUDYWIZARD - browse for dataset to create an EEGLAB STUDY
%
% Usage:
% >> [ STUDY ALLEEG ] = pop_studywizard; % create new study interactively
% >> [ STUDY ALLEEG ] = pop_studywizard( 'key', 'val', ...); % edit study
%
% Optional Inputs:
% All "'key', 'val'" inputs of STD_EDITSET may be used.
%
% Outputs:
... |
04f28bfb7f7a1a75e54586ea9ed7e0b1ea0877201d0627877fa1873789ddc79b | MATLAB | 24,518 | 637 | function [sens] = ft_read_sens(filename, varargin)
% FT_READ_SENS read sensor positions from various manufacturer specific files. See
% further down for the list of file types that are supported.
%
% Use as
% elec = ft_read_sens(filename, 'senstype', 'eeg', ...) % for EEG electrodes
% grad = ft_read_sens(filename... |
177dd5c71ee09d1fc18e954151d288033f6977e2f7b701d4e7e35d7ccf1d3b4a | MATLAB | 24,571 | 582 | % # (JM) MODIFIED FROM ORIGINAL FUNCTION 'FindAssemblies'
function [assembliesCells, matchIndexTimeSeries, matchIndexTimeSeriesSignificance, assembliesVectors, PCsRot,confSynchBinary]=FindAssemblies( filenameRASTER , opts )
% # clear all
%%
% # %%%%%% INPUT FILES
% # [filename,pathname] = uigetfile({'*_RASTER.mat';'*_... |
887cab2b2df7012e0e00f8129943d1d610b463b5251a071d2553b50606a63864 | MATLAB | 24,577 | 609 | clear;
%cd(fileparts(matlab.desktop.editor.getActiveFilename));
%% Requirements
% 1: have a GPU
parallel.gpu.enableCUDAForwardCompatibility(true);
gpuDevice() % must see the GPU info by gpuDevice()
% 2: Download onnxconverter Add-on, and then install it.
% Deep Learning Toolbox Converter for ONNX Model Format (https:/... |
84d8f9aee82583bbae0fc2c688509e58ed689fae123c56d32cd2a14fe06955c0 | MATLAB | 24,636 | 554 | % POP_COMPERP - Compute the grand average ERP waveforms of multiple datasets
% currently loaded into EEGLAB, with optional ERP difference-wave
% plotting and t-tests. Creates a plotting figure.
% Usage:
% >> pop_comperp( ALLEEG, flag ); % pop-up window, interactive mode
% >... |
985775fc566219f9b5c2e807817c3be015b06fb62e65cb0cbc748e732b1dacb7 | MATLAB | 24,651 | 492 | % STD_ERPPLOT - Command line function to plot STUDY cluster component ERPs. Either
% displays grand mean ERPs for all requested clusters in the same figure,
% with ERPs for different conditions (if any) plotted in different colors.
% Else, displays ERP for each specifi... |
df94bb0c072978cb76900e3cee4bbc03855fd40325289004775041e20c3efe49 | MATLAB | 24,662 | 615 | function [varargout] = fMRISearchlight(fullBrainVols, binaryMasks_nS, models, betaCorrespondence, userOptions)
%
% fMRISearchlight is a function which takes some full brain volumes of data,
% some binary masks and some models and perfoms a searchlight in the data within
% each mask, matching to each of the models. Sav... |
dfb8edf37f5a83f5379082b5d3fc62090d4e15e152f17fea9f823ad39c12cb5a | MATLAB | 24,701 | 880 | function varargout = spm_prf_analyse_JS(mode,varargin)
% Runs a PRF analysis
%
% Examples and default settings
%
% -------------------------------------------------------------------------
% Specify an analysis:
%
% PRF = spm_prf_analysis('specify', SPM, xY, U, options);
%
% Where:
%
% SPM - filename of the subject's S... |
ebd23e0ac61fa249229239b0a39a072c2ea4411a7b2e315a1db68072c11fc3c4 | MATLAB | 24,769 | 683 | function [res, diagOut] = catmos_conf_index_adjuster_v10(res,i,CATMOS,neighborsIDs,neighborsW,varargin)
%CATMOS_CONF_INDEX_ADJUSTER_V10 Post-WoE neighbor-based Conf_index adjustment.
%
% Design requested in V8/V9/V10:
% The final confidence is a weighted blend of:
% BaseConf = existing res.Conf_inde... |
88540251b959a5d97f8a460021becb14d6afb3587ae92e31ca98247790cf1cbc | MATLAB | 24,801 | 649 | function [WTbyBlock, pval_rats] =...
WTbyBlock_stages(f_ratlist, RatBehaviorData)
%This function plots wait times by block for single rats and over the
%population. It then averages and normalizes the wait times by block to low the third reward per rat.
%Finally, it plots each rat's wait time by stage and block and... |
f3946aea07a250453611d7fa9b3dbd6a7877f5b3978e8c16c58eca38f1a0c7ae | MATLAB | 24,801 | 475 | function [pinfo] = conn_getParcInfo(parcs,ppath,seg)
% loads look-up-table & conte69 labels by parcellation to get relevant info
%
% Input:
% parcs : 1xP cell array of strings describing parcellations
% (should match filenames e.g. 'glasser-360')
% ppath : location of parcellation info files
% s... |
503b769f5c7f87db3f5a0b284719b032613ee0f829789955cc8a02392720e61b | MATLAB | 24,898 | 496 | function varargout = process_gedai( varargin )
% PROCESS_GEDAI: Wrapper for GEDAI.m function to be used in Brainstorm
%
% USAGE: sProcess = process_gedai('GetDescription')
% OutputFiles = process_gedai('Run', sProcess, sInputs)
% [Generalized Eigenvalue De-Artifacting Instrument (G... |
ad619661d7e6ba011a0b714a9bf41cc3c3b33e915b04bb4e7c39605bb0641fa9 | MATLAB | 24,903 | 551 | function out = osp_plotFit(MRSCont, kk, which_spec,VoxelIndex, conc, stagFlag, xlab, ylab, figTitle)
%% out = osp_plotFit(MRSCont, kk, which, stagFlag, xlab, ylab, figTitle)
% Creates a figure showing data stored in an Osprey data container, as
% well as the fit to it, the baseline, the residual, and contributions
... |
e6dedc54d4a3fd2933b1f86dd3936700a51136543fdc889fdca4bb41092e5b23 | MATLAB | 24,947 | 605 | % SUPERGUI - a comprehensive gui automatic builder. This function help
% to create GUI very fast without bothering about the
% positions of the elements. After creating a geometry,
% elements just place themselves into the predefined
% locations. It is especially u... |
eed7c1bd4306ace1dffe3b3f0d0c6cbc9207e313a156ca5808a05cf192bb8132 | MATLAB | 24,961 | 633 | function LRout=LargestRectangle(image,varargin)
%Function to find the largest inscribed rectangle in an arbitrary shape with multiple holes.
%INPUT:
% image: Image, RGB, grey or BW. By preference BW.
% RotationStep: Default: 5°
% Rotation Step in degrees. In order to find tilted rectangles, the ima... |
a0f60d8babd8e3e577daccf7ce6eeaf68861c2270015943fed9bd1a7776c5374 | MATLAB | 24,974 | 618 | function [fitParamsStep2] = fit_OspreyPrelimStep2MM(dataToFit, resBasisSet, minKnotSpacingPPM, fitRangePPM, fitParamsStep1, refFWHM)
%% [fitParamsStep2] = fit_OspreyPrelimStep2MM(dataToFit, resBasisSet, minKnotSpacingPPM, fitRangePPM, fitParamsStep1, refFWHM)
% Performs the second step of the LCModel preliminary anal... |
a9a79070761b5575053524194489fdecb828f4f3c5c402a52154e143632f2ae0 | MATLAB | 25,034 | 682 | function [Y, infos, problem_description] = low_rank_dist_completion(problem_description)
% Perform low-rank distance matrix completion w/ automatic rank detection.
%
% function Y = low_rank_dist_completion(problem_description)
% function [Y, infos, out_problem_description] = low_rank_dist_completion(problem_descriptio... |
222130b2dd71e2585683db9ea2c70b26fe0023d904cce61c16315e1b1ea4c5cb | MATLAB | 25,084 | 565 | function [errors,average,estimations,actual,headingAngle,errors2D] = ReconstructPosition2Dto1D(positions,spikes,windows,varargin)
% Bayesian reconstruction of positions from spike trains.
%
% Instantaneous positions are reconstructed using a Bayesian algorithm.
% Instantaneous population firing rates can be estimated ... |
00ad524207460db8866ca9a964303d9d1674a782509513aada1fde78700e2497 | MATLAB | 25,326 | 771 | function [S,m,l,t,s]=som_grid(varargin)
%SOM_GRID Visualization of a SOM grid
%
% [sGrid,m,l,t,s]=som_grid(sGrid, ['argID', value, ...])
% [sGrid,m,l,t,s]=som_grid(topol, ['argID', value, ...])
% [sGrid,m,l,t,s]=som_grid(lattice, msize, ['argID', value, ...])
%
% Input and output arguments ([]'s are optional)
% sGrid... |
a8d159ce06420b93cb8deead0b49cf48162f3f381fe5e49bb877190827b6f16e | MATLAB | 25,331 | 524 | % POP_EDITEVENTFIELD - Add/remove/rename/modify a field in the event structure
% of an EEG dataset. Can also be used to append new events to the end of the
% event structure or to delete all current events. If the dataset is
% the only input, a window pops up to ask for relevan... |
818cd31f17b17eb06710648476e9609c40463a4d96d42cc387834274c8706ce9 | MATLAB | 25,367 | 379 | % POP_STATPARAMS - helper function for pop_erspparams, pop_erpparams, and
% pop_specparams.
%
% Usage:
% >> struct = pop_statparams(struct, 'default');
% >> struct = pop_statparams(struct, 'key', 'val', ...);
%
% Inputs:
% struct - parameter structure. When called with the 'default'
% ... |
1c36196a4e4621482040d0df0e1982469e18ccf88ea0e7e4666431172af68680 | MATLAB | 25,421 | 294 | function im_hdr = GE_readHeaderImage(fid, byte_align)
%
% im_hdr = GE_readHeaderImage(fid, byte_align)
%
% Loads the image header from a file with filed id fid
% and returns it as a structure.
% if byte_align = 1 then 32-bit alignment (SGI, LX2 format)
% if byte_align = 0 then 16-bit alignment (Sun, 5.X format)
%
%
% S... |
d53d51687116e5a84483e99e1ad73a4bb7659b985c2311b5ec00ea8d6888a1bd | MATLAB | 25,499 | 536 | classdef McsFrameDataEntity < handle
% Holds the contents of a single FrameDataEntity
%
% Important fields:
% FrameData - (channels_x x channels_y x samples) array of data
% values.
%
% FrameDataTimeStamps - (1 x samples) vector of time stamps in
% microse... |
3996d636062ee9a2885ab8b91507e60507788d78e7e4bd8ed6a1859f87b998f5 | MATLAB | 25,519 | 593 | function [MRSCont] = OspreyGenerateSpectra(nDatasets,outputFolder,saveSpec,alter,changedComb,zeroed)
if nargin < 6
zeroed.ph0 = 0;
zeroed.ph1 = 0;
zeroed.gaussLB = 0;
zeroed.lorentzLB = zeros(27,1);
zeroed.freqShift = zeros(27,1);
zeroed.ampl = zeros(35,1);
zeroed.beta_j = 0;
zeroed.lin... |
112534c2d510be0e439e5b21270c2eecc55e6ed6933ea52e863d5d9cbea5a826 | MATLAB | 25,588 | 621 | % CORRIMAGE - compute correlation image between an event and amplitude
% and phase in the time-frequency domain.
%
% Usage:
% corrimage(data, sortvar, times);
% [times, freqs, alpha, sigout, limits ] = corrimage(data, sortvar, ...
% times, 'key1', val1, 'key2', ... |
3d9a64f476270d58e5323621e03d13eb697385434e54af4adda4ea2ad8ef60ee | MATLAB | 25,608 | 542 | % fit_makeBasis.m
% Georg Oeltzschner, Johns Hopkins University 2019.
%
% USAGE:
% [BASIS] = fit_makeBasis(folder, addMMFlag, sequence, editTarget)
%
% DESCRIPTION:
% Generates a basis set in FID-A structure. The code will search all *.mat
% files in the input folder for FID-A structures with simulated spectra. It
% a... |
9362a1a1fa9b4b4d53aadcd7fd5b7f3ff8c75c04d5c651ec267cbe4c51e136e9 | MATLAB | 25,608 | 496 | function fcn_hcp_meg_process_connectivity(hcp_dir, subjList, badChannels, reports_dir)
% hcp_meg_process: Script to process Resting-state MEG data from Human
% Connectime Project
%
% Modified from Brainstorm online tutorials:
% https://neuroimage.usc.edu/brainstorm/Tutorials/HCP-MEG
%
% Inputs:
% hcp_dir: Direc... |
ee0b00332d62a37d752220211f390abcd5b142f7df057b9691dba1040c944163 | MATLAB | 25,611 | 652 | function [NBSPredict] = run_NBSPredict(NBSPredict)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% run_NBSPredict is the main function which consists combines machine
% learning with graph theoretical concept of connected components.
% Specifically, it selects features(i.e. edges) using gr... |
5634dcedb004a710c6ac0104b65090c9dcef578fdd4a70a39689abbf0c62590f | MATLAB | 25,619 | 371 | function osp_updateFitWindow(gui)
%% osp_updateFitWindow
% This function updates the fit tab.
%
%
% USAGE:
% osp_updateFitWindow(gui);
%
% INPUT:
% gui = gui class containing all handles and the MRSCont
%
%
% AUTHORS:
% Dr. Helge Zoellner (Johns Hopkins University, 2020-01-16)
% ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.