sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
049513c662ee97a9da976c97ea70cb63f6eefb2f821d6f7a6090fc33e11784ef
MATLAB
7,474
184
function [dated_output_folder,NMI_version, folder_address, keep_times]=... Wave_Clus_batch_220103(directory,well_dir,fs,skip_to,reuse_last_NMI) % Reuse last NMI only works if skip_to is not 0, reduces redundancy, saves memory %Change log starting 6/2/21 %added multiple scaling factor support % Removed peak findin...
d89f037df84c196a6061df4fe08d08c80033e520ad18f786e52365dd5e52aabd
MATLAB
7,476
254
%% PSTHs clear [task_info, supPath] = loadDBAndSpecifyDataPaths('Vermis'); req_params = reqParamsEffectSize("both"); %req_params.cell_type = {'PC cs'}; raster_params.align_to = 'cue'; raster_params.time_before = 399; raster_params.time_after = 800; raster_params.smoothing_margins = 100; raster_params.SD = 20; basel...
e7ddb4aa7c9a2021528775d2c72c98b26e006ea5c5830340b4bd936d84af6e56
MATLAB
7,502
176
% function design = make_design_rsa_cv(cfg) % % Function to generate design matrix for representational similarity % analysis, pattern similarity analysis, or pattern component modeling. In % contrast to the general version where all data is used for training and % testing, here independence of data is required, i...
ce0599e8e4ab5fcdf2a3cb2364c91d4492366441551a6ec28faded1d50edcfc0
MATLAB
7,508
215
function varargout = no_history(varargin) % NO_HISTORY M-file for no_history.fig % NO_HISTORY by itself, creates a new NO_HISTORY or raises the % existing singleton*. % % H = NO_HISTORY returns the handle to a new NO_HISTORY or the handle to % the existing singleton*. % % NO_HISTORY('CALLBACK',...
404c87af47942247a82c43ded2e9287444fbcd70d73c6a559795071af4319268
MATLAB
7,509
364
function [gap,len,integral_conv,pl,ph,pc,re_spike,re_spindle,peak,s_angle,spike_count]=Spindle(data,data3) % out put zeroing for noise channel fc1=10; fc2=16; fs=25000; spindle_only=[]; gap=[]; len=[]; spike_count=[]; conv_s=[]; integral_conv=[]; s_out=[]; re_spike=[]; re_spindle=[]; peak=[]; s_angle=[]; pc=[]; pl=[]; ...
cd1a00c889d4cb971535e58a1d64f896bf40b9bf30c396bfdfb6b2a6af0b8fb8
MATLAB
7,524
322
%% Load data binsize = 0.2; % bin size for population vectors, needs to be large thSmooth = 2; % smoothing factor of population vectors iso = 0; % set to 1 if need to re-run Isomap velTh = 2; % velocity threshold (2 = default) mergeTh = 0; % threshold for merging run epochs (0 = no merging) [~, foldername, ~] = ...
0a383b20d84d9db971ef06715bd048a844ef4c9336dbb209ea5764a899c3f67f
MATLAB
7,531
222
% @title Test script for optogenetics stimulation % @file test_optostim.m % @author Romain Beaubois % @date 11 Aug 2021 % @copyright % SPDX-FileCopyrightText: © 2021 Romain Beaubois <refbeaubois@yahoo.com> % SPDX-License-Identifier: GPL-3.0-or-later % % @brief Test script for optogenetics stimulati...
a174765d6bacee11510050f6b09143d4ffce936bb4d4281e92fe467d6e26cc2a
MATLAB
7,537
235
function plotSignlePlane(singlePlaneFit,f,histologyFluorescenceIm,octVolumeJson,isSaveFigureAsPNG,enfaceViewIm) %This function plots the data estimated by single plane fit & Fiducial line %structure. %INPUTS: % singlePlaneFit - see alignSinglePlane % f - Fiducial line structure % histologyFluorescenceIm - o...
8cbf94f64643a7ceced8213991e1e6032c2a218fc467c0ba0a5d6582c5adf181
MATLAB
7,540
256
% @author Farad Khoyratee % @date 16 Apr 2019 % @copyright % SPDX-FileCopyrightText: © 2021 Farad Khoyratee <farad.khoyratee@gmail.com> % SPDX-License-Identifier: GPL-3.0-or-later function [HHVal] = PospischilNeuronFunc(TypeOfNeuron, Dt, HHValpre, en_stim) Vprev = HHValpre(1); npre = HHValpre(2); mpre ...
a590412960605405a072b0ed7969799c644af38473a5e66975618ebaa07233e8
MATLAB
7,541
283
function [errmsgs warnmsgs] = unit_adj_cuboid(varargin) % Unit tests for ADJ_CUBE.M % % [ERRMSGS WARNMSGS] = UNIT_ADJ_CUBE(...) % % Tests with all-ones mask, randomly generated mask, and a % few hand-written scenarois (where the correct output has % been hand-calculated in advance). % % Doesn't test non-cuboid windows...
59c02337d2d8e72f30be737d772b63e9a7ee9a969f0c0cdd2770b98991341dee
MATLAB
7,546
204
function [cf,Sw,lambda,mu1,mu2] = train_lda(param,X,clabel) % Trains a linear discriminant analysis with regularization of the % covariance matrix. % % Usage: % cf = train_lda(param,X,clabel) % %Parameters: % X - [samples x features] matrix of training samples % clabel - [samples x 1] vector of cl...
e896126d5b4b20f38018663539edb1de5f78e0a1ef283cc56ef40b4063f63847
MATLAB
7,560
172
% redefine stimulus classes into 6 diff. classes % to be runned after generating stimuli marks from aux data in Homer3 GUI % strictly for ExperimentXXGUI folder % Old, no longer needed function redefineStimulusClasses(sbjNum,rawDataFN,respData) dir = ['C:\Users\mn0mn\Documents\ResearchProjects\spatailAttentionProject...
f59cbc43f420d24b1ee42d60540e622d45b3abce2cfd88ed17c3b740161cab4a
MATLAB
7,572
178
% SYNTAX: % [pValuesS, pValuesS_cond] = hmrS_CalcPvalue(yRuns, stimRuns, mlActRuns, baselineRange, hrfTimeWindow) % % UI NAME: % Pvalues_on_Session % % DESCRIPTION: % Calculate the p-value matrix for a single session. % % INPUTS: % yRuns: % stimRuns: % mlActRuns: % baselineRange: % hrfTimeWindow: % % OUTPUTS: % pValue...
d9626c0657210cc80d8dc8f8095b7af2e3f6312be89cadc52685181231e727d2
MATLAB
7,580
191
function varargout = DSC_mri_aif_slice_selection_figure(varargin) % Visualizza l'immagine del volume cerebrale e chiede all'operatore di % selezionare la slice sulla quale individuare la slice. % DSC_MRI_AIF_SLICE_SELECTION_FIGURE M-file for DSC_mri_aif_slice_selection_figure.fig % DSC_MRI_AIF_SLICE_SELECTION_FIG...
55a7bf9194193bf20c9574febba5ac14ee22da0f0ea90d665b2d9f28b7c2f96f
MATLAB
7,583
198
% STATUS: experimental. % Not for publication. % % SYNTAX: % preprocessFNIRS06_CV_ssBeta(sbjNum,rawDataFN,respData) % % DESCRIPTION: % Set SS Beta a priori to 1. No GLM fitting here. % % RESTRICTION: % Only for sbj 12 and afterward. % % INPUTS: % sbjNum - subject ID. 2-digits string. Ex: '08'. % rawDataFN - 1xN cel...
f1764fa9446aed8f43243e36430328ce13e23576b6573d29168d0a1ff7a09292
MATLAB
7,586
222
% SYNTAX: % [data_yc, svs, nSV] = hmrR_PCAFilter( data_y, mlAct, tInc, nSV ) % % UI NAME: % PCA_Filter % % DESCRIPTION: % Perform a PCA filter on the data matrix y. % % INPUT: % data_y: SNIRF object containing data matrix where rows are time points. If y is wavelength % data, then the columns are channels as descri...
bb1eae559e372c96c19c36654d23d146ab1bca8a9eedf354559176a3721b3de7
MATLAB
7,592
162
function varargout = Screen(varargin) % Screen is a MEX file for precise control of the video display. Screen has % many functions; type "Screen" for a list: % Screen % % For explanation of any particular screen function, just add a question % mark "?". E.g. for 'OpenWindow', try either of these equivalent forms: % S...
cfc898e6f95f89228c1a906d37926c0afdfdc74a8a379986c3a8db7487a60e6d
MATLAB
7,595
132
clear all; addpath /comp_neuro/Software/Github/CMBHOME_github/ [filename,f_length]=get_filename(1); spk_hz_group = []; for i=1:f_length [filename,f_length]=get_filename(i); cell_selection=get_cell_selection(i); spk_hz=find_hz(filename,cell_selection); spk_hz_group=[spk_hz_group;spk_hz]; if i==1 fprintf("Pro...
3b56a57a245a19d8d77ecd4e3eaba3a4c9ac34d28dca537ade1c0dffc781fd19
MATLAB
7,599
212
function choose_pos_neg_peak_211025(folder_address,electrodes) %looks at tihe positive and negative peaks from detection and determines if %there are spikes within 1.5 ms dead time, tallest spike is kept others are %discarded %% Positive spikes disp('Getting Low Spikes (Pos)...') %set new parameters for low clusterin...
75c0c8f41c0f939be300c12540f3575bdaf570e8e026e2eeca75b96e516c82ce
MATLAB
7,603
128
function [ Res ] = classifyCellType( Res, ResShuf, varargin ) % This is a wrapper for running the BVC, BVC (in CCE) and BC classification on whole dataset. % % Calls 'shufThrCellClassifer' three types, with parameters set to classify each % of the three categories. Also constructs a general filter index, stored as Res...
497ba14839f06ba564f2d2b752169ad088c0d9f9e0e41457d55fc4b6ff7272b5
MATLAB
7,611
245
% run @NaturalMovieHeterogeneityEncodingMapping first % when it stops, go to @GetPairedPathDistance % first time: %% figure; imagesc(cmap); colorbar; %% % Representative for each BC types for the heterogeity responses across % terminals % (1). Show the align functional images on top of the structure and note th...
c4b2c56a6f913d9bb207b9f2f41a1dd5e9ae42edc19f0c50df6f0876ca0b4455
MATLAB
7,612
174
function [pparam, X, clabel] = mv_preprocess_impute_nan(pparam, X, clabel) % Imputes nan and inf values in the data, so that downstream train functions % return numeric results. % %Usage: % [pparam, X, clabel] = mv_preprocess_impute_nan(pparam, X, clabel) % %Parameters: % X - [samples x ... x ...] data ma...
19925c694aa770614ac7a79bba2210090b4f06bd619a154606c0a34fdbfcd76a
MATLAB
7,620
382
%%%% Training Mixed and Seperate Channels Reinforcement Learning Models based on Experiment 1 and ... % Experiment 2 subjects' choice data (refer to the paper for more info). % This script calls for several functions (all can be found in this % RL_model directory). These functions are concise and self-explanatory %...
81991fd3bc5cae7f0115633969072829aeff8940c5b33e562d6c9d2e43ffcc40
MATLAB
7,626
179
% function design = make_design_rsa(cfg) % % Function to generate design matrix for representational similarity % analysis, pattern simlarity analysis, or pattern component modeling. This % is the most general version where all data is used for training and % testing, i.e. without cross-validation. If cfg.files.co...
bb661360e2509d6cf31a40504c02cdf48e00815252cf3139c9ffaedf7c12725f
MATLAB
7,628
262
function fw_singletrial_sambrook_gamblearn(dir,fin,model,regtype,varargin) %define options options.model = model; options.regtype = regtype; options.inprefix = ''; options.outprefix = ''; options.srate = []; options.channels = []; options.length_codes = 7; %length of behavioral codes from EEG preprocessing myparts = ...
c5da3425fe3b66e983846cac743875298998499cd2f67584f5c234fe4ee9f091
MATLAB
7,639
200
function varargout = struct2xml( s, varargin ) %Convert a MATLAB structure into a xml file % [ ] = struct2xml( s, file ) % xml = struct2xml( s ) % % A structure containing: % s.XMLname.Attributes.attrib1 = "Some value"; % s.XMLname.Element.Text = "Some text"; % s.XMLname.DifferentElement{1}.Attributes.attrib2 = "2"; %...
4017814ee76bcdb4da33472bfb2cf96129834e4dedd3e7cf174f3c109513d8a9
MATLAB
7,647
232
% %%%%%% STARTING with just SST data! participant_SST_3_mo_dir = '/Users/tawnytsang/Desktop/Projects/ETdataFiles/infantSibs/CB-SST Data/matlab/SST/test/'; participant_SST_6_mo_dir = '/Users/tawnytsang/Desktop/Projects/ETdataFiles/infantSibs/CB-SST Data/matlab/SST/old/new6/'; participant_SST_9_mo_dir = '/Users/tawnytsa...
66fa6cc1d59a6efc4f6e7b0721d722e0b4c42b63e35325350b30e816cbb27514
MATLAB
7,652
177
#import <UnityAds/UnityMonetization.h> #import <Unity/UnityInterface.h> #import "UnityAdsUtilities.h" #import "UnityJsonAdditions.h" typedef void (*UnityMonetizationShowAdStartCallback)(); typedef void (*UnityMonetizationShowAdFinishCallback)(int finishState); @interface UnityMonetizationUnityShowAdDelegate : NSObjec...
4325f280de9c6e60655ebe4a5eca09478e6e5fd336f32bbeb6443e32066796e5
MATLAB
7,666
184
function PatternChange_Regression_Behav_1st() cfg = load('neurovar_cfg.mat').cfg; trial_cutoff = 1; pe_type = 'spe'; % 'spe' OR 'rpe' output_dir = fullfile(cfg.global.deriv_dir, 'PatternChange_Regression_Behav', 'rpe_PatternChange_ActionChange'); for i_sub = 1:44 fprintf(strcat('PPI Sub_', string(i_sub),'\n'))...
9340b0013a105cb228dffb4eb6fcfd854a6dfcd7f4911580ad0d96819a1791cc
MATLAB
7,666
164
% ----------------------------------------------------------------------- % % M U L T I P L E T E S T I N G % % ----------------------------------------------------------------------- % % Function 'fdr_storey' computes the Storey correction of the False % % Discovery ...
40295e2c259826003f71a421a74660adc0ede51a36f44fe3c7b9a4dbbd791ebe
MATLAB
7,668
140
classdef Sharedpaths %SHAREDPATHS Class to hold all relevant paths % Class to hold all relevant paths. Not sure whether this is common practice, but seems useful up to now. Used so that % ABFBATCH and ABFFILE objects, which inherit from SHAREDPATHS know where to retrieve / store data. % % ...
722a3dd3a3febb870e019a2baaeff58b0c07bb9081517ae2f50b72ef0453bc06
MATLAB
7,668
222
% FindSynapse - find putatitve monosynaptic connections based on % cross-correlograms % % USAGE % [synLat,synStrZ,synStrR,bounds] = FindSynapse(cch,options) % % cch: a matrix of cross-correlograms in columns (expressed in number of events) % % Returns: % synLat: two column vectors of synaptic latencies: % ...
2b34c8c7d2a6e189ef63e08569740de35fb041ee8f142b69268fc56f2e1afe12
MATLAB
7,673
212
function h = mv_plot_topography(cfg, topo, pos) %Plots a topography % %Usage: % ax = mv_plot_topography(cfg, topo, pos) % %Parameters: % topo - [C x 1] vector with specifying a topography, where C % is the number of channels. % Alternatively, if a matrix [C x M] is...
be5ef7de11c8c16b008d49595d51cd5d51167a355313327992c16027ffa95369
MATLAB
7,680
233
function [anova_subregion,anova_ff,anova_fb]=network_stats_211110(ff_table,fb_table) %get number of subregions subregions=unique(ff_table{1}.Subregion,'stable'); for i=1:length(subregions) current_subregion=subregions(i); num_axons=0; axons_per_tunnel=[]; conduction_times=[]; for j=1:length(ff_tab...
79a9cb75fb6604089a616ad424c441b253f1666eecd9fec3e9d2e7815e9ae1ec
MATLAB
7,683
281
function [samples, energies, diagn] = hmc(f, x, options, gradf, varargin) %HMC Hybrid Monte Carlo sampling. % % Description % SAMPLES = HMC(F, X, OPTIONS, GRADF) uses a hybrid Monte Carlo % algorithm to sample from the distribution P ~ EXP(-F), where F is the % first argument to HMC. The Markov chain starts at the poi...
c9c19ebadaef1284aeb7ea2dd7b4f33de3484bf1ae82383bc766692733f4e0e7
MATLAB
7,685
189
function param = mv_get_hyperparameter(model, param) % Returns a struct with default hyperparameters for a given % classifier or regression model. % %Usage: % param = mv_get_hyperparameter(model, <param>) % %Parameters: % model - [string] the classifier or regression model (eg 'lda') % param - [str...
6d095fd7674afd42d0cb89a6974474a65c654d71405cd078d9bc05a1e67ee44d
MATLAB
7,690
185
function [pparam, X, clabel] = mv_preprocess_mnn(pparam, X, clabel) % Applies Multivariate Noise Normalization (MNN) (Guggenmos et al., 2018). % Data is denoised with an estimate of the noise covariance: % % X_denoised = C^(-1/2) * X % % where C is the covariance matrix and C^(-1/2) is its inverse square-...
125d3706c490eac27bea05a9bc9989d5db695f8f3ed2c172afb727c0b29dcc53
MATLAB
7,720
244
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% % Optimized vs Original Pospischil equations % % Authors : KHOYRATEE Farad % Date : 25/01/2017 % Update by : KHOYRATEE Farad % Update : 16/04/2019 % % Version : V1.0 % % Descritption: Optimized Hodgkin-Huxley from Pos...
40721ae3b2702acdfc47c4144fc0d5cedf6c0eb1424b076a34896807254bc1c5
MATLAB
7,724
260
function DifferenceImageMovies(fileParams) %% File Parameters secBtwFrame = fileParams.secBtwFrames; pxPerMicron = fileParams.pxPerMicron; exportFolder = fileParams.exportFolder; thetaInDegrees = fileParams.thetaInDegrees; thetaInRadians = fileParams.thetaInRadians; %% Input Parameters numMicrons = 10; %% Define Fold...
3a4bb3d577a71449806b240128d14ad8be24ff575de4996569f84d8732647556
MATLAB
7,725
309
function varargout = file_utils(str, varargin) % % Character array (or cell array of char) handling facility % % USAGE: % % To list files or directories (with fullpath if necessary):: % % [files, dirs] = bids.internal.file_utils('List', directory, regexp) % [files, dirs] = bids.internal.f...
bcee688ec72b470cf8942beab7ade83cffa23c83b7b27d48b0195374e77d59b4
MATLAB
7,728
215
function varargout = not_loaded(varargin) % NOT_LOADED M-file for not_loaded.fig % NOT_LOADED by itself, creates a new NOT_LOADED or raises the % existing singleton*. % % H = NOT_LOADED returns the handle to a new NOT_LOADED or the handle to % the existing singleton*. % % NOT_LOADED('CA...
bdd208036855c33f4166fbdfc69c716e78850ce3821ff025a98d6eefa7b4ae71
MATLAB
7,728
204
%% Create mea tables % Creates tables compatible with % compute_allregion_AFR_table_at_P1s_203011.m ultimately for creation of % connectivity movie. % In order to use, directories must be populated with matlab variables % conaining wave_clus cluster_class variables. different files need to be % created for feedforward ...
d74bdbbbdac23f79453f3f06c700b40dd23b6c7986561825af1844e61b2bdf3b
MATLAB
7,735
224
function [errs warns] = unit_afni_cellarrayfilename_load() % [ERRS WARNS] = UNIT_TEMPLATE() % % This is the template for a unit test. Unit tests should % take in no arguments (or only varargin optional % arguments), and return ERRS and WARNS cell arrays of % error messages. If both are empty, the test has passe...
d754c4123f870a31582e7d74180e2f4c8c976c477f3b2f5200d40217d69d36af
MATLAB
7,741
222
% Analyze sensitivity to parameters % % Hannah Payne 2020 % % Abbreviations for conditions: % d = VORD, p = smooth pursuit, s = stim % % Abbreviations for inputs: % H = Head, T = Target, L = Light (1 or 0), E = Eye, P = Purkinje, Z = stim % PARAMS stim_on = 0; % Include stim condition complex_on = 0; % Incl...
748e13ede873cba395c9155987eaca096c56c68434a98c6024d80b92e083be9c
MATLAB
7,745
277
% references: https://www.mathworks.com/matlabcentral/answers/180778-plotting-a-3d-gaussian-function-using-surf % https://www.mathworks.com/help/symbolic/rotation-matrix-and-transformation-matrix.html % https://www.mathworks.com/matlabcentral/answers/430093-rotation-about-a-point % run options sample_matrix = 1; write...
e44d960e9ad702efa6db6c0a1be5fd4be86b837031a8afb444ed050401e46490
MATLAB
7,750
245
function output = model_postCAT(x,data) % Likelihood function for Q-learning on experiment eegCATrandom with % parameters (1)learning rate, (2)inverse temperature, (3) % perseveration (4)assignment rate % % USAGE: lik = model_postCAT(x,data) % % INPUTS: % x - parameters: % x(1) - learning rate % x(2) - i...
01dfbd770f0540fd8f2699935bf2e2320ad11f7f5c672325283f7da8a22334f3
MATLAB
7,753
209
function tunnel_merge_211124(folder_name,length_rec_sec) cd(char(folder_name)) fs=40e3; %change samplig freq if needed try load('matching_table_wNMI.mat') catch error('Matching_table_wNMI.mat not found. Please run compute_NMI_200701 on the wave...
32db1c9df59730979901bd7be9ebf7ca0d2c5e4bdac5cb5f1a7dcfe33c224c18
MATLAB
7,753
235
function [forward_t_table,backward_t_table]=pre_post_stim_paired_ttest_210225(table1ff,table1fb,table2ff,table2fb) % Assumes tables 1 and 2 are already organized if all(~ismember({'Electrode Pairs','Spike Area','Conduction Time','Unit Pairs','Direction'}, table1ff.Properties.VariableNames))... && all(~ismembe...
e59699080df3e9b99d9a85cac187f43124c315a1bffda151e13fbe8e374226a1
MATLAB
7,756
269
%% Behavior figure clear [task_info,supPath] = loadDBAndSpecifyDataPaths('Vermis'); SINGLE_SESSION = false; PROBABITIES = [25,75]; COL ={'r','b'}'; SCATTER_TIME = 200:250; MONKEY = "both"; req_params = reqParamsEffectSize("pursuit",MONKEY); behavior_params.time_after = 1000; behavior_params.time_before = 0; behavi...
4ad6f07a678b694b9c0324c45fd93bd10ead8de7bc0ce982044423b777877731
MATLAB
7,762
264
% Joint reconstruction for multii-band multi-shot diffusion MRI (on Matlab R2018b) % (c) Erpeng Dai, Stanford University % Reference: Dai E, et al. Multi-band Multi-shot Diffusion MRI % Reconstruction with Joint Usage of Structured Low-rank Constraints and Explicit Phase Mapping (JULEP) close all clear clc %% Input p...
e842b248679cb3da720ee50bdff934c0c26d7951f35eac77a4b44a859dca26e9
MATLAB
7,774
224
% FindSynapse - find putatitve monosynaptic connections based on % cross-correlograms % % USAGE % [synLat,synStrZ,synStrR,bounds] = FindSynapse(cch,options) % % cch: a matrix of cross-correlograms in columns (expressed in number of events) % % Returns: % synLat: two column vectors of synaptic latencies: % ...
baceb66cb086e6fba9681ac24a9d8a25195f50366fe383617fd2ad7dbe1a3606
MATLAB
7,778
257
clear all load ('C:\noga\TD complex spike analysis\task_info'); tasks = {'saccade_8_dir_75and25'} req_params.grade = 7; req_params.num_trials = 50; req_params.ID = 4000:5000; req_params.remove_question_marks = 1; cell_type1 = 'CRB|PC ss'; cell_type2 = 'CRB|PC ss'; pairs = []; counter = 0; for t = 1:length(tasks) ...
e4329749c4b13769f5cc82e60711c7cf527fe32442ada2adf630204e8c758b80
MATLAB
7,778
282
function [F0,Fn,Zn,F] = EPGX_TSE_BM(theta,ESP,T1x,T2x,f,ka,varargin) %%%% [F0,Fn,Zn,F] = EPGX_TSE_BM(theta,ESP,T1x,T2x,f,ka,varargin) % % EPG-X for Bloch McConnell coupled systems w/ TSE sequences % % arguments: % theta: vector of flip angles (rad) - length = #pulses % ESP: ...
5c125f740790636e18da86bbbb31783d34840630d6d1e8b0bd4404a4faf63cab
MATLAB
7,779
142
% Inactive % Plot HRF using outputs from scripting % plotHRF.m plot HRF using outputs from group.mat from Homer3 GUI % Completed % This plot all channels from one source, divide into 6 subplots, one for % each condition function plotHRF3(sbjNum) figSaveDir = ['C:\Users\mn0mn\Documents\ResearchProjects\spatailAttentio...
98d4ca56f928380435dc3ae1567cf577c5370d2877cb548bebcdddef77329a25
MATLAB
7,786
96
function [A,h] = build_A_h_3d(dphi,cert,phiGrad,transformatioinModel) % BUILD_A_H_LINEAR3D Builds the equation system A*p = h % % INPUT ARGUMENTS % dphi - Phase-difference % cert - Certainty % phiGrad - Phase gradient % transformationModel - Transformation model (transl...
4aa5e379f426baef87bd8dacd249b2d9361030d58d78802f226955cb4d652449
MATLAB
7,791
244
function PLS_summary_component_stats(GENEdata_root, MRIdata_root,... ncomp, nperm, perm_type, working_dir, coords) % PLS component summary statistics %% ------------------------- SCRIPT INFORMATION --------------------------- % % This script will assess if each individual component in a model explains % more or les...
91f28caf5b7ddc9f4e4fe246924d36e00d55dbfa4fcc5782908e7744d6be4977
MATLAB
7,792
244
function PLS_summary_component_stats(GENEdata_root, MRIdata_root,... ncomp, nperm, perm_type, working_dir, coords) % PLS component summary statistics %% ------------------------- SCRIPT INFORMATION --------------------------- % % This script will assess if each individual component in a model explains % more or les...
a87add2508e0cb857e07d6d6d3af4f59373d3fe1d7da6287a5d69be01f29ee24
MATLAB
7,808
225
function test_yosemite % TEST_YOSEMITE % % This function reproduces the results in the last five rows of table 6.2, % page 102, of Gunnar Farnebäck's thesis "Polynomial Expansion for % Orientation and Motion Estimation". The results in table 7.1, page 126, % are also reproduced. % % Author: Gunnar Farnebäck % C...
914e1230fba322a4592a1ba3ded97550271848f67dcfdd69478be6fe8c158681
MATLAB
7,818
216
function varargout = not_calculated(varargin) % NOT_CALCULATED M-file for not_calculated.fig % NOT_CALCULATED by itself, creates a new NOT_CALCULATED or raises the % existing singleton*. % % H = NOT_CALCULATED returns the handle to a new NOT_CALCULATED or the handle to % the existing singleton...
de07a2e1ea6846d4b1d48ea7aa6039a9bdf19bc423f7558f97ec859b8c54b25c
MATLAB
7,844
196
% Import Wizard % % Descriptions tba % % $Author: Peng Li, Ph.D. % Division of Sleep Medicine, Brigham & Women's Hospital % Division of Sleep Medicine, Harvard Medical School % $Date: Dec 23, 2019 % % +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++...
3fd176ecb6fccbdd52c0da4992dcba10a64444a5abbe7dc0f669fd2ad650f138
MATLAB
7,872
195
function [pparam, X, clabel] = mv_preprocess_csp(pparam, X, clabel) % Calculates Common Spatial Patterns (CSP) by projecting the data onto % n leading (largest eigenvalues) and n trailing (smallest eigenvalues) % eigenvectors for the generalized eigenvalue problem % % lambda = (w' * C1 * w) / (w' * C2 * w) % % where ...
a0dffedb5bf1fb4a0dfd486a92115ea530fac1c50ec7a0dd57f1fbc32218204c
MATLAB
7,874
188
function [cfg, Y, nmetrics, Y2] = mv_check_inputs_for_regression(cfg, X, Y, X2, Y2) % For regression: Performs some sanity checks and sets some defaults for % input parameters cfg, X, and y. % Also checks whether external toolboxes (LIBSVM and LIBLINEAR) are % available if required. if ~iscell(cfg.metric) cfg.met...
04ce1f6bc50d8b2ca0975b42770b0191834233d9d577b4820b44f42a9cebdb80
MATLAB
7,885
264
function [F,fieldSynthesis,dithered,Q,T] = FieldSynthesisTheorem(F,L) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Small program to illustrate a new Field Synthesis Theorem. % % In essence it says that the projection of the absolute modulus of a % complex field is the same as...
dcee27d50a11c84cb0a41e84d2fc03f3b4a634dbd01e2eb6f6db36e094f659d4
MATLAB
7,889
264
% Probability Tuning curves - regardles of direction clear [task_info, supPath ,~,task_DB_path] = ... loadDBAndSpecifyDataPaths('Vermis'); velocities = [15, 25]; req_params.grade = 7; req_params.cell_type = 'CRB'; req_params.task = 'speed_2_dir_0,50,100'; req_params.ID = 4000:6000; req_params.num_trials = 60; re...
12f590ce6f7f403f2c189e3f1a7d9f719b50ca474aa9ec422408c9d2d890f4c3
MATLAB
7,902
237
% function design = make_design_cv(cfg) % % % Function to generate design matrix for cross validation using the % decoding toolbox. This function uses a "leave one run out" cross % validation method. % % IN % cfg.files.chunk: a vector, one chunk number for each file in % cfg.files.name. Chunks can be used to ke...
855f57b966fc5a3254b14e897588ee97d429437efc395f15d4b27470a480b55b
MATLAB
7,903
231
% calcPhase compute single-frequency phase % % [ phs, xf ] = calcPhase( x, fir, method, usf, graphics ) % % ARGUMENTS: % x signal (vector or matrix). this can be: % -the actual data (then any method can be applied) % -a list of sample numbers corresponding to extr...
df90e65570e096a65853d4ddd63152afc19ebbb3e2af951e2086f13fae4f3e9b
MATLAB
7,911
225
function progress(varargin) % PROGRESS shows a graphical or non-graphical progress indication similar % to the standard Matlab WAITBAR function, but with the extra option of % printing it in the command window as a plain text string or as a rotating % dial. Alternatively, you can also specify it not to give feedback o...
1df1b063b97909e2139b497075a881764c016c22e460f554c933286012d46720
MATLAB
7,923
251
%% DLC data processing pipeline % RD fall 2019 %% Get list of randomly selected videos for dlc training/generating videoDir = ''; dlcdata.sampleVids (sesData, mainPath); %% Create dlcdata objects and analysis files for each session clear % Read session data from Excel file mainPath = 'E:\high_speed_video\...
20cdd8e394f474105be0f9f7406e21085f584e6e3ceea68ea2579cd49e0a1c2e
MATLAB
7,943
216
function varargout = load_data_vars(varargin) % LOAD_DATA_VARS M-file for load_data_vars.fig % LOAD_DATA_VARS, by itself, creates a new LOAD_DATA_VARS or raises the existing % singleton*. % % H = LOAD_DATA_VARS returns the handle to a new LOAD_DATA_VARS or the handle to % the existing singleto...
3145f8765c0b990f97943c5a2c558794aa3644e35afde4cd207595f8104f8b91
MATLAB
7,947
255
% This script generates post processed images including OCT slides, % Histology sections and a mask to highlight good parts from bad ones. %% Inputs subjectPath = s3SubjectPath('42'); sectionName = 'Slide05_Section03'; % How many y planes to take around the center OCT plane +-yPlanesAroundCenter yPlanesAround...
e8eb4e0e58f2a9be4d03ff008dd0dab4bc7074cf51b17be562a32af6590d3ab5
MATLAB
7,950
246
function PLS_summary_component_stats(GENEdata_root, MRIdata_root,... ncomp, nperm, perm_type, working_dir, coords) % PLS component summary statistics %% ------------------------- SCRIPT INFORMATION --------------------------- % % This script will assess if each individual component in a model explains % more or les...
08469587ccddbc7360a8ac4c111c79d38c8fd9f47851f4ce910e26032e661bd9
MATLAB
7,962
273
%% load data clear; close all; clc; datapaths; AMResPath = [PopPath,'\AM_results_salicylate.mat']; load(AMResPath); MPlotLabels = [0.06,0.93,0.045,0.03; ... 0.51,0.93,0.045,0.03; ... 0.06,0.63,0.045,0.03; ... 0.51,0.63,0.045,0.03; ... 0.06,0.3,0.045,0.03; ... 0.51,0.3,0.045,0.03]; % plot VSpp afte...
d3dd87037a9da178bae6c1dd0c683b2a1cabf46133c48f054c85f2b9329ed830
MATLAB
7,965
279
function [F0,Fn,Zn,F] = EPGX_TSE_MT(theta,B1SqrdTau,ESP,T1x,T2a,f,ka,G,varargin) %%%% [F0,Fn,Zn,F] = EPGX_TSE_MT(theta,B1SqrdTau,ESP,T1x,T2a,f,ka,G,varargin) % % EPG-X for Pulsed MT systems w/ gradient echo sequences % % arguments: % theta: vector of flip angles (rad) - length = #pulses % ...
1736f2b8affce6ff9b2519f03ca1962c9d2e9c4fd1fa3a36a7d47d84f1a0ce96
MATLAB
7,972
241
% This script creates envelope of AM stimulus in van den Berg*, Wong* et al % the final output is the vector total_mag, with timing in TT (or x) %% Generation of envelope % display startT = -0.2; endT = 2.2; Fs = 1/5.12e-6; % sampling rate showGates = 1; % whether the different envelopes/gates are shown show...
842481816c45767d0e7005f3848897ec0bcbe564512badcbedce519a0250384e
MATLAB
7,984
233
close all; clear; clc; %% CellStr = {'122718_2', '10119_4', '11919_1', '11019_3', '10519_3', '12119_3', '11819_1',... '12019_4', '53018_2', '10119_2', '61018_1', '53018_1', '92418_2', '12019_7', '10919_3'}; nCell = length(CellStr); qualthr = 0.2; %% FolderPath = '\\storage1.ris.wustl.edu\kerschensteinerd\Act...
2a25b1218199d1fd3b06a7b0c84429c19958773960365b308bc600b970eb93fe
MATLAB
7,999
231
% This script imports SP5 Fluorescence images % This is similar to SVS5Import but for SP5 %% Inputs %Where to upload data s3Dir = s3SubjectPath('01'); % Not used, algorithm figures out itself %slideNumber = 1; %sectionNumber = 1; %Pointer to the folder structure, expecting [folderStructurePath '\slideX...
dbdb7e926d7b4ab9e0e9fd5c4dd166415b9512b0f58c6afbddb967725295c89d
MATLAB
7,999
318
function [errmsgs warnmsgs] = unit_set_mat() % USAGE :[ERRMSGS WARNMSGS] = TEST_SET_MAT() % % This is a script that tests the test_sets_mats function. It % does negative and positive tests on the pattern, selectors and % the actives selectors. % % ERRMSGS = cell array holding the error strings % describing any tests ...
6cedea26dee56ca52987cff6f66cf52f5eea63dcf067b55dd11100f0b6120201
MATLAB
8,004
221
% run CircleAnalysis_ResponseScreening072122_MorphSeg.m or % CircleAnalysis_ResponseScreening071222_MorphSeg.m first clear all; clc; GroupData.Days = {... % 1 2 3 4 5 6 7 8 9 10 '021818', '021918', '022218', '022718', '030618', '030918', '031...
d9e96ecbd1650c0e0e469135841dd91d0dcf58aed9378eecc374907338ee15f0
MATLAB
8,016
231
% function dodSpline = hmrR_MotionCorrectSpline_Nirs(dod, t, SD, tInc, p) % % UI NAME: % Spline_Motion_Correction % % dodSpline = hmrR_MotionCorrectSpline_Nirs(dod, t, SD, tInc, p) % Perform a cubic spline correction of the motion artifacts identified in % tInc. The algorithm follows the procedure describe by % Scholkm...
c7337ccd1467f96017e02d312925044da9fb89c1e01aebbe0b80047147d73e5b
MATLAB
8,021
177
function [fs_index,n_vox_steps,output] = feature_selection_embedded(cfg,labels,data_scaled,n_vox,nested_n_vox,i_train) % Sorry for the somewhat convoluted code (mainly caused by forward and % backward selection and several ways in which nested_n_vox and n_vox can % be entered). I just think it would not be much ea...
0abd509e335817f4f727384dbb5a9e994e6424b09fcdbc0c6cc436e19c070533
MATLAB
8,022
196
clear () close () code_path='/Volumes/LASA/TBI_OpenNeuro/Shared_code/TBI_ON_Lesions/'; addpath(code_path) data_path='/Volumes/LASA/TBI_OpenNeuro/TBI_openneuro/data/lesions/overlap_Schaefer/Schaefer1000_wotbi09/'; cd (data_path) table_overlap_volume_tbi02=import_overlap_volume_Sch1000_tbi02('overlap_volume_combined_wsub...
8f9055f7fd8c04ab827b38fef590c563767f58d7cc7aeb02d0d2e303835307d6
MATLAB
8,022
234
function [varargout] = FieldSynthesisVersusLattice(n,w,r,offset,dispRange) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %Simulation for field synthesis % % compares field synthesis vs square lattice % % % Reto, May 2017 % Mark Kittisopikul, August 2018 % % INPUT % n - Defines...
be6af08309a1ad8c399b2ee9ebe93dad4a1676c4bb7b6be1f0f77bc1035ae840
MATLAB
8,027
203
function varargout = CellSizeCutoffGUI(varargin) % CELLSIZECUTOFFGUI MATLAB code for CellSizeCutoffGUI.fig % CELLSIZECUTOFFGUI, by itself, creates a new CELLSIZECUTOFFGUI or raises the existing % singleton*. % % H = CELLSIZECUTOFFGUI returns the handle to a new CELLSIZECUTOFFGUI or the handle to % t...
bd7277fcc97c0422144d5c3bcb42113952fe4d4895fad71c38ba491ae7322353
MATLAB
8,036
189
function output_variable=neuron_reconstruction(wholestack,to_be_added,source_variable,outputpath) % wholestack: the recorded stacked % to_be_added: the neurons to be added % source_variable: neurons already tracked % outputpath: outputfolder figure id_added(size(to_be_added,1),1)=0; for i=1:size(to_be_added,1)...
3b60dcc8edb516f837fbffe9bef1768dff13a8f7b0bda6dc440c05b94ac965fe
MATLAB
8,037
65
% Look-up table for Turbo colormap. % Includes example usage and comparison with other colormaps. % Adapted for Matlab from https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f % Nikolas Karalis, 21 August 2019 % Turned into function Hannah Payne April 2020 function map = turbo(m, limits) turbomap ...
da646df38339e17ace1d8f0dbcae8a612ede12b9bb9a2ac7674bf3f98a714a49
MATLAB
8,041
210
%% CLEAR AND INITIALIZE clear;close all;clc;tic; %% DEFINE THE STRUCTURE THAT WILL HOLD ALL THE PARAMETERS params = []; %% DEFINE INPUTS AND OUTPUTS params.data_folder = 'E:\NAS_SD\SuiviClient\Triffilieff\2023\Data\RWD_Enrica\cohort1'; params.analysis_folder = 'E:\NAS_SD\SuiviClient\Triffilieff\2023\Analyses\RWD_En...
131d489d26741a0e3a0734f580d153731950db47b9fe9539d242f5b5915a5e7b
MATLAB
8,044
179
function [M] = makeCanonicalModelMaps_v2(varargin) % Make the complete set of BVC model maps (for given phi and d ranges) for % 'canonical' environment shapes, as follows: % % 'hp' - Square environment 25x25 pixels % 'barrier N-S' % 'barrier W-E' % % etc .. FINISH ME! % % Note that all the env shape dimensions are hard...
bc5b71b1705ff0ebff6a830dbcb40991f9a7fe63983adef49c8552e15247f2c6
MATLAB
8,062
190
%% Cumulative well-tunnel/subregion-tunnel scatter plots % Sam Lassers % This program uses data from AFR tables to create a scatter plot of % frequency responses over an entire recording either between a specified % electrode-tunnel pair, or between an entire subergion of electrodes and % the entirety of a set of tunne...
72bbc46660240422bc6de813cd29b44d110380a836845d03d3b0a02802ebb3c1
MATLAB
8,079
229
% split into single and multi groups. % new. Use trials from dcNew var % option to re-run training and classifying or pull from saved data % sbjList is cell array of experiment "number". Ex: sbjList = {'01','02'}; % sbjList = {'08','10','12','13','14','15'};tInd = 8;featureName = 'Cumulative Sum';numRept = 5;numClasses...
a51bb9aca06f0734d1ad8e79e23bcb1a8053667cdd31216609f572ab78db7e15
MATLAB
8,080
241
function [clus] = cluster6D(cfg, dat) % [CLUS] = CLUSTER6D(CFG, DAT) % % Performs a 6-dimensional clustering on a thresholded data matrix. % The data matrix is a 2-dimensional representation of a 6-dimensional volume % Required fields for the input configuration are: % cfg.inside % cfg.dim % cfg.threshold % Copyri...
be1bf635bc1d363ceb7c0aa846d49923472a6fd4a3ff184cc79db085c76e1d16
MATLAB
8,114
268
% Probability Cue Response clear all; supPath = 'C:\Users\Noga\Documents\Vermis Data'; load ('C:\Users\Noga\Documents\Vermis Data\task_info'); % Make list of significant cells req_params.task = 'saccade_8_dir_75and25'; req_params.ID = 4000:5000; req_params.remove_question_marks = 1; req_params.grade = 10; req_params...
4f4e8c2a653c7965dd986e6893885c6894c57f8e5d8a2d79109a17f4ae0d35c6
MATLAB
8,118
183
%% Turbulence all empirical measurements original % Analyze turbulence from the TBI dataset in OpenNeuro: <https://openneuro.org/datasets/ds000220/versions/1.0.0/file-display/dataset_description.json % https://openneuro.org/datasets/ds000220/versions/1.0.0/file-display/dataset_description.json> % Load inputs clear al...
fbf14a105b5f40648dc239fd52232bc615a6e2794e0b645cf6c3d4f4ba61f718
MATLAB
8,118
183
%% Turbulence all empirical measurements original % Analyze turbulence from the TBI dataset in OpenNeuro: <https://openneuro.org/datasets/ds000220/versions/1.0.0/file-display/dataset_description.json % https://openneuro.org/datasets/ds000220/versions/1.0.0/file-display/dataset_description.json> % Load inputs clear al...
a0083422cf1e5a424536fe5a17a04226acb7483fc54beca91fba4db874c28389
MATLAB
8,123
183
%% Turbulence all empirical measurements original % Analyze turbulence from the TBI dataset in OpenNeuro: <https://openneuro.org/datasets/ds000220/versions/1.0.0/file-display/dataset_description.json % https://openneuro.org/datasets/ds000220/versions/1.0.0/file-display/dataset_description.json> % Load inputs clear al...
5bd1ad7bd94d4363eb0a1884f419269218d9f45e616124e7a04c92bbdb13a059
MATLAB
8,129
314
%% get population list clear; clc; close all; % PopPath = 'F:\Maurits\Population\'; datapaths; %% Fig2AB - FRA example plots (threshold elevation) close all; % Fig2A example unit 1 mouse1 = 42; unit1 = 196; G = figure('Position',[400,200,745,393]); s1=subplot(1,3,[1 1.3]); s2=subplot(1,3,[2.7 3]); load([FRAPath,'\M...
589f60ebe893412c005b0415777b5d8984bf1c250c9b331d7c1618f158e7e47e
MATLAB
8,131
349
%% Load data binsize = 0.2; % bin size for population vectors, needs to be large thSmooth = 2; % smoothing factor of population vectors iso = 1; % set to 1 if need to re-run Isomap [~, foldername, ~] = fileparts(pwd); load(fullfile('Data','SpikeData')); load(fullfile('Data','BehavEpochs')); load(fullfile('Data','C...
1a171c0f0fe1c69de062394b6a94b5543df9f68120784755458f0eb9d462d4c4
MATLAB
8,143
234
function [spfsOut,isOutlierOut,nOut,sectionDistanceToOriginOut,averagePixelSize_um] = spfComputeStackAverageAndRealign(spfs, speculatedDistanceToOrigin) % This function takes an array of Single Plane Fits (spfs) and rectify them % as they should all have the same alignment, as they are from the same % stack % % IN...
50c8b95202c2029a979e6f2d00cc40c8e333506ff4c980f01c3e96c52bb6956a
MATLAB
8,145
262
% Probability Tuning curves clear [task_info,supPath] = loadDBAndSpecifyDataPaths('Vermis'); req_params.grade = 7; req_params.cell_type = 'SNR'; req_params.task = 'saccade_8_dir_75and25'; req_params.ID = 4000:5000; req_params.num_trials = 50; req_params.remove_question_marks = 1; raster_params.align_to = 'targetMov...
0d636afd39bf1b353d8530a85f1add13361bb4b1752c23961444e5976b770b78
MATLAB
8,148
202
function [varargout]=errorbarxy(varargin) linewidth = 6.0; % ERRORBARXY is a function to generate errorbars on both x and y axes % with specified errors modified from codes written by Nils Sj?berg % (http://www.mathworks.com/matlabcentral/fileexchange/5444-xyerrorbar) % % errorbarxy(x, y, lerrx, uerrx, ler...
736cabd5c16ffb8edf5d810e841060280c9206260cbcde8d8d4f1ff0f33ded7e
MATLAB
8,153
182
%This analysis code was used in: %Mares I, Ewing L, Papasavva E, Ducrocq E, Smith FW, Smith MLS (in press). %Face recognition ability is manifest in early dynamic decoding of face-orientation %selectivity – evidence from multi-variate pattern analysis of the neural %response. Cortex. %The code was originally cre...