sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
a28eae5758ba7508d2ee9b01dc76422ffca6eb5e26f1f64da77cfeb626eb581b
MATLAB
16,516
508
ID='Gi17547' inputname=strcat('SortedData_', ID, '.mat'); load(inputname) disp('===LGL MSD inhibitory response during stance==='); temp0=[]; temp1=[]; temp3=[]; temp7=[]; for i=1:length(STANCE_LEFT.EXC(:,1)) if STANCE_LEFT.EXC(i,1)==0 & STANCE_LEFT.EXC(i,10)<0 temp0=cat(1,temp0, STANCE_LEFT....
fc34a9be8f1dfa2b70b6db016e80de351bd80aaa7d411bbf4e0d97284cec266b
MATLAB
16,531
440
%% Pipeline for processing fMRI phase and magnitude data for QSM using the QSM toolbox % % fMRI presents the possibility of saving phase data, which can be used for % QSM or as input to other phase-sensitive MR imaging pipelines % 29 Nov 2022 % Editors (alphabetical order): % Alexander Jaffray: ajaffray@physics.ubc.ca...
b769d32df5715be759d15e1a34251ea67e5d8b90e07c0af6eaa712f0c1bed683
MATLAB
16,543
548
function hgfMapOrt = saOrientation(fnTS,TS,DAVersion) %% function hgfMapOrt = saOrientation(fnTS,TS,DAVersion) % % Calculate and display orientation map % % Input: % - fnTS is the TS.mat filename, including pathname and extention (.mat). % - TS is the trial structure. % - DAVersion is the DA version. % % Output:...
3b147d2a8ea0a9d17b5115ca9117ec0de06595d7a830e8419c6ed335cf069f06
MATLAB
16,545
1
function B=inpaint_nans(A,method) % INPAINT_NANS: in-paints over nans in an array % usage: B=INPAINT_NANS(A) % default method % usage: B=INPAINT_NANS(A,method) % specify method used % % Solves approximation to one of several pdes to % interpolate and extrapolate holes in an array % % arguments (input): % A...
ede4bdf7674aef8c8c571cb4a14eeede78821712c1652ca2173863afe6452ae3
MATLAB
16,593
303
function fluor = GetROIfluor(expt, sbxInfo, ROI, fluor, deform, loco, varargin) % , T % IP = inputParser; addRequired( IP, 'expt', @isstruct ) addRequired( IP, 'sbxInfo', @isstruct ) addRequired( IP, 'ROI', @isstruct ) addRequired( IP, 'fluor', @isstruct ) addRequired( IP, 'deform', @isstruct ) addRequired( IP,...
122f4c308778f4955c714fb12abfdb8e41b1e6759bae62f922dbd5d0abf957d7
MATLAB
16,599
329
function [reg_transforms, varargout] = RegisterSBX(mov_path, sbxInfo, refImage, params, varargin) % NOTE: hardcoded path to ImageJ. IP = inputParser; addRequired( IP, 'mov_path', @ischar ) addRequired( IP, 'sbxInfo', @isstruct ) addRequired( IP, 'refImage', @isnumeric ) addRequired( IP, 'params', @isstruct ) a...
e87c00c9ca1162216ecc848ba90592eeac81bd73dfc5932cb2b5ad8c1ff454a5
MATLAB
16,602
417
function TrainOneMouseAtATime(unifyContextClasses ,averageAllBoutsFromSession ,... NumTrees,TakeJustTheta,TakeJustGamma,matlabImpute,imputeIters, ... substractMouseMean, usedMouseId,LeaveOut,balanceClasses,... excludeClassesFromTrain,excludeClassesFromAnalysis, useStdMatrix, outFname) %LeaveOut can be...
81a40f515975f425721148cd85d60f51382974b35c5a3f865133154b114eb4fc
MATLAB
16,621
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...
3c5d90c548738f5a98c76cc7ca124707cae1a055a1cb79e72d2d8371befa59da
MATLAB
16,625
271
function [cm_data]=inferno(m) cm = [[ 1.46159096e-03, 4.66127766e-04, 1.38655200e-02], [ 2.26726368e-03, 1.26992553e-03, 1.85703520e-02], [ 3.29899092e-03, 2.24934863e-03, 2.42390508e-02], [ 4.54690615e-03, 3.39180156e-03, 3.09092475e-02], [ 6.00552565e-03, 4.69...
83b072a925f401fed37c53b7c3390f20f0c63af6a23821285aed0051a6d5f547
MATLAB
16,642
339
%% compare all/exp/comp decodings decodingDataPath = 'D:\MATLAB\Dura\decodingAnalysis.mat'; if exist(decodingDataPath, 'file') fprintf('\nLoading %s', decodingDataPath); load(decodingDataPath); else thetaBinWidth = pi/8; % /2 NactBin = 10; thetaLim = [-pi,pi; -pi,-pi/2; 0,pi/2]; % minF...
853f9d6a2a6139ab9bdf3dcd3de71822661e01dfec3deb15d192c7479109302f
MATLAB
16,652
438
function [coef,alphas,offset] = fracridge(X,fracs,y,tol,mode,standardizemode) % function [coef,alphas,offset] = fracridge(X,fracs,y,tol,mode,standardizemode) % % <X> is the design matrix (d x p) with different data points % in the rows and different regressors in the columns. % <fracs> is a vector (1 x f) of one or ...
6d28fc86c8cadfcbb83aaf8acbde2420a13aa654e0d8a4a35afbf992b55b866e
MATLAB
16,716
367
ccc; saveFolder = 'C:\Users\gio\Documents\MATLAB'; mainFolder = fullfile(saveFolder, 'Two_photonMat'); collectTimeSeries = false; if collectTimeSeries %% cd(mainFolder) [~,list] = system('dir /S/B *CsChrimson'); list = textscan(list, '%s', 'Delimiter', '\n'); expFolders = list{1}; l = 1;...
e7832bae137d83377e8d97668fa90acd229a1bd5f922e3efd71b0d77ce6a8330
MATLAB
16,720
377
%@file OptimizeNeurostim.m %@authors Marco Bonizzato https://github.com/mbonizzato % Samuel Laferriere https://github.com/samlaf % Rose Guay-Hottin https://github.com/RoseGH20 %@version 1.0 / June 2021 %Full, variable-lengthscales implementation of GP-BO optimization of neurostimulation %T...
ca36094900d3882f5ef0dcd30f7f8aae4aae77bc1214165662ca6e029235f1d5
MATLAB
16,741
367
%% Bootstrap for HT's extracted matrix data INFO: clear all; close all; clc plotting_params.vars = {'ID', 'EEG power PSD', 'pre-Sz HON activity', 'Sz HON activity', 'post-Sz HON activity'}; data_dir = '/Users/handow/polybox/Submission/DSE paper/Submission/Nat Com/Raw source data/Matlab file/Fig 2 Sz HON modeling...
bc36911196bc5fda5cb18fcb1ca6b1c311ef9b9cfbc878010b9db88d57c063c9
MATLAB
16,761
455
function view = stGridFit(view,params) % stGridFit - fit spatiotemporal retinotopic model along grid (coarse stage) % % the structure of the code follows rmGridFit % 2020/12 Insub Kim: if notDefined('view'), error('Need view struct'); end if notDefined('params'), error('Need params'); end %------------------------...
f3f6624f2a86b2f75e8d7185baf0a0920b408ea3b711918d80dee3c2f29a196b
MATLAB
16,934
295
function [maxLikeTheta, likeTheta, errStruct, P, Pdens, trainData, testData, decodeLim] = DecodeDirection(deformIn, activityIn, varargin) % Decode the direction of stretch from the neural activity using the maximum likelihood method IP = inputParser; addRequired( IP, 'stretchIn', @isnumeric ) addRequired( IP, 'acti...
4c4f9c3602bf5a49aefb1ca9bbf2c265a69e73dbf517937a8bb239860d1cd073
MATLAB
16,996
597
% load('E:\learningAnalysis\summaryManyMice_includingOldEnvGoodMoreMice\runingLocationConsistency\meanAllConsLoc.mat'); % load('E:\learningAnalysis\summaryManyMice_includingOldEnvGoodMoreMice\runingLocationConsistency\semAllConsLoc.mat'); % meanG=meanAllConsLoc; % semG=semAllConsLoc; % % load('E:\learningAnalysis...
d8e8d164f4ddc289489e76eb685a1d73e27ff64018b9227f3174d69dd238de10
MATLAB
17,027
440
% ADVANCED CLASSIFICATION % % This tutorial covers more complex classification scenarios such as % higher-dimensional data (time-frequency), searchlight analysis across % multiple dimensions and precomputing of kernels. % % Contents: % (1) Create a time-frequency dataset % (2) Classification of 4D time-frequency data %...
0eeb2d41ad497e33f08d162f0257ad86d909ad42836fdac936b182e1f4aca917
MATLAB
17,054
536
function saveName = st_sim_makeSessionTable(sessionDir,rmFiles,viewType) %% create table for fMRI pRF if notDefined('sessionDir') sessionDir = pwd; end if notDefined('viewType') viewType = 'gray'; end if strcmp(viewType, 'inplane') viewType = 'Inplane'; elseif strcmp(viewType, 'gray') viewType = 'Gra...
f1bafa72bba2e13e00081fff7dfd238d53a3bf67e76d1c1038933b212679bf9b
MATLAB
17,063
380
% NEURON_TEMPLATE_TREE Export tree as NEURON file. % (trees package) % % [name, path, minterf, tree] = ... % neuron_template_tree (intree, name, options) % -------------------------------------------------------------------- % % Saves a complete tree in the section based neuron '.hoc' format. ...
cb4da2635ac3ce80d2a6de20de4cff5c917e568f06a3fd67b9c2d4f8e56cff1e
MATLAB
17,086
353
figure('Units','normalized', 'OuterPosition',[0,0,1,1], 'color','w'); for x = x3Dcsd %xPresent preScans = 1:expt(x).scanLims(expt(x).csd); % Pre-CSD scans csdScans = (expt(x).scanLims(expt(x).csd) + csdBout{x}(expt(x).csd).scan{1}(1)):(expt(x).scanLims(expt(x).csd) + csdBout{x}(expt(x).csd).scan{1}(end)); ...
f5f8cfcddcbf444a129bd4e952d5c7a60fc2f7682e185c46a7c1e2b97f1bf0b1
MATLAB
17,092
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 %points...
f3a021d9ca97de07f7c3263cecf068324cbeff00f00b7eca33955333e9768da9
MATLAB
17,095
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 %points...
c90bfedc44581da625d29109abdf6b1a1f1a9225d4f5b527212443d9d908e452
MATLAB
17,123
424
% This script loads in highly processed data to generate some ephys validation plots. % Access to the real data can be provided on request (the data-sets are % very large in size). clearvars % point to fig_8_ephys/data directory data_dir = uigetdir();% cd(data_dir); % Generate lateral photoinhibition curves for ALM...
02fbc63c85adab3d12e14a90e8f318f4daba5731a0ebbfa30bcead43e5baf511
MATLAB
17,175
422
function ElectodesClassificationMatlabFuncV2(unifyContextClasses ,averageAllBoutsFromSession ,... NumTrees,TakeJustTheta,TakeJustGamma,matlabImpute,imputeIters, ... substractMouseMean, usedMouseId,LeaveOut,balanceClasses,... excludeClassesFromTrain,excludeClassesFromAnalysis, useStdMatrix, useLFP, useFea...
b055483af66963fa5931e8a7fd3b08f901c60ea34aead86fc50c55baefdb44fb
MATLAB
17,240
555
clear; %% function hgfMapOrt = saOrientation(fnTS,TS,DAVersion) % % Calculate and display orientation map % % Input: % - fnTS is the TS.mat filename, including pathname and extention (.mat). % - TS is the trial structure. % - DAVersion is the DA version. % % Output: % - hgfMapOrt is the handle of...
78885a5a112d078797833a1a70ab6f64d647d2d5f8e02464acf566a254d90d00
MATLAB
17,295
350
% -- compare performance for each model using each dataset % -- expected directory structure: % -- [raw_data]/[model_name]/[dataset_name]/[model_name|model_name_records|matlab_environment].mat % -- [testset_path]: path to dataset used for the test classification whereami = pwd; raw_data = '/Users/gustavo/git/a...
9817e4f21a252bbdc7256564733e59f9efbb1c0dd4c8b3ffbbe477bc54261d59
MATLAB
17,411
310
%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...
a185d36bae59dd97633ba5dcc57c0b60b9f9f0a70cf3737a657125099b46da8d
MATLAB
17,414
310
%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...
1309b3dce4d4aefb92368306b4bf67dcb7f760f2edd7c978291a0dcb8b2f4673
MATLAB
17,447
466
classdef RawImgComposite < RawImgHelper & IRawImg %RawImgComposite - Class implementing 'composite' raw images % % The RawImgComposite class implements functionality related to % 'composite' RawImg objects. RawImgComposite objects reference a subset % of a 'normal' RawImg object, as opposed to 'normal' RawImg obj...
2419f7e26761c63220cfb4ab3c5058a965e3568953dea3df9a9a5570d68dad02
MATLAB
17,451
424
%% In this script, we confirm that our implementation of information limiting correlations % causes information to saturate as the number of neurons in the population % increases clear all; close all; % Load Gabor fitting results of the neurons that we want to analyze load('analysisFiles/physio/results_populationFI_w...
9ec9fc639a82d3568e7550abfbce7cf8df44e73fa5e280f46953b2941923e7c0
MATLAB
17,552
433
function [map,num,typ] = brewermap(N,scheme) % The complete selection of ColorBrewer colorschemes (RGB colormaps). % % (c) 2015 Stephen Cobeldick % % Returns any RGB colormap from the ColorBrewer colorschemes, especially % intended for mapping and plots with attractive, distinguishable colors. % % Syntax (basic): % ma...
cefec6c79d0499eb45df4fda8f8949f582f38a2b3f29f1eeca81ff08a5ab637f
MATLAB
17,615
472
% LOAD_TREE Loads a tree from the swc/neu/Trees format. % (trees package) % % [tree, name, path] = load_tree (name, options) % ---------------------------------------------- % % Loads the metrics and the corresponding directed adjacency matrix to % create a tree in the trees structure. % % Input % ----- % - name ...
1d59ae2ede5d59e868f4bde3e230dc3cb8ce711d0cd27d4d9beded9d73d18179
MATLAB
17,619
456
classdef controller < zapit.gui.stimConfigEditor.view % Graphical editor for stimulus configuration files. % % zapit.gui.stimConfigEditor.controller % % Purpose % This class controls a GUI that serves as an editor and creater of stimulus configuration % files. This class inherits zapit.gui....
1755a5ced99659b797c4ecab46d7c465d6f8092fd2095568f96ca3304c40f6d8
MATLAB
17,652
351
% Find fluorEvent associated with stillness and locomotion - run BoutResponse first - NEW VERSION stillEpoch = cell(1,Nexpt); stillBin = cell(1,Nexpt); stillSumm = cell(1,Nexpt); SAFE = cell(1,Nexpt); Nsafe = cell(1,Nexpt); % LAFE = cell(1,Nexpt); Nlafe = cell(1,Nexpt); CAFE = cell(1,Nexpt); Ncafe = cell(1,Nexpt); t...
e2dc96330209d532f6045cf4fbf4eea488f2b3519e9f99ffcf384ff7faf2a9d4
MATLAB
17,658
466
function [ mesh_handle ] = paint_mesh( color_values, ... transparency_values, ... add_new_layer, ... mesh_object) % PAINT_MESH colors a patch object by attaching color-mapped numeric values % to the mes...
4abd73eb64872f6b822b4476424991d9ff1307b79ac9c5083699b2c9716be140
MATLAB
17,718
474
% run_megapressproc.m % Jamie Near, McGill University 2014. % % USAGE: % [out1_diff,out1_sum,out1,outw,coilcombos]=run_megapressproc(filestring,coilcombos,avgAlignDomain,alignSS); % % DESCRIPTION: % Processing script for Siemens MEGA-PRESS MRS data in .dat format (twix % raw data). Includes combination of reciever ...
2302973df1643ad693407bb178f47ff551b1ded174d4149c1a3c4416bb75de1f
MATLAB
17,752
492
function varargout = plot_ICAsigs(self, objPI, hAx, varargin) % CellsortICAplot(mode, ica_filters, ica_sig, f0, tlims, dt, ratebin, % plottype, ICuse, spt, spc) % % Display the results of ICA analysis in the form of paired spatial filters % and signal time courses % % Inputs: % mode - 'series' show...
bcdd27bf1ebd660f34c2a006aed92836f601037d9ca6a03bea11a4c261aefe27
MATLAB
17,763
645
if true clear close all force %load tirals info load('a0_0_bhv2trialStrct.mat'); load('a0_8_timingLeftVsRight.mat','timeOnEyeAll') load('a6_1_createAvergedMorphedHeatMaps_3_AfterReview', 'timeOnEye_AfterReview'); end UMonkey = [1,3]; NIImage_IndividualAndGroup5 = [... 7 11 25 2...
338985c7ee716872905fd0c586e7ee8ab4cca413e802e1e15ae776fcaee9c5c1
MATLAB
17,771
352
%% Use GLM to assess contribution of different variables preCSD_pred = cell(1,Nexpt); preCSD_resp = cell(1,Nexpt); preCSD_opts = cell(1,Nexpt); preCSD_result = cell(1,Nexpt); preCSD_summary = cell(1,Nexpt); figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir ) %rLocoPreFit = cell(1,Nexpt); GLMname = 'postCS...
fc667084e3e698ea72cea4dca4b4d0b99860f3aa8fb34f0501d696c40b59adbf
MATLAB
17,913
464
% CLONE_TREE Cloning a tree type using the MST constructor. % (trees package) % % trees = clone_tree (intrees, num, bf, options) % ---------------------------------------------- % % Creates a set of num trees similar to an input set of trees % intrees by distributing points randomly in the spanning fields of the % av...
aecc548476ee185860c095d245295797c97b32b2e86f1b607426113dc05d0bac
MATLAB
17,934
313
function csdWave = GetNeuropilWaveSpeed(expt, catInfo, periBout, voxInd, varargin) % Track how fast a CSD wave washes across a set of specific volumes (ROIs, axons or neuropil) IP = inputParser; addRequired( IP, 'expt', @isstruct ) addRequired( IP, 'catInfo', @isstruct ) addRequired( IP, 'periBout', @isstruct ) a...
b2752c2235ed5efadb59b64bffed618fb1bbfc13c46151c805bf4bf57d206577
MATLAB
17,969
453
classdef ConfigDetectSigsClsfy < ConfigDetectSigs %ConfigDetectSigsClsfy - Parameters for detecting and classifying signals % % The ConfigDetectSigsClsfy class is a configuration class that contains % the parameters necessary for detecting and classifying signals from ROI % traces. For further information about t...
696f1a974b954d09f482b4dd5024c3923a8e3c328302e801a9a37d57052f9e72
MATLAB
18,020
496
function varargout = plot_ICAsigs(self, objPI, hAx, params) % CellsortICAplot(mode, ica_filters, ica_sig, f0, tlims, dt, ratebin, % plottype, ICuse, spt, spc) % % Display the results of ICA analysis in the form of paired spatial filters % and signal time courses % % Inputs: % mode - 'series' shows ...
a8e83a033b926795f817e4942a1fa38fd445877d823e6cb9a22e04e2ebbecff1
MATLAB
18,061
486
cd 'C:/Work/MatlabCode/projects/BrainMetabolismModeling/BrainMetabolismModeling' ecModel = load('data/MinModel.mat').minModel; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Start with glycolysis, i.e. feed on glucose, no oxygen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %op...
671704f4509cd1d8ebf569a7992d8b645cecf9b5abf9584e114e2e48ddd0fa63
MATLAB
18,146
423
% run_simMegaPressShapedRefoc_fast.m % Jamie Near, McGill University 2018. % % USAGE: % [outDIFF,outOFF,outON]=run_simMegaPressShapedRefoc_fast(spinSys); % % DESCRIPTION: % This script simulates a MEGA-PRESS experiment with fully shaped % refocusing pulses. Phase cycling of the refocusing pulses is performed % and...
b4b714ceca0320047364f584e94673137c4e63996f5de7f2b8f7ef33fb2b8415
MATLAB
18,333
463
function cf = train_logreg(param,X,clabel) % Trains a logistic regression classifier with logF or L2 % regularization. % % Note: Due to the exponential term in the cost function, it is recommended % that X (the data) is z-scored to reduce the probability of numerical % issues due to round-off errors. % % Usage: % cf...
735c3fef0c5489aa1124a9fed6e7bcfe95ed0e181daf57fd54e1dcad04824b60
MATLAB
18,386
420
function ElectodesClassificationMatlabFuncV3(unifyContextClasses ,averageAllBoutsFromSession ,... NumTrees,TakeJustTheta,TakeJustGamma,matlabImpute,imputeIters, ... substractMouseMean, usedMouseId,LeaveOut,balanceClasses,... excludeClassesFromTrain,excludeClassesFromAnalysis, useStdMatrix, outFname) % V...
fbee762ea23dcf7e2e41cc80c1f4cb167dfceadd02d459d4bfb1c946b6bad3da
MATLAB
18,402
494
classdef Test_RawImg < matlab.unittest.TestCase % TEST_RAWIMG Summary of this class goes here % Detailed explanation goes here properties (Constant) fnCheckDenoise = 'denoise.mat'; end % ================================================================== % methods (Test) ...
3ce2be9718f673379d536ba431e93d0c494716b20681dd94d4219e740f957fd9
MATLAB
18,477
527
classdef (Abstract) Data %Data - Superclass for Data classes % % The Data class is an abstract superclass that implements (or requires % implementation in its subclasses via abstract methods or properties) % most functionality related to Data objects. Typically there is one % concrete subclass of Data for ever...
ffd257aa26351e81b313c6fb52c85529b52041c2fc69834b53a1db4c57e7da55
MATLAB
18,514
601
function inputemu(varargin) %INPUTEMU Java-Based Mouse/Keyboard Emulator % INPUTEMU(ACTION,PARAM) emulates the human input via mouse and % keyboard. This utility uses Java java.awt.Robot class. % % INPUTEMU(MOUSE_ACTION,[X Y WHEEL]) performs mouse emulation with 5 % action types: % % 'move'|'none'|'wheel...
2f82be63f009351efd7f917425abb95700bcfadce422a5f20d418d7db3dbb98b
MATLAB
18,545
502
% run_megapressproc_GEauto.m % Jamie Near, McGill University 2017. % % USAGE: % [diffSpec,sumSpec,subSpec1,subSpec2,outw]=run_megapressproc_GEauto(filestring,coilcombos,avgAlignDomain,alignSS); % % DESCRIPTION: % Fully automated processing script for GE MEGA-PRESS MRS data in P-file % format (GE raw data). Includes...
057083de8d9dceff4dbd791b850def711b87a287fb3f42ed6a1198ed3979d88c
MATLAB
18,547
486
cd 'C:/Work/MatlabCode/projects/BrainMetabolismModeling/BrainMetabolismModeling' ecModel = load('data/MinModel.mat').minModel; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Start with glycolysis, i.e. feed on glucose, no oxygen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ...
a8e5480ac4ea630a26aa109a4bfe6928fc0f9e0ac14e6d7bf061e4f1f4ae19ad
MATLAB
18,696
440
% Figure06.m % Plots for Figure 6 in manuscript. % The same approach is used for Supplementary Figure S04. % % EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN. % J. Algermissen, 2018-2023. % Should work in Matlab 2018b. % we are here: % cd /project/3017042.02/Analyses/FiguresOutcomeLocked % clear all; close all; clc % ...
d2538593d7a71d7388bcda27a633d9e05f3a6eaa06480d5d36d34159ddc46b05
MATLAB
18,697
322
% Find fluorEvent associated with stillness and locomotion - run BoutResponse first - NEW VERSION stillEpoch = cell(1,Nexpt); stillBin = cell(1,Nexpt); stillSumm = cell(1,Nexpt); SAFE = cell(1,Nexpt); Nsafe = cell(1,Nexpt); % LAFE = cell(1,Nexpt); Nlafe = cell(1,Nexpt); CAFE = cell(1,Nexpt); Ncafe = cell(1,Nexpt); t...
408a6f9e367105401dddfa21514144c48ba731fe391048c1b6995e4ab952dad8
MATLAB
18,758
441
% FigureS04.m % Plots for Figure S04 in manuscript. % The same approach is used for Supplementary Figure S04. % % EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN. % J. Algermissen, 2018-2023. % Should work in Matlab 2018b. % we are here: % cd /project/3017042.02/Analyses/FiguresOutcomeLocked % clear all; close all; clc ...
2f5b7f5533996ddb95da2687885ba2641986c024509fdb8d14c19431ffcc27f1
MATLAB
18,808
503
% run_megapressproc_auto.m % Jamie Near, McGill University 2014. % % USAGE: % [diffSpec,sumSpec,subSpec1,subSpec2,outw]=run_megapressproc_auto(filestring,coilcombos,avgAlignDomain,alignSS); % % DESCRIPTION: % Fully automated processing script for Siemens MEGA-PRESS MRS data in .dat % format (twix raw data). Include...
f64938f9c5ed9aba42db1cb1f66789554af75de8088b33f4721ea7412a895738
MATLAB
18,885
524
% PLOT_TREE Plots a tree. % (trees package) % % HP = plot_tree (intree, color, DD, ipart, res, options) % ------------------------------------------------------- % % Plots a directed graph contained in intree. Many settings allow to play % with the output results. Colour handling is different on line plots than % on ...
927a023edcd713f958ea460cb53f63670db49a212a16af6bb96422f8e0ecf950
MATLAB
19,017
517
% run_megaspecialproc_auto.m % Jamie Near, Sunnybrook Research Institute 2022. % % USAGE: % [diffSpec,sumSpec,subSpec1,subSpec2,outw]=run_megaspecialproc_auto(filestring,coilcombos,avgAlignDomain,alignSS); % % DESCRIPTION: % Fully automated processing script for Siemens MEGA-SPECIAL MRS data in .dat % format (twix r...
b9ab8ad9372b116e9eb45be14285c4a145a93154d65e3ba3168cb4144a2bd7e6
MATLAB
19,091
457
%DISSECTSHOLL_TREE Dissects Sholl intersection profile of a tree. % (trees package) % % [Output] = dissectSholl_tree(intree,options,c) % -------------------------------------- % % returns a dissected Sholl intersection profile structure (see Bird and Cuntz 2018) % Input % ----- % - intree ::integer: index of tree in...
bd67ef8ccbfc0a041282c4b6eb1f00d09dce2f106795dfee699072e69e4ec4a1
MATLAB
19,095
492
classdef LineScanDiam < ProcessedImg & ICalcDiameterLong %LineScanDiam - Class to analyse line scan images of vessel diameters % % The LineScanDiam class analyses line scan images of vessel diameters % acquired by scanning perpendicular to the vessel axis. Typically, the % vessel lumen will be labelled by a fluo...
c17c0ce1ed9230e8464f9415a4fe2ed376d73f9eae56858073185e1bea3f0b7e
MATLAB
19,259
584
ID='Gi17547' fname=dir('*_resp.mat'); timepoint=[]; LOCO=[]; STOP=[]; RESET=[]; for i=1:length(fname) tempname=fname(i).name; load(tempname) cur=fname(i).name(9:11); switch cur case 'ctl' timepoint=0; case 'wk1' timepoint=1; case 'wk3...
7b794f329be0959a3cb70260fa61a8c2ea2e81dd86e51e6125cb3a5a70a0e593
MATLAB
19,344
538
% FigureS14.m % Plots for Supplementary Figure S14. % % EEG/fMRI STUDY, DONDERS INSTITUTE, NIJMEGEN. % J. Algermissen, 2018-2023. % Should work in Matlab 2018b. % we are here: % cd /project/3017042.02/Analyses/FiguresOutcomeLocked % clear all; close all; clc % Set root directory: cd(fileparts(which('figures_set_roo...
161f5c282d8c80adfdd3a763ee801bcd8bb3b2f7b396bd058172f11bd3770fbf
MATLAB
19,372
464
% loadParameters; %This loads puncta_centroids and puncta_voxels (the list of voxel INDICES) %per puncta filename_centroids = fullfile(params.punctaSubvolumeDir,sprintf('%s_centroids+pixels.mat',params.FILE_BASENAME)); load(filename_centroids) load('groundtruth_dictionary.mat') THRESHOLD_MATCHING_DISTANCE = 10; MERG...
36d11b4812a846c25d9822f571bed04c01fb39a879628da60cf0ce074c54ef0b
MATLAB
19,627
382
function csdWave = GetNeuropilWaveSpeed(expt, catInfo, periBout, fluor, voxInd, varargin) % , waveSpeedPval % Track how fast a CSD wave washes across a set of specific volumes (ROIs, axons or neuropil) IP = inputParser; addRequired( IP, 'expt', @isstruct ) addRequired( IP, 'catInfo', @isstruct ) addRequired( IP, '...
328da5eb3e79c97c939f2b3dfd1ff6965984799a8a421a340b1a3347c0372628
MATLAB
19,678
357
function [props, fig, figname] = t2n_APprop(targetfolder_data,neuron,currstep,tree,dataset,askfile) % This function analyzes and optionally plots various action potential (AP) % characteristics at a current injection step previously simulated with t2n_currSteps % % INPUTS % targetfolder_data destination of temporary ...
140c1a97955f631f71328d93990d651e29121c35c1aef26054b3c1bfc51ee8c1
MATLAB
19,779
475
%clc %clear all %Setting up plot_stats_per_bin=1 scatter_step=3 save_plot_spectrograms=1 % Plots the spectograms with axes save_histogram_per_animal=0 save_excel_file=1 save_plot_3d_info=0 axes_dots=1 % Show the dots overlapping the vocalization (segmentation) size_spectrogram = [227 227] use_DL = 1 bin_size = 300 %in ...
03df50964838e21e25c3a2c66cbdcc23c16df051d295fb9ebb76db93175098d4
MATLAB
20,007
489
% EEGfMRIPav_cbm_parameter_recovery.m % This is an interactive script---execute it step-by-step. % Its performs parameter recovery for a selected model. % The following steps have to be executed beforehand: % - Fit model using EEGfMRIPav_cbm_fit to obtain parameters fitted to % actual data. % - Simulate new data using...
8963cd3cc876da93953581eda7c0e4c43a20233cfcd9ab67fd2002696aaa8b22
MATLAB
20,096
420
clearvars -except ppp SC_group_level_stat_input.subnum=0; for sub = {'IR29','IR35','IR51','IR54', 'IR57' ,'IR75','IR84'} sub=char(sub) clearvars -except sub SC_group_level_stat_input ppp cd(['\\mycloudpr4100\ivan\HaoxinAnalyses\' sub]) load([sub '_log_EMOPSData.mat']) load([sub '_Haoxin...
3596b51a40736f30ad11f6b41dea574868e8a0c4c4e23fd903a8ae20ac158f72
MATLAB
20,108
484
% EEGfMRIPav_OutcomeLocked_9_TF_grouplevel_test % This is an interactive script---execute it step-by-step. % Set the appropriate job settings for loading TF data aggregated across % subjects, then perform tests. % - cluster-based permutation test with Fieldtrip % - evaluate stat output object % - plot stat output obje...
150c4e847559546c9c0aecd9ad89a6fe34fd8147ab80910587fea9fc788781ff
MATLAB
20,110
685
%IMDISP Display one or more images nicely % % Examples: % imdisp % imdisp(I) % imdisp(I, map) % imdisp(I, lims) % imdisp(I, map, lims) % imdisp(..., param1, value1, param2, value2, ...) % h = imdisp(...) % % This function displays one or more images nicely. Images can be defined % by arrays or filenames....
c441a4c57db858b61d0f3a1d06a962472e39ea87169e38bfd9b883580278f224
MATLAB
20,292
630
function [AreaXCord,AreaYCord,AreaZCord,AreaName]=BrainAreasListAndCoordinates(AreaNumber,app) AreaXCord=0; AreaYCord=0; AreaZCord=0; AreaName='No Name'; % % % % %%%%%% Spacial Brain data %%%%%%%%%%% if app.PopSD_RatRadiobutton.Value==1 if AreaNumber==1 ...
761f829d21c819522e3f6a97e662510b642a84aa13a9140195239ded5577bac2
MATLAB
20,367
505
classdef ConfigFindROIsFLIKA < ConfigFindROIsAuto %ConfigFindROIsFLIKA - Parameters for FLIKA-based ROI identification % % The ConfigFindROIsFLIKA class is a configuration class that contains % the parameters necessary for FLIKA-based region of interest (ROI) % identification. For further information about FLIKA,...
3e6fac5f26d0db472960daf3f1363c3135931a5fba13a7fccd8663c595bdd299
MATLAB
20,499
478
% run_simMegaPressShaped_fast.m % Jamie Near, McGill University 2018. % % USAGE: % [outDIFF,outOFF,outON]=run_simMegaPressShaped_fast(spinSys); % % DESCRIPTION: % This script simulates a MEGA-PRESS experiment with fully shaped editing % and refocusing pulses. Phase cycling of both the editing and refocusing % pulses...
5e683c9a1ee2fd9af9c14304305cb780a76db22e5e3230f9c6b61a0cef63799e
MATLAB
20,521
593
% NEUROLUCIDA_TREE Loads a tree from the neurolucida ASCII format. % (trees package) % % [tree, coords, contours, name, path] = neurolucida_tree (name, options) % ----------------------------------------------------------------------- % % loads the metrics and the corresponding directed adjacency matrix to % create a...
d9617055083852a2eb72cd4e124895e6f9fcb92cdd6db1c6e4280e9999ac10b5
MATLAB
20,689
482
%% Preprocessing.m % Converts raw MaxFiltered MEG recordings into SPM format, epochs them, % detects bad channels/trials, and merges the three main-task runs per % subject. Produces the merged, artefact-flagged files (cesub-*.mat) that % Analysis.m operates on. % % Run top to bottom in one session (the four stages shar...
44d7de355973936091b0b427614374a5e46e7972b1cca4e4af2a9fc88d162cdb
MATLAB
20,827
428
classdef view < matlab.apps.AppBase % Properties that correspond to app components properties (Access = public) hFig matlab.ui.Figure FileMenu matlab.ui.container.Menu NewstimconfigMenu matlab.ui.container.Menu Loadsti...
83c0e49ecff967138a7a013b966b6fea7458f83c7369182e55fa21f07c00e9c4
MATLAB
20,914
488
% ---------------------------------------------------------------------------------------------- % -- Title : VocalMat Classifier % -- Project : VocalMat - A Tool for Automated Mouse Vocalization Detection and Classification % -----------------------------------------------------------------------------------...
3f95599a9e97adb3fe4106bf50a064bda0a95621e515682f13cee0bbf1f4dbc5
MATLAB
21,041
431
%% Use GLM to assess contribution of different variables postCSD_pred = cell(1,Nexpt); postCSD_resp = cell(1,Nexpt); postCSD_opts = cell(1,Nexpt); postCSD_result = cell(1,Nexpt); postCSD_summary = cell(1,Nexpt); figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir ) GLMname = 'postCSD_3D_GLM_TScShDtStDshZL'; ...
998a82abe716a5d7d3d717a87b4b6ba1cc7bebd94e65aaeb1e15738cce9817ac
MATLAB
21,219
490
classdef nufftOp % Perform nufft using method of Beatty et al (doi.org/10.1109/TMI.2005.848376) % % Usage: Define nufft object using N = nufftOp(imN, kloc, {dcf, useGPU, os, % kwidth}), where the inputs in {} are optional. Then, use N*im to apply % type 2 nufft (i.e., Cartesian to non-Cartesian) and use N'*kvals to app...
8f914c899d53ec3ce96ce7bade5b8eed99a196e85808cc3f6a5b58f69da147bf
MATLAB
21,225
1,035
%Default AAL atlas: AALnii=load_nii('aal.nii'); %Number of regions: Naal=90; centr = load('../data/centroids_LEiDa_5.csv'); centr = transpose(centr); centr1 = centr(:,1)/max(abs(centr(:,1))); centr2 = centr(:,2)/max(abs(centr(:,2))); centr3 = centr(:,3)/max(abs(centr(:,3))); centr4 = centr(:,4)/max(abs(centr(:,4)));...
ebdbb944fed5f4cf9ce6583306eda11e9c73449df4f217759107875acb601ef3
MATLAB
21,281
687
function results = MAIN_TOY_LOOPS(N,realz,modif) % parameters NF = 100; mu = 0.5; %(1-mu)*L + mu*(Ls) options.graph.nn = 10; %KNN graph number of neighbors %% Loop process results = []; for dim = 1:modif.additDim for r = 1:realz fprintf('Dim replicates: %i, realization...
a499109f7dbca24c045439a5b17f4a68135ba2dbbee8fe952083b07575b6d667
MATLAB
21,325
474
function [perf, result] = mv_regress(cfg, X, Y) % Regression of multi-dimensional data. The interface is very similar to % that of mv_classify. % % Usage: % [perf, res] = mv_regress(cfg, X, y) % %Parameters: % X - [... x ... x ... x ] data matrix or kernel matrix of % arbitrary dimensions...
acf69e01bdbc843c1444d048ed9c3aabc390b46fbce5db8355443edc25cdf516
MATLAB
21,371
502
function [PCT,PCP,rearrthetatimes,firstspiketimes,ofst,thetatimeorders,percyclespknum,... ttarm,alltempos,trialcycles,posincycles,poscycleinbins,thetaspeed,thetavectors,... spatempmtx,spatemp,ethP_CS,de_CS,nnde_CS,qde_CS,estPv_CS,realposvect,timeposdistr,... randAlltrials,randLtrials,randRtrials] = place...
c2554b4a32f832dac5e2ae7592bbb0d085ab56310d5abc94425448dba1dc40c8
MATLAB
21,480
455
%% View the big picture data viewLims = struct('trans',[-Inf,Inf], 'scale',[-Inf,Inf], 'stretch',[-Inf,Inf], 'shear',[-0.03,0.03], 'shift',[-3, 3], 'velocity',[-3, 15], 'fluor',[-5, 5]); for x = [9,13] % xPrePost %xPresent % xPresent % x2D %xPresent %find(locoFrac(:,2) < 0.02)' %xWave %xPresent %sortROI = [bout...
f376333afbd20c4913377d4ddadb7bde3ab1f5761a6bd05ea226b76b4b99dd16
MATLAB
21,507
500
% ---------------------------------------------------------------------------------------------- % -- Title : VocalMat Classifier % -- Project : VocalMat - Automated Tool for Mice Vocalization Detection and Classification % --------------------------------------------------------------------------------------...
4f235e19e353ad1976ceedd21c72b87964323dbbe07f68b3f6b3241e2d5a44f1
MATLAB
21,573
505
%% *T2N simulations* % % Note: T2N requires NEURON and TREES to be installed! See Documentation for further information. % Note for Mac users: Matlab has to be run from a Terminal for T2N to work % properly. % Let's load first the trees to be simulated wttrees = load_tree('../data/mtrs/wt_aligned.mtr');%{sample_tree...
7482a7da7dd9151b4fc54791089ac0bb9e8a2a27b113bcc6b184f025092e2699
MATLAB
21,582
501
%% *T2N simulations* % % Note: T2N requires NEURON and TREES to be installed! See Documentation for further information. % Note for Mac users: Matlab has to be run from a Terminal for T2N to work % properly. % Let's load first the trees to be simulated wttrees = load_tree('../data/mtrs/wt_aligned.mtr');%{sample_tree...
f6c8c736d77b3a09a82a1aceb7db0f391bda1d61ef48f164a67b72a0de2cb0ae
MATLAB
21,640
509
%% *T2N simulations* % % Note: T2N requires NEURON and TREES to be installed! See Documentation for further information. % Note for Mac users: Matlab has to be run from a Terminal for T2N to work % properly. % Let's load first the trees to be simulated wttrees = load_tree('../data/mtrs/wt_aligned.mtr');%{sample_tree...
f430aae523074ec8864e5927a2f8f0590c15227c06831ded7f4967647cfd2212
MATLAB
21,725
879
function LocoAnalysis2c(inputname, timepoint, STOPDETECT) %Last modification November 29, 2021 %inputname='Gi10852'; inputname2=strcat(inputname, '_', timepoint, '_trigZ.mat'); inputname3=strcat(inputname, '_', timepoint, '_trigMU.mat'); load(inputname2) load(inputname3) %threshold in terms of motor unit den...
ef556858cf1278c64743b12a65d8f6ed7d4d524e8c810fe2a873c8b78be0aeb8
MATLAB
21,824
508
%% *T2N simulations* % *This script is to show you some applications of t2n. Tutorial A and B initialize % the morphology and standard parameters (and need thus be run at least once before % starting one of the other tutorials), whereas the other sections define the % different simulations.* % % Note: T2N requires ...
3881963b338956598ef38b19ed8709a0c770af4317fb7704571703a25b814d7d
MATLAB
22,013
513
function [PCT,rearrthetatimes,firstspiketimes,ofst,thetatimeorders,percyclespknum,... ttarm,alltempos,trialcycles,posincycles,poscycleinbins,thetaspeed,thetavectors,... spatempmtx,spatemp,ethP_CS,de_CS,nnde_CS,qde_CS,estPv_CS,realposvect,timeposdistr,... randAlltrials,randLtrials,randRtrials] = placeTMde...
205ffc22e67e842c7587be136ff20b73c516b14a0a18d9759136f435a4bbc49a
MATLAB
22,037
560
classdef FrameScan < StreakScan & ICalcDiameterLong %FrameScan - Class to analyse frame scan images of vessel % % The FrameScan class analyses frame scan images to calculate vessel % velocities and diameters. Typically, the vessel plasma will be % labelled by a fluorescent marker, like a dextran conjugated fluor...
f18c0432ca9a685a3d6453422b841bdd8019c4f21919a84704594b8847250698
MATLAB
22,122
536
%========================================================================== % This script preprocesses the behavioral data and aligns them with (i) the % macrodata timeline and (ii) with the microdata timeline. % % Lukas Kunz, 2021 %========================================================================== % start cle...
a7f96d10c1ec48d6a70ff14fe5b88af9ae7fe4272bd513fc98f1a124c47c10d4
MATLAB
22,167
623
%% Population analysis for OpenEphys % This analysis calculate the fold changes in firing rate from all the channels % as a function of probe depth. Run this analysis after OpenEphys_analysis1 clear;clc; firing.stim = nan(1,6); firing.nostim = nan(1,6); for recording = 1:6 recording [fileName pathName...
050b98031936dafd53832a11cc1cf262ebefba1a372168680beaf0a35a1fa8bf
MATLAB
22,181
607
function [sample_rate,board_dig_in_data,board_adc_data,aux_input_data,amplifier_data]=read_Intan_RHD2000_file(path,file) % read_Intan_RHD2000_file % % Version 1.3, 10 December 2013 % % Reads Intan Technologies RHD2000 data file generated by evaluation board % GUI. Data are parsed and placed into variables th...
1db365782a69ad7ababda147e9440c39a7b3100b78720153d10c01f7f17da13c
MATLAB
22,257
503
%========================================================================== % This script examines whether ripples are phase-locked to slow % oscillations. % % References: Logothetis et al., Nature, 2012. % % Lukas Kunz, 2023 %========================================================================== % start clear; cl...
a179545b984a803726008c8ed6f96c6a4e1da5909120593da0c5581487518f97
MATLAB
22,385
561
% NEURON_TREE Export tree as NEURON file. % (trees package) % % [name path] = neuron_tree (intree, name, res, options) % ------------------------------------------------------ % % Saves a complete tree in the section based neuron '.hoc' format. % Alternatively tree can also be stored as '.nrn' file in which each % se...
64d60d85b07f41668980635617046057ee06a69c7330eee13138e625180ef93a
MATLAB
22,436
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 (bas...
2b33b2b289c8a0004da4dc4c340d4c620d0b7d5690dbeb8dc33a374b2c72a0d9
MATLAB
22,517
562
%%Set Parameters to analyse behavioural data dataDirectory = '\\mhsdata.anu.edu.au\mydocs$\u6764904\My Documents\PhD\Behavioiural_Studies\M1AChRAnalysis\'; % Master List for day files % % % Mouse 1 whichDays{1}{1} = {''}; %ACSF, add session dates here whichDays{1}{2} = {''}; %AG whichDays{1}{3} = {''}; %AN % %...