sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
a8135a36848b4b445473f9bd3c69b0d34f3dfd41baff0c72a7c0f723b0557146
MATLAB
10,805
281
function [All,opts,outVars] = loadData(loadList,loadPath) ind = 1; numExps = numel(loadList); All(ind) = load(fullfile(loadPath,loadList{ind}),'out'); %% error fixer %CAUTION! ERRORS WILL OCCUR IF YOU RUN MORE THAN ONCE! [All] = allLoadListErrorFixer(All,loadList); %% Rematch Targeted Cells opts.matchDista...
015ab0f7713408d1ae454f9d63f4066d468e89f310d1b9246d69bdeebed83154
MATLAB
10,808
282
classdef (Abstract) CalcMeasureROIs < Calc %CalcMeasureROIs - Superclass for CalcMeasureROIs classes % % CalcMeasureROIs is an abstract superclass that implements (or requires % implementation in its subclasses via abstract methods or properties) % most functionality related to CalcMeasureROIs objects. Typically...
0c25e6ad08b5c6e8e72a54bbb15680e4084ca179d35f00fdf5b52d2fe0d01e77
MATLAB
10,818
357
%% INTRO % This script summarizes the fit process of the experimental data shown % in Fig 4 of 10.1002/aisy.202200145. % Fig1: datapoints represent the digitized data, solid lines are their linear fit (using a xlog scale), % and the dashed lines represent the final model result. % Fig3: same as Fig 1 % Fig2 and Fig4 ...
0efae5c6df8f44be668027ec26094d166bb7597078fe27bb93dbdf6e65dc7bb3
MATLAB
10,834
182
function [ theta, stretchAngStats, stretchDirPref, stretchOrPref, testRange, dirResponse, dirPref, orResponse, orPref ] = AngularSensitivity( MLstretch, APstretch, affActivity, varargin ) %OrientationSensitivity IP = inputParser; addRequired( IP, 'MLstretch', @isnumeric ) addRequired( IP, 'MLactivity', @isnumer...
aed185058e2eff7dd2e51965bc03814ceab346aff4d62000f4dd32f053b839f5
MATLAB
10,854
286
classdef ConfigDetectSigsCellSort < ConfigDetectSigs %ConfigDetectSigsCellSort - Parameters for detecting and classifying signals % % The ConfigDetectSigsCellSort class is a configuration class that contains % the parameters necessary for detecting and classifying signals from ROI % traces. For further informatio...
a9e7c34b4d1537bbad1c7f0ef35e24c4fbaac52b5d80740fb9ef3e99cb6ccf02
MATLAB
10,900
290
classdef (Abstract) Config < ConfigHelper %Config - Superclass for Config classes % % Config is an abstract superclass that implements (or requires % implementation in its subclasses via abstract methods or properties) % most functionality related to Config objects. Typically there is one % concrete subclass o...
bf2581dec91a31c7ec755b4db2f7e554d217dd17bae25d6b1407d739b09d39c8
MATLAB
10,943
225
%%%%%%%%%%%%%%%%%%%% %TC0001 - addPenaltiesToModel %%%%%%%%%%%%%%%%%%%% cd 'C:/Work/MatlabCode/projects/BrainMetabolismModeling/BrainMetabolismModeling' ecModel = load('data/MinModel.mat').minModel; %Check that there is no penalty in the no penalty case m = addPenaltiesToModel(ecModel, 1, 1, 1, 1, 1, true); al...
ff9418dd4326e4325f2a696d04b46096a966548ca88997116e7e1a3db578800c
MATLAB
11,007
367
%function [hgfSelectROI,hgfROIAmp] = saROIAmplitude(fnTS,TS,DAVersion) addpath '.\Codes'; addpath 'E:\2021_12AustinVisit\Chip20211215ForJimin\Chip20211215ForJimin\run6'; protoDir = '.\Chip20211215ForJimin\run6\'; load M28D20211215R6TS.mat fnTS = 'M28D20211215R6TS.mat'; Condition = TS.Header.Conditions; Num_val...
832eb0c6d070e12a7ca7174252bc8f2c38619a04930291912f90ea497fad5232
MATLAB
11,045
404
function varargout = boundedline(varargin) %BOUNDEDLINE Plot a line with shaded error/confidence bounds % % [hl, hp] = boundedline(x, y, b) % [hl, hp] = boundedline(x, y, b, linespec) % [hl, hp] = boundedline(x1, y1, b1, linespec1, x2, y2, b2, linespec2) % [hl, hp] = boundedline(..., 'alpha') % [hl, hp] = boundedline(...
b621f8360c93f916e3983b35e15d36381ef964294a9f875e037a2e62f624394c
MATLAB
11,055
284
% op_CSIplot.m % Brenden Kadota, McGill University 2019. % % USAGE: % sim_plotCSI(in) % sim_plotCSI(in, 'min_range', 0, 'max_range', 4, 'coilNum', 3, 'averageIndex', 1, % 'x_indecies', [10,20], 'y_range', [-100, 100]) % % DESCRIPTION: % This function takes a processed MRSI twix file and plots the data using...
ec1e6026bb324938f3a737b1a331465cdb23f6b5c3b4fee71134ced1bec1f08d
MATLAB
11,113
247
%% Description % The following script extracts Slow Oscillations for the cardio audio % experiment described in https://doi.org/10.1101/2022.03.03.482861 based % on the method described by Ngo et al., 2013 (DOI: 10.1016/j.neuron.2013.03.006) % & Besedovsky et al., 2017 (DOI: 10.1038/s41467-017-02170-3 ) adapted from...
e01ae6da5ec73e42318d5f4a0af660003e3057c20e363f478f78061d0b0db3d7
MATLAB
11,138
274
function outModel = CreateCompartmentECGEM(model, fillInMissingGPRs, minAcceptableKCat, speciesAdapter) %This code was copied from CreateECLightModel in GeckoLight and modified. What we do is to divide the costs into %4 categories: cytosolic, mitochondria, MT-genes, and other. %Cytosolic reactions are identified as r...
724656f64fea676956c05fe4cb42d2d8ae57d07ba4c89b7585776ed41a9bdc8d
MATLAB
11,178
321
function [x,resnorm,resid,exitflag,output,lambda] = lsqnonnegvect(C,d, options, varargin) %LSQNONNEGVECT Partly vectorized linear least squares with nonnegativity constraints based on % MATLAB function lsqnonneg. % % X = LSQNONNEGVECT(C,d) returns the matrix X, of which the kth column minimizes % NO...
059eb76a382f3be6cfd10d745cff56699bc97dbfbdd481bba02ed50e42ccb3fb
MATLAB
11,228
349
% Explore permutations of likely misreads %Get prob_transcripts for this file loadParameters; if ~exist('X','var') load(fullfile(params.punctaSubvolumeDir,'puncta_rois.mat'),'X','Y','Z'); end if ~exist('maxProj','var') img = load3DTif(fullfile(params.rajlabDirectory,'alexa005.tiff')); maxProj = max(img,[]...
d58a6e9278c8acdb086303cd445a4cd076c4055e67740799e8ea47dd0e165407
MATLAB
11,231
264
% X3D_TREE Plots a tree as cylinders. % (trees package) % % [name path] = x3d_tree (intree, name, color, DD, ipart, options) % ---------------------------------------------------------------- % % exports a tree as a set of cylinders in the ".x3d" html format. A viewer % is necessary to use these files. "blender" and ...
f47f988fceaaf390f795d8aff5c3039cb703cecaf0d07a7d3fd239af77c74cfc
MATLAB
11,234
436
function sff = sff_estimate360CameraParameters(sff) %SFF_ESTIMATE360CAMERAPARAMETERS % % Raphael Sarfati, 05/2022 calAlpha1 = xy2alpha(sff.clb.calPoints.p1,sff.prm.mov.frameDim); calAlpha2 = xy2alpha(sff.clb.calPoints.p2,sff.prm.mov.frameDim); sff.clb.stereo360ParamsRANSAC = estimate360CameraParameters(ca...
31dab69be2d459f3d29de7985458f8d5b84d6da5012fc87f63b598a53ea9d178
MATLAB
11,241
374
function y = inpaintn(x,n,y0,m) % INPAINTN Inpaint over missing data in N-D array % Y = INPAINTN(X) replaces the missing data in X by extra/interpolating % the non-missing elements. The non finite values (NaN or Inf) in X are % considered as missing data. X can be any N-D array. % % INPAINTN (no input/output ar...
ccdfca11182efa5c7f8b1da598d6b037f68268492626862ed6add83afc28fd38
MATLAB
11,246
259
classdef AOandAI_OO < handle % Demonstration of simultaneous analog input and output with the dabs.ni.daqmx wrapper % % vidrio.mixed.AOandAI_OO % % % Description: % This example demonstrates how to use a class to continuously run data acquisition (AI) % and signal generation (AO) ...
ec73b4139f4fcd327ac6d783f2d8dc35409b13c82568c21680a876c6051909ec
MATLAB
11,270
280
%io_CSIload_rda.m %Brenden Kadota, SunnyBrook Hosptial 2021. % % USAGE: % [out] = io_CSIload_rda(rda_filename); % % DESCRIPTION: % Reads in siemens rda data (.rda file). % % io_CSIload_rda outputs the data in CSI structure format, with fields corresponding to time % scale, fids, frequency scale, spectra, and header fie...
683eb050ebdf98255dca765e71cac0b60c7edeb239dc4078ba785497fd67ad9d
MATLAB
11,370
234
% sharedvol_trees % Calculates the shared volume of two trees with voxelization of the two hulls. % Also the length of the trees inside the shared volume are calculated. % % CAREFULL tree must be resampled % Uses boundary_tree VOXELIZE voxel_tree % % input % --------- % -intree1 :tree:: first input tree % -intree2...
c0456c58dfe7fb23664b40489104a2eab163d99bdc6fd071b8246edc07d148a6
MATLAB
11,381
208
%% Use GLM to assess contribution of different variables locoDeform_pred = cell(1,Nexpt); locoDeform_resp = cell(1,Nexpt); locoDeform_opts = cell(1,Nexpt); locoDeform_result = cell(1,Nexpt); locoDeform_summary = cell(1,Nexpt); glmFigDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( glmFigDir ) GLMname = 'LocoDeform_...
8e2b3465b31bae4531c184fce14b3b0825a5cff0ece154284eaaf0b7872eaffe
MATLAB
11,392
339
function [All,outVars] = cleanData(All,opts) %% Clean Data and stuff i dunno come up with a better title someday FRDefault=opts.FRDefault;%6; recWinRange =opts.recWinRange;% [0.5 1.5];% %from vis Start [1.25 2.5]; if isfield(opts,'runValPercent') %back compatible check, moving runVal Percent out of function runVa...
bf99dcd6fa730c1f395a39fdedebe5d2289bf6c90e8fb08baa922d38a5af333e
MATLAB
11,411
274
function outModel = CreateCompartmentECGEM(model, fillInMissingGPRs, minAcceptableKCat, speciesAdapter) %This code was copied from CreateECLightModel in GeckoLight and modified. What we do is to divide the costs into %4 categories: cytosolic, mitochondria, MT-genes, and other. %Cytosolic reactions are identified ...
2069775e1ece2d7038f1c0a1b7807206ed03b09c08b65db6ca5b6b8d47dea074
MATLAB
11,416
216
function [ROI, varargout] = WriteROIproj(expt, catInfo, ROI, varargin) IP = inputParser; addRequired( IP, 'expt', @isstruct ) addRequired( IP, 'catInfo', @isstruct ) addRequired( IP, 'ROI', @isstruct ) addOptional( IP, 'axon', [], @isstruct ) addParameter( IP, 'edges', [0,0,0,0], @isnumeric ) addParameter( IP, '...
23abf4746f7171cb8e4337c34c3e27ab77d710bbcf67a05ae9d9ab1ad9c07d15
MATLAB
11,436
215
function tfce_estimate = tbx_cfg_tfce % SPM Configuration file for TFCE estimate % ______________________________________________________________________ % % Christian Gaser % Structural Brain Mapping Group (https://neuro-jena.github.io) % Departments of Neurology and Psychiatry % Jena University Hospital % ___________...
fad5be60e870c266e7cf12e263be16f24b7045090268a9060bdcc541372ed695
MATLAB
11,437
337
% RESAMPLE_TREE Redistributes nodes on tree. % (trees package) % % tree = resample_tree (intree, sr, options) % ------------------------------------------ % % Resamples a tree to equidistant nodes of distance sr. In order to do so % some abstraction principles need to be arbitrarily set. % This function alters the or...
98cc931321c5d8c83d5a980e0c483ab710d792186e432f55dee11a2385b6e647
MATLAB
11,450
317
% run_specialproc_fmrs_slidingWindow.m % Jamie Near, McGill University 2014. % % USAGE: % [out1,out_w]=run_specialproc_fmrs_slidingWindow(filestring,windowSize); % % DESCRIPTION: % Processing script for functional MRS data acquired using the SPECIAL MRS % sequence. This script accepts data in Siemens .dat format (t...
70ec23a32c8b20856005aeec48e5600cda5ddf61e1dcd3380eda3bf3d897fea0
MATLAB
11,458
424
figure; iB=[3 7 8 10]; iG=setdiff([1:1:15],iB); % save('iB.mat','iB'); % save('iG.mat','iG'); %% Grid: Matrix correlation %2 figures load('E:\learningAnalysis\behaviorVSActivity\MatrixCorrelation\deceNTDiffCM\indivMiceFolders.mat'); nData=9;%only look at new FOVs, corrM=[]; for n=1:length(indivMiceFol...
863b7310a52e3bed52462c5a3f6532a40da23ff2ec6662fe6894b86fe67eb5dd
MATLAB
11,468
264
function out = load_recode_behav(rootDir, iSub, rejectedtrials) % out = load_recode_seq(rootDir, iSub, rejectedtrials) % % Load behavioral data; % recode response and accuracy variables (uninstructed keys to % instructed keys; delete Gos with too long RTs, accuracy based on recoded % keys presses); % filter out reje...
dbcbcb2323640824c4468a5a70986207cbd35e869d0059099598bf5a441edda9
MATLAB
11,499
321
function [x,resnorm,resid,exitflag,output,lambda] = lsqnonnegvect(C,d, options, varargin) %LSQNONNEGVECT Partly vectorized linear least squares with nonnegativity constraints based on % MATLAB function lsqnonneg. % % X = LSQNONNEGVECT(C,d) returns the matrix X, of which the kth column minimizes %...
522aefea79d7a2bab625305c7f50a0e1ca55288dfa14ec126f6952aaf2054c05
MATLAB
11,524
285
function varargout = launch(varargin) % Launch is a GUI-based application that interacts with an experimenter to % select a subject-session combination to run, enrolling new subjects as % necessary. The enrollment process can, optionally, also collect % demographic information. Other versions of this call allow the ...
cf2f8c73e9dad1586123a78f1611dd660544227531bd2b434f31d412b93b9f7e
MATLAB
11,529
412
clear close all force load('a0_0_bhv2trialStrct.mat'); %% %individual NIImage_Individual = [7 9 11 22 25 27 28 38 39 40 41 42 43 44 47 49 52 53 55 56 57 59 60 ]'; %group % NIImage_Group = [ 36 37 45 51 5...
03c3cbed443845a9ad2aed4545d365ead6f718d16ce6a913d599a011f9670e00
MATLAB
11,535
281
classdef RawImgDummy < RawImg %RawImgDummy - Class implementing dummy raw image objects % % The RawImgDummy class implements functionality related to 'dummy' % RawImg objects; i.e. RawImg objects that don't have a specific class % designed to work with their format. This makes it possible to create % functiona...
60cd8aa85b2ea1afff8bc188dbab1e36e6e30f2cfaae37c8668c2f0048c7c012
MATLAB
11,536
191
%% Use GLM to assess contribution of different variables locoDeform_pre_pred = cell(1,Nexpt); locoDeform_pre_resp = cell(1,Nexpt); locoDeform_pre_opts = cell(1,Nexpt); locoDeform_pre_result = cell(1,Nexpt); locoDeform_pre_summary = cell(1,Nexpt); figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir ) %rLocoPr...
c38f3103101a637adc9025aa1dda89cb9ae4e2ec053c650e15b586edcf20acd5
MATLAB
11,544
307
% op_CSIFOurierTransform.m % Brenden Kadota, SunnyBrook Hosptial 2021. % % Does spectral and spatial fourier transform on MRSI structure. The fast % fourier transform is done on the spectral dimension. If the spatial k % space is cartesian, the fast fourier transform is applied. % USAGE: % out = op_CSIFourierTransform(...
0265a69fc24cf5fb5ebf4789fda3ac872c0ed531c6969ab226e1aae968b1c28f
MATLAB
11,560
221
function [DistanceAlongTimeInPixelsPerSec,SpeedAlongTimeInPixelPerSec,Stimulus1ExplorationAlongTimeInSec, Stimulus2ExplorationAlongTimeInSec,... Stimulus1InteractionsStartTimesInSec, Stimulus2InteractionsStartTimesInSec, Stimulus1EpoksDurationInSec, Stimulus2EpoksDurationInSec, TransitionTimesInSec,Compartment1AlongTi...
6da64ed093287deda8b86c1ec264cc979d1033387e7c2d606cefb8b5de5018cf
MATLAB
11,609
278
function [axon, expt, stillCosSim, stillCorr, rSilent] = MergeROI3D(expt, T, loco, ROI, fluor, stillEventRaster, varargin) % sbxPath, , axonLabelFoot, axonLabelVol , stillEpoch % Use the hierarchical clustering procedure outlined in Liang,... Andermann 2018 to find ROI sets that likely belong to the same axon IP = i...
1c3611a1abbc538721dc258ef56ac06d35826e9a068d1fff623b725949df99b2
MATLAB
11,624
371
%io_loadspec_varian.m %Jamie Near, McGill University 2014. % % USAGE: % out=io_loadspec_varian(filename); % % DESCRIPTION: % Reads in varian .fid data using the readfid.m and readprocpar.m functions % from Martyn Klassen (mklassen@robarts.ca). % % io_loadspec_varian outputs the data in structure format, with fields ...
fbe14a98a22c176968fb7eb747c868d6457582d8a4bb5958cbc8a8ba7a44c45f
MATLAB
11,636
267
%% Prepare the workspace %clear all; clearvars -except preloaded mypath dtb_content protected close all; set(0,'defaultAxesFontSize',12); %% Open corresponding text files % Insplorer .inr file filename = 'pos1_Pd70Au30_A21_pos2_Pd65Au35_A33_Air_Safety_sensor_test_HT_v12'; fileID1 = fopen(strcat('..\Data\43rd experime...
3917d045ff401296c57c27e5fcae381c61d6e3f9d56f2dd30f369d264c4c52ef
MATLAB
11,674
337
% FigureS19.m % Plots for Supplementary Figure S19. % % 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...
6b551a2beb1062a3f13fea9349662fa7a5898b4c9f4e260edfc5d56558882ef6
MATLAB
11,728
198
%% Use GLM to assess contribution of different variables locoDeform_csd_pred = cell(1,Nexpt); locoDeform_csd_resp = cell(1,Nexpt); locoDeform_csd_opts = cell(1,Nexpt); locoDeform_csd_result = cell(1,Nexpt); locoDeform_csd_summary = cell(1,Nexpt); figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir ) GLMname ...
7fe0164a8f27b2fcb90e6ecbf3e0779b2862fac422b56731f71ef346dc8135e6
MATLAB
11,765
354
function [All] = allLoadListErrorFixer(All,loadList) %Hard Code Error Fixes %note the prefered way of catching errors nameToUse = '190826_I132_2_outfile.mat'; indToUse = find(cellfun(@(x) strcmp(x,nameToUse),loadList)); if ~isempty(indToUse) disp(['Correcting from Ind: ' num2str(indToUse)]); All(indToUse).out...
c9f213c58e5eca6fde4a67fd87d50d662ebfd2596701e47b309866a119c39203
MATLAB
11,792
337
function displayID = loadDisplayParamsPTB(varargin) % displayID = loadDisplayParamsPTB([property, value, ...]); % % 05/07/08 Modified from loadDisplayParams by JW in order to handle PTB % calibration files. % % % Routine for loading display params on a given computer. Requires a PTB % calibration (.mat) fi...
4eea4d880b4fa04804cc64d7b6e7c7e9f86b1dc80c5d91566d65eedd64406de0
MATLAB
11,898
366
function tf = ft_platform_supports(what,varargin) % FT_PLATFORM_SUPPORTS returns a boolean indicating whether the current platform % supports a specific capability % % Use as % status = ft_platform_supports(what) % or % status = ft_platform_supports('matlabversion', min_version, max_version) % % The following valu...
bc4b7eb3d66035544521c9bef61bc0329be65fb81a11b1626a70f7131ad6ac56
MATLAB
11,903
316
% EEGfMRIPav_eval_param.m % This is an interactive script---execute it step-by-step. % It fits a serious of computational reinforcement learning models using the CBM toolbox. % and evaluates them. % % EXPLANATION OF SETTINGS: % dirs.root = string, root directory of project. % % OUTPUTS: % no outputs, jus...
84f848fada916a80bdeda0b9c50c248fc17d991ae596e47b8514156cd14f889b
MATLAB
11,908
388
%% Fig2 % Jiaxin Gao % Zhejiang University % email: jiaxin_gao@zju.edu.cn %% stimulus phase coherence (0.125s) % The Code for Fig 2A clear clc fs = 100; % experiement 1--- 125ms load('.\Fig2_data.mat') phy_coh_sum = Fig2_Data.A.phy_coh_sum; phy_coh = phy_coh_sum(:,1) ; figure f = 1:size(phy_c...
3455ccf7a988f5d18fc991a015a81d897ee41c9b3f37ae88629b3ac3df75400a
MATLAB
11,928
467
function z = xmltools( arg, out_file, varargin) % XMLTOOLS - tools for managing xml data sets % - if arg is a string : arg is an XML file to convert into MATLAB struct % - if arg is a variable : it is a MATLAB struct to write into XML, to stdout if out_file is not given % use : % z = xmltools('filename.xml')...
9625e743dbcd25fcae5e58d3f5dbab4336f9a3f0486fed47a2e641065dd54f57
MATLAB
11,940
306
function [All, outVars] = meanMatrixVisandCorr_v2(All,opts,outVars); %% Make all dataPlots into matrixes of mean responses %%Determine Vis Responsive and Process Correlation visAlpha = opts.visAlpha;% 0.05; if isfield(opts,'skipVis') skipVis =opts.skipVis; else skipVis=0; end numExps = numel(All); numSpikes...
64646f19e60e26c4982ab54770f4d3713b4fc9626e5a2a77a3f264044b361094
MATLAB
11,987
449
% GELoad.m % % USAGE: % [FullData,WaterData,hdr]=GELoad(fname); % % DESCRIPTION: % Reads in GE P-files (.7 file) using code adapted from GERead.m, provided % as part of the Gannet software package by Richard Edden (gabamrs.com). % Developed by Ralph Noeske and Mark Mikkelsen. % % INPUTS: % filename = filename of GE P...
f7a4b29815eac46c0bb4256c9af39e9fcc405883d9f8da5f3ec9c98af28329d5
MATLAB
12,044
201
close all clear all clc addpath('/home/andek67/Research_projects/nifti_matlab/'); basepath_nii = '/local/data1/andek67/ProgressiveGAN/rawdata/BRATS_2020/MICCAI_BraTS2020_TrainingData/'; %basepath_nii = '/local/data1/andek67/ProgressiveGAN/rawdata/BRATS_2021/'; % Get list of subjects subjects = dir(basepath_nii); % ...
8377939703eceb793f2a3c9a843a222ad6518a4be0efe7da6f51454530be20a3
MATLAB
12,056
328
%% Description % % The following script performs the control analyses for the cardio audio % experiment described in https://doi.org/10.1101/2022.03.03.482861 % SR, RS, SS, RR intervals and variabilities are calculated to assess % whether the experimental design was successfuly administered % % % % Requires m...
61a27b8e95ab346a088517768eed01fd43f6d802e79105479ec8a41f1d69e3cd
MATLAB
12,090
267
function [edges, zUse] = SegmentCat3D(sbxInfo, varargin) % [zproj_interp, mask, trace_raw, trace_hp, segmentation_data, sbxPath] = IP = inputParser; addRequired( IP, 'sbxInfo', @isstruct ) %addParameter( IP, 'pmt', 1, @isnumeric ) addParameter( IP, 'chan', 'green', @ischar) addParameter( IP, 'name', '', @ischar ) ...
1e65728ef5239c861bf8043350646f733479a429719dc991b67aa6274af35d3f
MATLAB
12,104
275
function totModel = buildFullUtilBrainModel(baseModel, fracN, fracA, TNM, TNG, TAM, TAG, mobUtilN, mobUtilA, TMT, addExtraATP) % buildFullUtilBrainModel % % Generates a combined model with neurons, astrocytes, and 'the rest of the body' (rob). % 100 model pairs of astrocytes and neurons with varying utilization (0.01 -...
21d5264cca8575c9be718acfc1a57dfbf8f52547c77be54851fd38d7aefa9188
MATLAB
12,104
423
function [sROI] = ReadImageJROI(cstrFilenames) % ReadImageJROI - FUNCTION Read an ImageJ ROI into a matlab structure % % Usage: [sROI] = ReadImageJROI(strFilename) % [cvsROIs] = ReadImageJROI(cstrFilenames) % [cvsROIs] = ReadImageJROI(strROIArchiveFilename) % % This function reads the ImageJ binary ROI ...
2f2c8c8d6a5ef814b7be0778c6cd3456a12aeb9fa063592ad3e457ba0a133093
MATLAB
12,140
271
%========================================================================== % This script plots navigation paths examines the speed profile during the % trials. % % Lukas Kunz, 2023 %========================================================================== % start clear; close all; clc; addpath(genpath('E:\OpenField...
e1eee5d517b19d7824f6609299ca53ba2ab604cabbac26ca4c4801d80ab9261c
MATLAB
12,159
300
classdef minimalStimPresenter_dotNET < handle % Minimal code example showing how to present pre-calculated stimulus waveforms for optostim % % minimalStimPresenter_dotNET % % % * Purpose % This class serves as an example to demonstrate how Zapit conducts the actual photostimulation % us...
505602e4e0d5e3597ae5d697d0d51817cf7de989a9be719e409d27b6d946511c
MATLAB
12,183
440
clear close all force warning on load('a0_0_bhv2trialStrct.mat'); imSize = [733, 977]; load a7_2_createAvergedNOTMorphedHeatMapsLoad hmAll2 = hmAll; load('a6_2_createAvergedMorphedHeatMapsLoad') NIm = [22,43,7, 22+62, 43+62, 7+62]; %% close all iIN = 1; iMonkey = 1; figure(2) funGauss2dSD = 20; for iN = 1:2 ...
f02bfd65f8f7751829277701748d8a1fef972587062e6fb08d6bd1fa97792dc0
MATLAB
12,189
440
clear close all force warning on load('a0_0_bhv2trialStrct.mat'); imSize = [733, 977]; load a7_2_createAvergedNOTMorphedHeatMapsLoad hmAll2 = hmAll; load('a6_2_createAvergedMorphedHeatMapsLoad') NIm = [22,43,7, 22+62, 43+62, 7+62]; %% close all iIN = 1; iMonkey = 1; figure(2) funGauss2dSD = 20; for iN = 1:2 ...
2e0f3588f1c6a4423cd4b9e9930d1aedd67b6504dc0649c6820b893ed9e2eced
MATLAB
12,201
333
function LocoAnalysis2b(inputname, timepoint, timewin) %last update on November 29, 2021 %inputname='Gi10852'; inputname2=strcat(inputname, '_stimtb.mat'); load(inputname2) %desired time precision in ms precision2=10 MUprecision=precision2/1000; nbbin=floor((timewin)/MUprecision) %time window for response...
687dad30ecffe24b316f1a8568b5de2c00e3dd1069d1f28845ddd7177a2f5e4b
MATLAB
12,248
485
load('E:\learningAnalysis\summaryManyMice_includingOldEnvGoodMoreMice\dfofTrack\meanAllDfof.mat'); load('E:\learningAnalysis\summaryManyMice_includingOldEnvGoodMoreMice\dfofTrack\semAllDfof.mat'); meanG=meanAllDfof; semG=semAllDfof; load('E:\learningAnalysis\summaryManyMice_includingOldEnvBadMoreMice\dfofTrack\...
a6647cbf3133363089d61f07dff5d78333ce39dfcbedc6a873bffce25cde59f5
MATLAB
12,266
300
classdef CalcFindROIsFLIKA_3D < CalcFindROIsFLIKA %CalcFindROIsFLIKA_3D - Class for FLIKA-based ROI identification (3D) % % The CalcFindROIsFLIKA_3D class is a Calc class that implements the 3D % FLIKA algorithm for ROI identification. In the 3D case, ROIs are % identified in the original 3D mask generated by FLI...
449f473dfd884573e4240617ef8528c41cef20fdadbed57138a3ff26d79d3b3b
MATLAB
12,278
308
function [perf, result, testlabel] = mv_classify_timextime(cfg, X, clabel, X2, clabel2) % Time x time generalisation. A classifier is trained on the training data % X and validated on either the same dataset X. Cross-validation is % recommended to avoid overfitting. If another dataset X2 is provided, % the classifier i...
00d643b11abb80af5c4a459ed0281140d499445baf9586ef318e930aae871263
MATLAB
12,379
275
function totModel = buildFullUtilBrainModel(baseModel, fracN, fracA, TNM, TNG, TAM, TAG, mobUtilN, mobUtilA, TMT, addExtraATP) % buildFullUtilBrainModel % % Generates a combined model with neurons, astrocytes, and 'the rest of the body' (rob). % 100 model pairs of astrocytes and neurons with varying utilization (0....
7af9ffb5a11c022037ff34f80d030502316cb0672afebcb37906c2599361113d
MATLAB
12,382
321
function res = saveastiff(data, strPath, options) % options.color % : true or FALSE % : If this is true, third dimension should be 3 and the data is saved as a color image. % options.compress % : 'no', 'lzw', 'jpeg' or 'adobe'. % Compression type. % 'no' : Uncompressed(Default) % 'lzw' : loss...
ad4df2654029a62568b7c89812eb92438a066e8459495a7c61f78a15d1eacc2b
MATLAB
12,438
404
%% Fig3 % Jiaxin Gao % Zhejiang University % email: jiaxin_gao@zju.edu.cn %% depression and gain control(0.125s) % The code for Fig 3B(left) clear clc fs = 100; addpath '.\tools' load('.\Fig3_data.mat') phy_coh_sum_ane = Fig3_Data.B.phy_coh_sum_ane; phy_coh_sum_125 = Fig3_Data.B.phy_coh_sum_125; phy_...
75a578d6a579cd20843287ff726a405938cbe7fde07bb71bfda4c3b88051f59b
MATLAB
12,492
318
function TF_extract_singleTrial(rootDir, subVec, maskType, band, channels, contrast) % TF_extract_singleTrial(rootDir, subVec, maskType, band, channels, contrast, GLMID) % % Compute trial-by-trial mean power within mask defined previously in % two-condition permutation test (from EEGfMRIPav_grouplevel_TF_permutation....
199de064d743c788e241b2ad0dec9bcc9ca46460252d4b8493aaaf530768abc1
MATLAB
12,501
364
function varargout = motion_correct(imgSeq, varargin) %motion_correct - Motion correct an image sequence % % CORRSEQ = motion_correct(IMGSEQ) motion corrects imgSeq % using the default parameters. IMGSEQ must be a numeric array with at % least 3 dimensions. If IMGSEQ is an integer data type, it will be % conve...
df66b3e132eaac4a0efdef0220f581d1722cf4896f6b1ea17b50a1cd8ee1a96c
MATLAB
12,528
363
dblist=dir('*_data_*.mat') minrelaxdur=0.03; %minimal duration of the relaxed/silent phase twin=1; %timewindow in second BurstTiming_CTL=[]; BurstTiming_WK7=[]; %temporary for k=1:length(dblist) load(dblist(k).name) %%EXTRACTING DATA %stim timebase sttemp=[]; c_st=1; for s=1:50:length(stim.times(:,1...
9aec90b119ef922c1239b6f026cb99efdd1acac3508273f3dc3ca89ae9845013
MATLAB
12,626
368
%% Analysis for Fig 2 % get data ready allrespmean = [respmeancountryseed{[4 5 6 1 2]}]; allrespste = [respstecountryseed{[4 5 6 1 2]}]; keepfiles = intersect(alltargbursts(~any(isnan(allrespmean),2)),names); [~,o1] = ismember(keepfiles,alltargbursts); [~,o2] = ismember(keepfiles,names); allrespmeanD = allrespmean(o1,...
e0923607d525727ae45dd4560f0128912c1c5fe138210c80aa1f4362e3dce17e
MATLAB
12,644
303
classdef Test_Metadata < matlab.unittest.TestCase % TEST_STREAKSCAN Summary of this class goes here % Detailed explanation goes here % ================================================================== % properties (Constant) imgSize = [513 512 2 10]; acq = struct('lineTime'...
6a31d478201c91f43d39dda83ea03d0221fd8186787613259cd609db1604f0ca
MATLAB
12,667
264
function [bAPdistHM,mveloc_dend,mveloc_farax,mveloc_nearax,fig] = t2n_plotbAP(targetfolder_data,neuron,ostruct,targetfolder_results) % This function uses the resulting data from t2n_bAP and plots the % backpropagating spike amplitude as well as the delay versus distance to % the root. Furthermore maps of the amplitud...
d2a6c71de2e78c314baa079830a87098e78cdc117b49383d0d71870bc45f68c3
MATLAB
12,775
268
function cm_data=viridis(m) cm = [[ 0.26700401, 0.00487433, 0.32941519], [ 0.26851048, 0.00960483, 0.33542652], [ 0.26994384, 0.01462494, 0.34137895], [ 0.27130489, 0.01994186, 0.34726862], [ 0.27259384, 0.02556309, 0.35309303], [ 0.27380934, 0.03149748, 0.35885256],...
cec2c3e62872d45c7d5a771332dc75f6fa9ab63400ef86d7ab69b01c83a3dc61
MATLAB
12,839
270
% -- 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...
25c67ddf87f27b211bafd565333b3cc7ade34abf07bde4a9f0d3ed5c6f58c77d
MATLAB
12,842
325
function EEGfMRIPav_OutcomeLocked_1_preICA(rootDir, subVec) % EEGfMRIPav_OutcomeLocked_1_preICA(rootDir, subVec) % % Read in complete data of one subject (separate blocks), concatenate % blocks, re-reference, filter, linear baseline correction % (complete pre-processing up to ICA). % % INPUTS: % rootDir =...
f9788fbc3f48c5fa3a8aea1380d9c93f52d4af47fd2824e23fd661f0c75d0547
MATLAB
12,873
286
%% Use GLM to assess contribution of different variables LKF_pred = cell(1,Nexpt); LKF_resp = cell(1,Nexpt); LKF_opts = cell(1,Nexpt); LKF_result = cell(1,Nexpt); LKF_summary = cell(1,Nexpt); %figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir ) GLMname = 'LocoKinFluor_2D_accelMag_60s'; % 'LocoKinFluor_2D_V...
01b11f31913e39430dcc0f3ab9d888c429e10fb749228b6d2d39d0c5f0610c19
MATLAB
12,903
466
clear close all force warning on load('a0_0_bhv2trialStrct.mat'); imSize = [733, 977]; load a7_2_createAvergedNOTMorphedHeatMapsLoad hmAll2 = hmAll; load('a6_2_createAvergedMorphedHeatMapsLoad') NIm = [22,43,7, 22+62, 43+62, 7+62]; %% close all iIN = 1; iMonkey = 1; figure(2) funGauss2dSD = 20; for iN = 1:2 ...
3367a311b6371ba7266038dcfe3495ff4c696b28ade3cb47717063e0dd63a815
MATLAB
12,919
366
% Batten, Bang, Kopell et al (2024) Dopamine and serotonin in human % substantia nigra track social context and value signals during economic % exchange % % Figure 2 % % Visualization and analysis of behavioural data % % Written in MATLAB 2023a % % Dan Bang danbang@cfin.au.dk & Seth R. Batten srbatten10@vt.edu 2024 %%...
e875b0e930676edb9c56d98bc5d869509bfc0a5448120a4700aa1fc52d41fc61
MATLAB
12,936
244
clear; clc; close all; dataDir = 'D:\2photon\'; %'C:\2photon'; dataSet = 'Afferents'; % 'Pollen'; %'Astrocyte'; % 'NGC'; % 'Neutrophil'; % figDir = 'D:\MATLAB\Dura\Figures\CSD paper\'; % Parse data table dataTablePath = 'R:\Levy Lab\2photon\ImagingDatasets.xlsx'; %'D:\MATLAB\ImagingDatasets.xlsx'; % 'D:\MATLA...
f33f06ab0269b447badbdde737e0e0cc81d95ea5fc9862d79ce17e6cad7e571b
MATLAB
12,952
288
%% Use GLM to assess contribution of different variables LKF_pred = cell(1,Nexpt); LKF_resp = cell(1,Nexpt); LKF_opts = cell(1,Nexpt); LKF_result = cell(1,Nexpt); LKF_summary = cell(1,Nexpt); %figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir ) GLMname = 'LocoKinFluor_ctrl_accelMag_60s'; % 'LocoKinFluor_2D...
166619957f8bb27cc2d36828074395a429d54cf7b6be62f67aa3fa2ab916a416
MATLAB
12,967
373
function [data] = SEV2mat(SEV_DIR, varargin) %SEV2MAT TDT SEV file format extraction. % data = SEV2mat(SEV_DIR), where SEV_DIR is a string, retrieves % all sev data from specified directory in struct format. SEV files % are generated by an RS4 Data Streamer, or by enabling the Discrete % Files option in t...
005564b47c57691ab20adad5ee9a357ed955bf65c40076773b41e1263a6a45a9
MATLAB
12,970
375
function varargout = stack_slider(varargin) %stack_slider - Display an image sequence with a slider % % stack_slider(IMG) is a utility function for visual inspection of image % stacks. It displays a stack with a slider to scroll through frames. % % stack_slider(..., 'attribute', value, ...) uses the specified % ...
0650c15df9b6a404d95d5f6c2efe1c29fd57c59f130ff58da2be596061ca2605
MATLAB
12,976
219
%% Use GLM to assess contribution of different variables locoDeform_post_pred = cell(1,Nexpt); locoDeform_post_resp = cell(1,Nexpt); locoDeform_post_opts = cell(1,Nexpt); locoDeform_post_result = cell(1,Nexpt); locoDeform_post_summary = cell(1,Nexpt); figDir = 'D:\MATLAB\LevyLab\Figures\3D\GLM\'; mkdir( figDir ) %rL...
987472d41396effcbdc0d834343af5f944e8b5f93748cb2beb0efd623a1ba86d
MATLAB
12,976
310
function [somaRadiusList areaList DAPIlist region2D circularityList blurrinessList contactingNeuron unidentifiedObj roundCell loopNum blurImage darkRegion] = detectNeuron(multiMarkersIMG,intThresh,pixelThreshL,... pixelThreshH,extendLenth,nucleusPixelThreshL,nucleusPixelThreshH,newfolderPath,neuronLabel,tileLabel,...
fa37a0d223c0fcbae3a6b9319673782cc5173cd073acac3c926e1cd53033d3f2
MATLAB
13,007
275
function plot_data_on_mesh( coordinates, varargin ) % PLOT_DATA_ON_MESH plots data on a 3D mesh object, e.g. data from % electrodes/fMRI on a 3D cortical surface. Data is plotted either as a 3D % scatter plot or as colored surface patches on the mesh surface itself. % The coordinates to be plotted can be given either...
9dd4a7306ecc625d0f3573a3a970f85784fc9a6b8ae6c23107e85a2258eb156b
MATLAB
13,056
347
% This script finds the best power law that relates the measured disparity % distributions from the BORIS image dataset to the FI distributions from % the neural datasets clear all; close all; % Load in FI data load('./analysisFiles/physio/results_populationFI_withCorrelations.mat'); % Tasks for disparity statistics...
c05a2e45cc78ba79a3bcd1e65b22f451887c53cfd2cc10896334efd2c06260e3
MATLAB
13,066
304
function ret = GetSubjSessGui(varargin) % This is a function, intended to be called from launch. global h f LAUNCHSessList LAUNCHSubjList retvals subjSelect = 1; newSubj = 2; returningSubj = 3; newSubjBox = 4; newSubjEditBox = 5; newSubjEditBoxLabel = 18; newSubjMale = 6; newSubjFemale = 7; newSubjEthnici...
d02923e04be11d4c3d986a00226a1a5de56b0ff111519dd246e847d3a969b3d0
MATLAB
13,118
364
outname='Database_17232' %bin size (in s) bin=0.01 %maximal latency maxlat=0.05 maxlat=maxlat/bin; %time window in sec to compute motor unit density tw_pre=0.5; tw_post=1.5; Time=[]; tmbin=(tw_pre+tw_post)/bin; for i=1:tmbin Time(i,1)=-tw_pre+(i-1)*bin; end %transform tw in bins; tw_pre=tw_pre/bin ...
54be6bcba82f72f12918ddee5f60ba462c9843036c174f2aaa0b473178869619
MATLAB
13,148
357
classdef Test_ImgGroup < matlab.unittest.TestCase %TEST_IMGGROUP Summary of this class goes here % Detailed explanation goes here % ================================================================== % properties end % =================================================================...
cee1a4a77a4a48626ed5af25bac6b7685136863db5dd6fd0bc6a5af56458eb20
MATLAB
13,205
337
function [job] = time_update_job(job) % [job] = time_update_job(job) % % Complete settings for job on time-domain data to create. % (data sets to create; plotting settings). % % INPUTS: % job = cell, created via time_update_job.m, needs at % least fields: % .nSub = integer, number o...
c1634b3f0c9391585e1eb031e153348e2e59cbcd65dcea1feedab8503663efb6
MATLAB
13,231
412
% io_loadspec_niimrs.m % Georg Oeltzschner, Johns Hopkins University 2021 % % USAGE: % out = io_loadspec_niimrs(filename); % % DESCRIPTION: % Reads in MRS data stored according to the NIfTI MRS format. % See the specification under % https://docs.google.com/document/d/1tC4ugzGUPLoqHRGrWvOcGCuCh_Dogx_uu0cxKub0EsM/edit ...
8ad8c9c7deb9ef24301a2cca5f91db9e051d3cea0d909c9b3c92232c43ceedb1
MATLAB
13,259
370
function DTcalc = pmForwardModelCalculateMatch(DTDT,varargin) % Creates a table with all parameters (defaults) required to perform a forward % calculation % To work with big tables, it can use parfor % % Inputs: table with one or several rows of parameters to calculate bold series % in fwd model % % Outputs:...
0b0b8df75eb33de7a3feea99d4b46a1af348bb7dbe8af646c9fb5143fac1abee
MATLAB
13,288
339
classdef ConfigFindROIsCellSort < ConfigFindROIsAuto %ConfigFindROIsCellSort - Parameters for stICA-based ROI identification % % The CalcFindROIsCellSort class is a Config class that implements the % Spatio-temporal Independent Component Analysis (stICA) algorithm for ROI % identification. For further informati...
bea8384e0fc293a4e0d60247c4deb0140e10453251f871dc027c3ef3d320a71d
MATLAB
13,301
222
% Compute grand average waveforms (GAW) on fast time scale time-locked to % alpha phase fluctuation % % USAGE: % GAWnode = computeGAWnode_fast_timescale(waveform_file, node) % % INPUTS: % waveform_file - String that contains the filename of the ..txtwf % waveform file output by the hybrid model C ...
e16d4ffd5b6290ed43a04ab4f942dbc1ad9d571bb8c44efde025474e21b139a3
MATLAB
13,340
331
function [placesupercell,pFR,allSfields,PFregionS,cellswithfields] = placefieldidentifierr(pc_ID,inX,... idX,idXX,numoT,spktimes,spkpos,rawTC,spaBin,mazepart) %Place field identification in each trial in stem %input variables: ihmtx2Scorr (inX), clusteredPCS (idX), ihavePF (idXX), %constrialnum (numoT), spatb...
812e36ccdc6a80a0fa49363429d51d0e89812747d7049346a2acf137186d25ca
MATLAB
13,357
346
%% Licking Bout Epoc Filtering % This example looks at fiber photometry data in the VTA where subjects % are provided sucrose water after a fasting period. % Lick events are captured as TTL pulses. % Objective is to combine many consecutive licking events into a single % event based on time difference and lick cou...
11ba43dbcaefe172eeb2fa71054171ea72ec7d61bb1e4143165a247b81bfbf3b
MATLAB
13,374
341
classdef XSectScan < ProcessedImg %XSectScan - Class to analyse diameter from vessel cross section images % % The XSectScan class analyses the diameter of vessels using axial cross % section images. Typically, the vessel lumen will be labelled by a % fluorescent marker, like a dextran conjugated fluorophore (e.g....
cba12b0bd391ba77550e0baffce02fb31b5eff32333324e404e68a8f7e64b224
MATLAB
13,394
362
%%Aberra model for TMS -L23PC-cADpyr229_1 % MATLAB adaptation, Nicholas Hananeia 2021 function[] = Aberra_L23_model() fclose('all'); % install T2N and TREES and add path for necessary files run('./lib/init_t2n_trees.m'); if ~exist('./Aberra_files/lib_mech/nrnmech.dll', 'file') && ~exist('./Aberra_files/li...
cc68277212c35989252a1f53c85e550ee4637a8f4de369f06e90524ee954e29e
MATLAB
13,455
332
function showTSNEPairs(unifyContextClasses ,averageAllBoutsFromSession ,... NumTrees,TakeJustTheta,TakeJustGamma,matlabImpute,imputeIters, ... substractMouseMean, usedMouseId,LeaveOut,balanceClasses,... excludeClassesFromTrain,excludeClassesFromAnalysis, outFname) %LeaveOut can be simuli (of a single ...
17c417eada43e278642a69bca67a6e326a6f037d20c061cde7d06fccfe5a2347
MATLAB
13,463
292
function job = taft_preprocess_initialize_job(EEGdomain, iSub, ROIs2use, behav2use, selTrials) % job = taft_preprocess_initialize_job(EEGdomain, iSub, ROIs2use, behav2use, selTrials) % % Defines a job for each subject give a set of ROIs (file names to use), % behavioral variables to use, selected trials. % Use this...
d3d9ac99b04fa25a8c90b00ef8f2120d32046eb6904389daadf7cb2904fdc01f
MATLAB
13,470
328
function EEGfMRIPav_OutcomeLocked_7_TF(rootDir, subVec, stimERPcor, responseSettings, outcomeSettings) % EEGfMRIPav_OutcomeLocked_7_TF(rootDir, subVec, stimERPcor, responseSettings, outcomeSettings) % % Reject trials, compute surface LaPlacian filter (and at the same time % interpolate bad channels). Final steps of p...