sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
b25ddf638ffd47abc87cbacbf813a505758f325585fb6ca0b95fc26be587a9a9
MATLAB
5,816
222
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturb5HT6 #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/MCS_Neg_Wgain_5HT6_A%A_%a.out #SBATCH --error=outputs/MCS_Neg_Wgain_5HT6_A%A_%a.err #Load Matlab 2017a module ml M...
fd032a05d5a0404344ebaff7b1ebd707473027f5db6009d48182efdf5fb39fc0
MATLAB
5,817
221
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbD1UWS #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Neg_Wgain_D1_A%A_%a.out #SBATCH --error=outputs/UWS_Neg_Wgain_D1_A%A_%a.err #Load Matlab 2017a module ml MATL...
c845d82afbc68258c0556f4ff3d3529726704cb2e71f81318a2d22adc0106e5c
MATLAB
5,823
221
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbMUUWS #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Neg_Wgain_MU_A%A_%a.out #SBATCH --error=outputs/UWS_Neg_Wgain_MU_A%A_%a.err #Load Matlab 2017a module ml MATL...
2dea54dd9cd2edc72735677af503e0609e3bf892ebe60296859a2ef35b308f02
MATLAB
5,829
222
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturbDATUWS #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Neg_Wgain_DAT_A%A_%a.out #SBATCH --error=outputs/UWS_Neg_Wgain_DAT_A%A_%a.err #Load Matlab 2017a module ml M...
f6ea42168199545422f855b821c6b62cff0e8231f0c3349b4ef7144c36f9fb55
MATLAB
5,830
217
function my_net_run_epoch(opts, imdb, work_info, net_config) net_run_opts=opts.net_run_opts; epoch=work_info.ref.current_epoch; work_info.ref.obj_values(epoch) = 0 ; work_info.ref.eva_results{epoch}=[]; work_info_epoch=[]; work_info_epoch.epoch=epoch; work_info_epoch.valid_batch_count=0; work_in...
938d9b04694cb8e0d3ca347969459d620638bb7011051332cfe7d525434cc5d9
MATLAB
5,834
142
%% Clean-up clear; close all; % warning('off', 'MATLAB:print:FigureTooLargeForPage') % Specify parameters Processing2.directory = 'D:\JG\Project Gi-DREADD\Auswertung\P11\'; Processing2.timestamp = datestr(now, 'yymmdd_HHMMSS'); Processing2.age = 'P11'; % specify age group % Get file list Processing2.FileList ...
ec3f736b142c268bc32a099b1c2177b272afd56b99fbe652ca4e24a736100547
MATLAB
5,834
222
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturb5HT6UWS #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Neg_Wgain_5HT6_A%A_%a.out #SBATCH --error=outputs/UWS_Neg_Wgain_5HT6_A%A_%a.err #Load Matlab 2017a module m...
445aa8be4c8610390b8133f726a3aad89045474b453fe8dd09b85e533e80557c
MATLAB
5,837
145
function[freechan]=SONCreateChannel(fid,SrcChan,data,dataheader) % Obsolete function. To write to a file use the SON32 library % % Create a new channel in SON file fid using the existing channel SrcChan channel header as a template. % Channel data is contained in data. If data is type int16 a new ADC channel will be w...
0c12958eac88e55a9933cdc3a9b29e428f1e175cba510945ab056b1e1f6efcc9
MATLAB
5,838
99
function spike_opts = check_spike_opts(spike_opts) % spike_opts = check_spike_opts(spike_opts) % % This function checks the elements of the struct bg_params to ensure % that all fields are set. Fields not set are set to a list of default % parameters. The struct checked is: % % spike_opts - Struct containing the...
9b293c9cb549c222b1c4ebf39140cb646508ac7c34b5bf9554bbc283cc7d8350
MATLAB
5,838
183
function [msi] = read_bti_m4d(filename) % READ_BTI_M4D % % Use as % msi = read_bti_m4d(filename) % Copyright (C) 2007, Robert Oostenveld % % This file is part of FieldTrip, see http://www.ru.nl/neuroimaging/fieldtrip % for the documentation and details. % % FieldTrip is free software: you can redistribute it and...
f3b4a47ad116f34082bce16983126ad73c9982e91a03ab4436c4f4fa59c3af0a
MATLAB
5,838
224
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturb5HT1AUWS #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/UWS_Neg_Wgain_5HT1A_A%A_%a.out #SBATCH --error=outputs/UWS_Neg_Wgain_5HT1A_A%A_%a.err #Load Matlab 2017a modul...
9f88980afef21996036cd42058aadff319b9b482190938143d0f1868d1d93fcc
MATLAB
5,841
224
#!/bin/bash #SBATCH --time=72:00:00 #SBATCH --job-name=NegPerturb5HT1A #SBATCH --mail-type=END #SBATCH --mail-user= #SBATCH --mem=3G #SBATCH --cpus-per-task=2 #SBATCH --array=1-101 #SBATCH --output=outputs/MCS_Neg_Wgain_5HT1A_A%A_%a.out #SBATCH --error=outputs/MCS_Neg_Wgain_5HT1A_A%A_%a.err #Load Matlab 2017a module m...
369c151fc96dcace946ee6d25865395807ccd5bc1147b7e73b20128093d65355
MATLAB
5,842
143
function [] = plot_worm_frame_post_analysis_showing_path_mochi_data_2(I, center_lines, centerline_color, centerline_stimulus, debugimage,in_track_index,current_ellipse_ratio,smoothed_path_x,smoothed_path_y,stimulus_delivered,path_history,demo_mode,all_velocity,current_rails_dur,initial_frame) % % % % % % [] = plot_wor...
4a49aeabfcb3c412b6065e88cd2ad029f838355d303d76e389cdc50dfb51c3d0
MATLAB
5,846
132
%{ Copyright (C) Cambridge Electronic Design Limited 2014 Author: Greg P. Smith Web: www.ced.co.uk email: greg@ced.co.uk This file is part of CEDS64ML, an SON MATLAB interface. CEDS64ML is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License...
1d5cf87ada64a318f1c36bf56b44c0cc10922e6ac8225cd0834b46f9acb630d5
MATLAB
5,849
169
classdef PatchClampSeries < types.core.TimeSeries & types.untyped.GroupClass % PATCHCLAMPSERIES An abstract base class for patch-clamp data - stimulus or response, current or voltage. % OPTIONAL PROPERTIES properties electrode; % IntracellularElectrode gain; % (single) Gain of the recording, in units Volt/A...
ba83d866d6f22a152891b87ba6ba9f24da45ee8729c27fc946505b1e89c044cf
MATLAB
5,853
185
% testDigPort.m % % $Id:$ % usage: testDigPort(<runlen>,<readPortNum>,<writePortNum>) % by: justin gardner % date: 06/26/09 % purpose: Tests digital read/write functions. This will make all of the digital lines on writePortNum (defaults to 1 % of the NI device turn on and off a...
bff244b908414dc3f3deb634c2293190b10da0106c464590d71bf7421ebf5696
MATLAB
5,855
182
function [f,h,n_el,bin_x] = dot_plot(x,groups,bins,opts) % [f,h,n_el,bin_x] = dot_plot(x,groups,bins,opts) % Creates dot plot of data in x with each point colored based on the % element's group membership. % Also has options for multiple plot markers. % Can handle missing values. % % INPUTS % x: data vector, used to...
2410d884be2a74826e126c5ec8000100262ce66c9973878e0645544138708110
MATLAB
5,857
164
function [this] = read_biff(filename, opt) % READ_BIFF reads data and header information from a BIFF file % % This is a attemt for a reference implementation to read the BIFF % file format as defined by the Clinical Neurophysiology department of % the University Medical Centre, Nijmegen. % % read all data and inform...
849284892d313e5257c6e5f1bdd71c6af79f0648f64c29011a690aa9a672df08
MATLAB
5,858
147
% advanced_example.m This script shows a more involved case of % ternary_plots, where the three axes are not space 0->1 & do not sum to 1. % Additional options are added to show how various elements can be % customized. clear all; close all; clc %% (1) Add paths % This function can be run automatically if copi...
39f0d8c3b5054099dcf6148005021eef0dfd08a961ea60fcb9ff7dc85e9a8b1c
MATLAB
5,864
130
%% Set Up clear;clc;close all % read table and set up parameters table = readtable('Z:\1_Maxwell_Gagnon\ProjectData_Amin\Boris Recordings\Experiment 2\SegInfo.xlsx'); struct = table2struct(table); direction = {'L', 'R'}; lightGreen = [117 187 49] ./ 255; % 0: no filtering, 1: filtering filter = 0; %% Run Segments ...
4cab262292fd93bc0fbcd17c457bb0ac8d2568be12a395111249b743b5e24df2
MATLAB
5,865
236
function [data,times] = fiff_read_raw_segment(raw,from,to,sel) % % [data,times] = fiff_read_raw_segment(raw,from,to,sel) % % Read a specific raw data segment % % raw - structure returned by fiff_setup_read_raw % from - first sample to include. If omitted, defaults to the % first sample in data % to - ...
8597ec29df874a72a9c6c3ede6add63eab5321db11b2ddf8abd452567aba3199
MATLAB
5,865
154
function plotSpectrogram( obj, varargin ) % PLOTSPECTROGRAM Computes and plot standard spectrogram % Use with LFP online streaming recordings % % Syntax: % PLOTSPECTROGRAM( obj, varargin ); % % Input parameters: % * obj DBScope object containg streaming data. % * (optional) ax Axis where to plot...
37eadd6803250d54c89194c648250eb8e919a0afe0ca4f8cffa3680fc8a4d325
MATLAB
5,866
166
function fH = makeSupplFigure5_eyefixation(projectDir,subjnrs,saveFigs,saveFigDir) % Function to reproduce supplementary figure 5: % Plotting the distribution of eye gaze position % % From the paper: % Title: Rethinking simultaneous suppression in visual cortex via % compressive spatiotemporal population r...
0fab162069df263ec0086319f59b84cf9cf5fb712b374a90320aee7c7b65f2ab
MATLAB
5,868
157
% clc, clear % close all %% a demo script to show discard too small/too dim components after network segmentation % you can supply any other criteria (like throw away boundary components, apply vessel masks, etc) % all threshold can be adjusted. % last update: 5/30/2020. YZ addpath(genpath('C:\Matlab Files\missing_...
bec07d2d4521a3724cd5f41ff0174807b2b5a5e642021b1273167e7ae5abb378
MATLAB
5,868
134
classdef VectorData < types.hdmf_common.Data & types.untyped.DatasetClass % VECTORDATA An n-dimensional dataset representing a column of a DynamicTable. If used without an accompanying VectorIndex, first dimension is along the rows of the DynamicTable and each step along the first dimension is a cell of the larger tabl...
2407adb123a14b26f4888bfc324c33f980656bf960a07620f7c11c6a99dbba7f
MATLAB
5,875
204
function out = delta2chi_FANSI_nlTV(params) % Nonlinear QSM and Total Variation regularization % with spatially variable fidelity and regularization weights. % This uses ADMM to solve the functional. % % Parameters: params - structure with % Required fields: % params.input: local field map % params.D: dipole kernel i...
aa8cf6951ef385ffd044455069c54feb505f35b727ec1031536b5d6b4effc9c7
MATLAB
5,877
225
function calc_asl_cbf(DATA,ROI,AddInfo) % CALC_ASL_CBF - Calculate CBF maps from ASL data using T1-map data if % possible (Aedes plugin) % % % Synopsis: % % Description: % % Examples: % % See also: % % This function is a part of Aedes - A graphical tool for analyzing % medical images % % Copyright (C) 2006 Juha-P...
e28061b2802571470f9b8bb4ed424ec7e319a9f2586d7c6d3917aa0825acfd20
MATLAB
5,877
168
% SaveDir = '\\znas.cortexlab.net\Lab\Share\UNITMATCHTABLES_ENNY_CELIAN_JULIE\FullAnimal_KSChanMap'; %H:\Ongoing\'%'H:\SfN_2022'; %%'E:\Data\ResultsOngoing' % % SaveDir = '\\znas.cortexlab.net\Lab\Share\UNITMATCHTABLES_ENNY_CELIAN_JULIE\2ConsecutiveDays_KSChanMap\Stitched\' % SaveDir = 'H:\UnitMatch\' FromDate = datet...
d8c424834c53f84bd4ff992d245a1be7d0b7b8181398e19822d197f8259eaf3d
MATLAB
5,881
167
% Computes credible interval(s) directly from a vector (or row-major matrix) of % the posterior(s) obtained by bayesian bootstrap. % % -- Function File: CI = credint (BOOTSTAT) % -- Function File: CI = credint (BOOTSTAT, PROB) % % 'CI = credint (BOOTSTAT)' computes 95% credible intervals directly from % the vec...
1b6a76c0581b9a032ffa210099e624043d06ef0fbddebb744a5a76fae40fd56d
MATLAB
5,883
208
function [] = Fig03_AveTimeCourseSongTrans() % Code for plotting calcium signals and song probabilities during song type transitions in Fig. 3d,f. Target = 'pulsePref'; % Fig. 3d % Target = 'sinePref'; % Fig. 3df selpath = ['../Data/Summary_TN1dsx/']; load([selpath,'Transitions']) %% switch Target case 'pulsePre...
2ee51146340651a8dd4bd2cb2aca0655540508a00dc8474ac0132c3cc9b4149c
MATLAB
5,883
158
function [Tree,isConsistent]=dendrogramSimilarity(C,Sc,Tree,varargin) % dendrogramSimilarity Compute within-cluster similarity for hierarchy % % This function implements different ways to compute the within-cluster % similarity of nodes based on the coclassification matrix for each cluster % identified by a hierarchy. ...
4ade621a417a429e93ef8fc3a2f25c4d906541ced67c1cf68aea1ede1fe07a36
MATLAB
5,883
131
classdef DynamicTable < types.hdmf_common.Container & types.untyped.GroupClass % DYNAMICTABLE A group containing multiple datasets that are aligned on the first dimension (Currently, this requirement if left up to APIs to check and enforce). These datasets represent different columns in the table. Apart from a column t...
1f845c26b5d11695fdede9f1e199873f76403c9e798de683f2f705e878febf92
MATLAB
5,890
200
function [] = ExtDataFig04_AveTimeCourse_OptStim_WingCut_Neuron() % Code for plotting the tuning curves of calcium signals of each neuron induced by optogenetics in Extended Data Fig. 4l,m. GT = 'WingCut_dPR1'; % Extended Data Fig. 4l % GT = 'WingCut_TN1SG'; % Extended Data Fig. 4m switch GT case 'WingCut_dPR1' ...
2abae1f77617d86769e5606bc7255c89e17a635e76a61cb3e4b5f3b4d3a54a32
MATLAB
5,891
155
% callSwingStanceSteps.m % % Function that takes in steps (defined by start, mid, end indices), % step parameters (calculated in computeStepParameters()), and FicTrac % info to call each step's half step as swing or stance % Option to call swing/stance based on half step duration: shorter duration % of two is swing,...
aa665a70897f178aa02e163a497d5b8b9082aad23c053891cb476f2885622aed
MATLAB
5,892
58
%%% making GENOME_BUILD hg19 GENOME_BUILD_19=cell(25,3); GENOME_BUILD_19(1,1)=cellstr('chr1');GENOME_BUILD_19(1,2)=cellstr('1');GENOME_BUILD_19(1,3)=num2cell(249250621); GENOME_BUILD_19(2,1)=cellstr('chr2');GENOME_BUILD_19(2,2)=cellstr('2');GENOME_BUILD_19(2,3)=num2cell(243199373); GENOME_BUILD_19(3,1)=cellstr('chr3'...
f536fbc937a3f63b26c2599fe97e8ea294489f1594576224f74ab91a73765d63
MATLAB
5,897
197
% mglTestTex.m % % $Id: mglTestTex.m 695 2010-02-24 08:14:14Z justin $ % usage: mglTestTex(screenNum) % by: justin gardner % date: 04/11/06 % copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING) % purpose: % function retval = mglTestTex(screenNumber) % check arguments ...
d6af13b2b7d2f500e084ff091f09904573b1571b773892db6861c3c56300a803
MATLAB
5,898
174
function list = find(varargin) % XMLTREE/FIND Find elements in a tree with specified characteristics % FORMAT list = find(varargin) % % tree - XMLTree object % xpath - string path with specific grammar (XPath) % uid - lists of root uid's % parameter/value - pair of pattern % list - list of uid's of matched elements...
dc908ff8b75434d929d21ddeea56d8a516a31aef8d342f097d08b90f4b9caee1
MATLAB
5,902
175
function results = robust_correlation(X,Y) % General function that performs multiple tests on X and Y. % % FORMAT: results = robust_correlation(X,Y) % % INPUTS: X and Y are two vectors of the same length. % % OUTPUTS: % result is a structure with one field for each output from the % different tes...
ffa63a6bd542946cddd2bcd7f6a795749786e675e5160deefd56bb690d3b34b3
MATLAB
5,910
177
% savestimdata.m % % $Id: saveStimData.m 891 2011-01-14 07:47:12Z justin $ % usage: savestimdata.m(myscreen,task,<forceSave>) % by: justin gardner % date: 12/22/04 % copyright: (c) 2006 Justin Gardner (GPL see mgl/COPYING) % purpose: saves the myscreen/task/stimulus. This will normally obe...
26a113535de7b4fb904de7a410d9c335ae28d3ce45e08923de91ae70decf04b8
MATLAB
5,921
171
function [gamma_min,gamma_max]=gammaRange(A,varargin) % gammaRange Compute range of gamma values. % % Syntax %__________________________________________________________________________ % % [gamma_min,gamma_max]=gammaRange(A) % % [gamma_min,gamma_max]=gammaRange(__,Name,Value) % % % Description %____________________...
94e0e228af146d710438f0dbdc1d24de8a55bd1a188575603f9597bb977e09a5
MATLAB
5,922
207
%Benjamini Hochberg correction clear all clc load('M:\Matt Chilvers\OneDrive - University of Calgary\PhD_Projects\Project3_WhiteMatterLesion\Scripts\AllRevisionsAnalysis\RegressionAnalysis_Uncontrolled\lm_data_uncontrolled.mat') %load('M:\Matt Chilvers\Documents\PhD\Project3_WhiteMatterLesion\Scripts\Plots\Scatte...
81b1a32f8d4a3f20c415ef0334754a5c7d03e240955454ff2d0ff1e24b122aea
MATLAB
5,924
158
%aspikes %plot STA for units, only those whose Mdep has p<0.05 by bootstrap % odd/even by spike % Unit names: % elecName - true electrode number (apperas in goodElectrodes) % elec - the index of elec in goodElectrodes) % elec = find(goodElectrodes==elecName); % unitName - [elecName,unit]; % ShowUnits - by elec...
ae6ffb705dcf78b4ce12e121d08c9bce4f3673bbf6bd8a8ffa28a5df0706e572
MATLAB
5,924
175
function [variance,mov_distance,mov_duration,max_speed]=embedding_dimensions(Session,Area,Ndir,Nbins,t_from,t_upto,edges_dur_bin,do_plot) %% embedding_dimensions performs PCA on the neural data from Session and %% Area binning the movements into Ndir directions and Nbins durations % This function also saves the PCA res...
6dd514c518b637c7dcb18daa1ece8f9865fe630e8c25b0f12f284b900287d6b4
MATLAB
5,929
146
function [] = plot_worm_frame_post_analysis_showing_path_mochi_data_3(I, center_lines, centerline_color, centerline_stimulus, debugimage,in_track_index,current_ellipse_ratio,smoothed_path_x,smoothed_path_y,stimulus_delivered,path_history,demo_mode,all_velocity,current_rails_dur,initial_frame,stim_color) % % % % % % []...
bb2982e78cc93e3f7b88e3efcb782aedbd01fac3f13fd8f79f7a3559b73cc524
MATLAB
5,945
161
% genCondBinnedSpikerateFictracPlot.m % % Function that generates plot of spike rate vs. FicTrac variable 1, % conditioned on the values of FicTrac variable 2. Plots points with error % bars. FicTrac variable 1 is binned finely, each point represents 1 bin. % FicTrac variable 2 is binned coarsely, each bin correspon...
07f1978855cd32e0c5afbfdae5f3585d06f913eeaf77c85fc08f662f4ef7e844
MATLAB
5,947
148
% mglEyelinkParams.mglEyelink % % usage: mglEyelinkParams() % by: justin gardner % date: 04/16/10 % purpose: Set/get parameters for eyelink % % To bring up a GUI to edit current params % % mglEyelinkParams; % % To get parameters for eyelink tracker: % % ...
06231006b4957130c83d53c677e9aac9cb48bb6030bd275a45b05261d74bb288
MATLAB
5,955
105
function [TestLNPStats] = ValidateLNP(Tracks, folder_indecies, folders, LNPStats) %Predicts the behavioral rate based on LNP model parameters, not used in paper % Detailed explanation goes here numbins = 10; all_LEDVoltages = cell(1,length(folders)); meanLEDVoltages = cell(1,length(folders)); for fo...
37a402768c2b6a4a1861741bba9f8f5a708ddfc6157658c43f805edc8dec9edf
MATLAB
5,961
142
%% Script to obtain centiles by SCZ-SAD diagnosis (relatives and chronic) % Copyright (C) 2023 University of Seville % Written by Natalia García San Martín (ngarcia1@us.es) % This file is part of Neurobiology Centiles Psychosis toolkit. % % Neurobiology Centiles Mapping toolkit is free software: % you can ...
d0f78f73b0daf860e9f46a8dfd2f26a2605399924fe8a804167cddd06dc0bcae
MATLAB
5,961
121
% uses PSPM toolbox % https://github.com/bachlab/PsPM % version used here: PsPM6.1 %% Prep code addpath('/data/u_dabbagh_software/PsPM6.1', '-end'); write_data=1 prep_events=1 run_glm=1 run_sf=1 excluded_subjects = [16, 39]; % Define excluded subjects my_sr = 100; %% Loop over subject and sessions for isub=1:40 i...
02da28b9cc7bb42f97b39d20f61bcf0c0b6c1d09670c9e9c2eafd63ca25d783a
MATLAB
5,962
202
% A simple script and a few functions tomake alligned videos and plots for % presentations % Data is related to OXygen Dynamics project with Felix RM Beinlich % Written by Antonis Asiminas, PhD % June 2023, COpenhagen %% Inputs % Duration of recording in seconds RecDur=1200; % Acquisition frame rates in...
5355a2e0a3d80ac313a041726385f06b743f4a501b7e729dab4084b10d68e1d9
MATLAB
5,963
185
% eyeCalibDisp.m % % $Id$ % usage: myscreen = eyeCalibDisp(myscreen,<dispText>) % by: justin gardner % date: 12/10/04 % copyright: (c) 2006 Justin Gardner (GPL see mgl/COPYING) % purpose: run eye calibration routine, dispText is optional argument that % will display the passed ...
9ee40fcfd2da0174ed1202b87e69a1c8e3c1ff0fee01c236a4524c66c1abe084
MATLAB
5,964
184
function cortex = read_nimh_cortex(filename, varargin) % READ_NIMH_CORTEX % % Use as % cortex = read_nimh_cortex(filename, ...) % % Optional input arguments should come in key-value pairs and may % include % begtrial = number (default = 1) % endtrial = number (default = inf) % epp = read the EP...
cc1dde9ca639b27f3e2e8b8cd8c0bc2f6d3ff0b0eb866be3e57464b415df39f3
MATLAB
5,969
153
% clc, clear % close all %% a demo script to show discard too small/too dim components after network segmentation % you can supply any other criteria (like throw away boundary components, apply vessel masks, etc) % all threshold can be adjusted. % last update: 5/30/2020. YZ addpath(genpath('C:\Matlab Files\missing_...
338ffddfb719bc95a65ed197fcc2f4b41b9e7e96c7903f6f09a4a73d8216eb7a
MATLAB
5,971
184
% disppercent.m % % by: justin gardner % date: 10/05/04 % usage: disppercent(percentdone,message) % purpose: display percent done % Start by calling with a negative value: % disppercent(-inf,'Message to display'); % % Update by calling with percent done: % ...
a803d9e0ccb5f49a4cd7b37bc4382bce0a4af47c8d8f924c56efdb8859eb0e37
MATLAB
5,972
199
function RunDifferentTau(InputRange) %% Function to test MCtx RNN SOC model response to variation in time constant of the RNN % Current version: Changing the tau of the RNN temporally scale the % trajectories preserving their shape. % % INPUT % % InputRange: range of parameters of the vector input % % Note: to modify ...
05a4b98733f417bf11912eeadbcb0958d81b51bcb2bff555242612c3ca025406
MATLAB
5,975
147
%% s_SimpleTutorial.m % Simple tutorial to get predicted fMRI BOLD voxel responses for % compressive spatiotemporal pRFs using a sweeping bar stimulus. % % The compressive spatiotemporal model is described by % Kim, Kupers, Lerma-Usabiaga, & Grill-Spector (2024) J Neurosci. % % This tutorial creates two example ...
937c2ee099239ec4df6cd428885077a2ddc826c139cb228837fd02c0a958604f
MATLAB
5,979
115
% For in vivo spine data analyzed using MapManager V_20171028 % Author: Richard Roth (rhroth@stanford.edu) % Date: October 2019 % Based on MapManager-Matlab-1.0.1-alpha by Robert Cudmore, 20171016 function retPool = getmyMapListValuesCond(myMapList, mySegmentTable, Condition, SessionConditions, StatName, channel...
a887d42645b6f6867a264a123caf203a6ecf106ada057e70278852ac542521f1
MATLAB
5,979
111
function subject_power_2014_motion_parse_v2(movement_files,skip_seconds,epi_TR,expected_contiguous_frame_count) % FD parsing Nipype wrapper pulling in list of motion files % Modified to read DVAR_pre_reg, DVAR_post_reg, and DVAR_post_all and store % values appropriately in the 51x51x3 cell array of structs % % All var...
3e6b215fc40bebd7df88c5eb3e1e6e727b108b695d3eb729616cb8344f78ec2e
MATLAB
5,982
145
function[freechan]=SONCreateChannel(fid,SrcChan,data,dataheader) % Obsolete function. To write to a file use the SON32 library % % Create a new channel in SON file fid using the existing channel SrcChan channel header as a template. % Channel data is contained in data. If data is type int16 a new ADC channel will ...
a8e52d2780a6ecd47f51dffa8be06041ba9f591d7bbee7b5a63dacae1ff64fc6
MATLAB
5,986
211
function [vert, face] = read_ply(fn) % READ_PLY reads triangles, tetraheders or hexaheders from a Stanford *.ply file % % Use as % [vert, face, prop, face_prop] = read_ply(filename) % % Documentation is provided on % http://paulbourke.net/dataformats/ply/ % http://en.wikipedia.org/wiki/PLY_(file_format) % % See ...
b7f4ba9f3d06a1c2dc331fa2f903eb5bdfa02a0deb27bcfc10ba33369fbdf472
MATLAB
5,986
211
function HBM_ALS_get_features_rsDyn() %get dynamics features from PLRNN of the form %z_t=A*z_{t-1} + W*max(0,z_{t-1}) + h + noise %please note that this code will not run on its own and is only intended to %provide the reader with a precise definition of the input features, %data files and additional functions are...
97394ddfd59ddbebef2198a1ccb64150b8581600477ee50c17d1184e50c7dfd0
MATLAB
5,991
186
% OCHiPerGator = Optimal Control using HiPerGator % This script samples n parameter sets to represent the tumor % microenvironments of n gliomas, and then calls GBMoptimalcontrol.m to % determine optimized, personalized treatment regimens for a combination % immunotherapy. Since this code takes some time, we used the ...
a3f13cfd2968907d58e744e64a6ebe0e985487f324767011303735e9c439f674
MATLAB
5,996
169
function ft_write_spike(filename, spike, varargin) % FT_WRITE_SPIKE writes animal electrophysiology spike timestamps and/or waveforms % to file % % Use as % ft_write_spike(filename, spike, ...) % % Additional options should be specified in key-value pairs and can be % 'dataformat' string, see below % 'f...
4c0bbf06f4811d1e474a1058d3b6041baa2b72fba66f3b512d644327ec03f2c9
MATLAB
5,997
165
function [f_names,f] = get_features_EMG(EMG,Fs_EMG,stages_30s,window_size) %get_time_domain_features_EMG: This function returns the EMG features for %the paper "Machine learning predict phenoconversion from polysomnography %in isolated REM sleep behavior disorder". The features are calculated in %separate windows ...
43f74004a697e6048ddd6f3c014f305aa0f427dccef9150eb4e6e50b46d5260d
MATLAB
5,998
154
% This script accurately computes and displays electric fields sampled on % a cross-section (transverse plane) via the FMM method with accurate neighbor integration % % Copyright SNM/WAW 2017-2020 %% Load/prepare data planeABCD = [0 0 1 Z]; % Equation of the plane of the cross-section (Ax + By + Cz...
b2de80a84ec5ead4d1087e98d22417c528121cac1d1feb6c221aa84d158492ce
MATLAB
5,999
193
function sos = old_zp2sos(z,p,k,direction_flag) %ZP2SOS Zero-pole-gain to second-order sections linear system model conversion. % SOS = ZP2SOS(Z,P,K) finds a matrix SOS in second-order sections form % which represents the same system as the one with zeros in vector Z, % poles in vector P and gain in scalar K. T...
8fdae14b1bc4de0573a8f3c328f05d81f2ed4b07f8f2e201e76d59bbcd33d1b6
MATLAB
6,000
193
function sos = old_zp2sos(z,p,k,direction_flag) %ZP2SOS Zero-pole-gain to second-order sections linear system model conversion. % SOS = ZP2SOS(Z,P,K) finds a matrix SOS in second-order sections form % which represents the same system as the one with zeros in vector Z, % poles in vector P and gain in scalar K. T...
5a6161ee1f8ca97861b879b9814e52ed069fc802cceda918e3acfb17a706eab0
MATLAB
6,003
137
% Fig 8. Benchmarking analysis results for spatial scales % 8b. Binarry Classification % 8b-1. Inreasing spatial scale % 8b-2. Bain-wide masks % 8c. Regression % 8c-1. Inreasing spatial scale % 8c-2. Bain-wide masks %% Set up clear; clc; % Load Data basedir = '/Users/donghee/Documents/proj...
a57fc25f3cac251fc8a55eaf8f5b122231a34815196e06e4a0a642609a00da57
MATLAB
6,005
184
%% fixed parameters strategy=1; % 1: delta= (rew(T)-mean(status(T,:)))*(phi(E,TE)^2)*(phi(E,TE)-1)^2; % 2: delta= F(E)-1 % 3: delta= (F(E)^4)*sign(rew(T)-mean(status(T,:)))*(phi(E,TE)^2)*(phi(E,TE)-1)^2; dt=0.1; % integration step time_trial=2000; % length of a trial in ms t_think=500; % time before stimula, i.e., tim...
9db101e8efe9a4ba006df8d5ee84da1383e07a93c166d09b66ae10d0d4d17cfd
MATLAB
6,008
181
% plotAvgEphysVYawVelBinFwdAcc.m % % Function to plot output of getCorrelationEphysFwdAccYawVel_cond_all() or % getSlideWinEphysFwdAccYawVel_cond_all(). % Plots yaw velocity on x, normalized spike rate on y, binned by forward % acceleration (i.e. different lines for different forward acceleration % bins). Mean spik...
50e8ec62fb6cca70793f513ab82eded3ef19731a7bb59b43ab51576bd981590c
MATLAB
6,016
108
function [r_s,edges_s,edge_type,myosin2,P] = create_myosin2(r_s,T_s,edges_s,edge_type,myosin2,P) % randomly choose a free spectrin triangle in the mesh aux_r1 = randi(length(P.myosin_Tfree)); % check the distance to the other free triangle centers center_Tfree = (r_s(T_s(P.myosin_Tfree,1),:) + r_s(T_s(P.my...
16a7465163fd0194996b6a0be23c81e036f76d8eed64273de67e78e070fcea0c
MATLAB
6,017
155
%% Amplitudes - form analysis %% Data load (manual) load('AmplitudeDistribution_Sponge_DIV18_All_norm.mat') sponge=Bin_Values_norm; load('AmplitudeDistribution_ECM_DIV18_All_norm.mat') ecm = Bin_Values_norm; load('AmplitudeDistribution_Geltrex_DIV18_All_norm.mat') geltrex=Bin_Values_norm; load('AmplitudeDistribution_B...
24ef44505620ebacd9ccdab2bca2a510a5f44f5ea5957e439d9f98fb4ffcedf8
MATLAB
6,018
159
%% IBI distribution - studio forma %% Data load (brutto e manuale) fig1 = openfig('IBIdistribution_Sponge_DIV18_All'); h1 = findobj(fig1,'type','histogram'); h1.Normalization = 'count'; sponge=[h1.BinEdges(1:end-1)' h1.Values']; fig2 = openfig('IBIdistribution_ECM_DIV18_All'); h2 = findobj(fig2,'type','histogram'); h...
efab997223ac1d2fa1e40a3989748efdd332e178fcc8174133ed5264633c90cd
MATLAB
6,023
174
function [dat] = read_plexon_ds(dirname, hdr, begsample, endsample, chanindx) % READ_PLEXON_DS reads multiple single-channel Plexon files that are % all contained in a single directory. Each file is treated as a single % channel of a combined multi-channel dataset. % % Use as % hdr = read_plexon_ds(dirname) % dat ...
f27793d16a283e2b8202ad2aeecced58430ef36675207a4f97a94cab20a3753b
MATLAB
6,026
160
function [run] = remove_badchannels(run, ID) % REMOVE_BADCHANNELS % This function detects the bad channels and saves this info in the info % field of each run (run.info). Bad channels were defined as channels with % a signal quality index (Sapia et al.2020) of less than 2 during > 50% of the % standing still periods. A...
826026940853f98ad116b371cfa16c5d2b359012898f544a20d84becd7176460
MATLAB
6,028
235
function [data] = fiff_setup_read_raw(fname,allow_maxshield) % % [data] = fiff_setup_read_raw(fname,allow_maxshield) % % Read information about raw data file % % fname Name of the file to read % allow_maxshield Accept unprocessed MaxShield data % % % Author : Matti Hamalainen, MGH Martinos Center %...
fa98f260c72f808bd5752febb9f84e101bcabe52d31cc269dfc6dd236019fbf9
MATLAB
6,028
181
function[data,h]=SONGetADCMarkerChannel(fid, chan, varargin) % SONGETADCMARKERCHANNEL reads an ADCMark channel from a SON file. % % [DATA {, HEADER}]=SONGETADCMARKERCHANNEL(FID, CHAN{, START{, STOP{, OPTIONS}}}) % FID is the matlab file handle, CHAN is the channel number (1=max) % % [DATA, HEADER]=SONGETADCMARKERCHANNE...
a6e63b9a4e3b5e094238fc1720878818391b99f91442f5c4fd03ee1284530494
MATLAB
6,032
233
function batch_ds_info=my_get_batch_ds_info(... opts, imdb, work_info, net_config, work_info_epoch, work_info_batch) task_idx=work_info_batch.ref.task_idxes; task_subidx=work_info_batch.ref.task_subidxes; % only support using one image for one batch... batch_img_num=length(task_subidx); assert(batch_img_num==1...
7cd9702a13afa01a17df202f90dc7f0fdb802cd2bba1417138a38947b3606b9a
MATLAB
6,033
171
function [info] = decode_fif(orig) % DECODE_FIF is a helper function for real-time processing of Neuromag data. This % function is used to decode the content of the optional neuromag_fif chunk(s). % % See also DECODE_RES4, DECODE_NIFTI1, SAP2MATLAB % Copyright (C) 2013 Arjen Stolk & Robert Oostenveld % % This file is...
f86cef2244895d9721698a2376c343ab133c18841f40ee4d43ca4acd18331f37
MATLAB
6,036
156
% findBoutStepIndsBall_full.m % % Helper function for extractOptomotorBoutsLegStepParams_fly() that takes % in bout peak, start, and end times (output of % findOptomotorCondYawVelPeaksFT() helper function) as well as step index % info, and returns aligned steps, as indices into legStep matrices. % Also, returns w...
9ac41b88551c7e5da9640d359bc134ac80bc8bf136dd4ec3e69af055eb8fc8fa
MATLAB
6,041
155
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % If you use this code, then please cite: % 1.- Ana P. Millan, et al. "Individualized epidemic spreading models % predict epilepsy surgery outcomes: a pseudo-prospective study." % medRxiv (2023): 2023-03. doi: https://doi.org/10.1101/2023.03.16.232873...
dfdfc3447cc3bd2a57b5c075af9f25edde15288568adbae2c7fcfb67b4c44fef
MATLAB
6,044
202
function [] = ExtDataFig05_AveTimeCourse_OptStim_Song % Code for plotting the tuning curves of pulse and sine songs induced by optogenetics in Extended Data Fig. 5c. GT = 'TN1dsx'; switch GT case 'TN1dsx' CellFlagNonTrans = [0,1,0,0,1,0,1,0,0,1,0,0]; end %% parameters nTrials = 6; nStim = 6; T = 1370; %...
2c6c0a4232fdeb9a9c8f8affd5890227b96f4cbdd67f6641f3f26146f8fecddc
MATLAB
6,046
221
%% Load Data from Voltage Divider Experiments VTH = 0.7; % Threshold voltage Vth VGCUTOFF = 1; % min Vg VGMAX = 6; % max Vg experimentdates = {'23-04-18-14-43-20','23-04-18-15-15-27','23-04-18-15-05-41','23-04-18-15-22-50',... '23-04-18-15-32-03','23-04-18-15-40-31','23-04-18-15-52-31'}; resistanceval...
2f06b6c5f7a3726ce50f3b793670f37beeea86cfc571cbb3114db8ab338e3a8f
MATLAB
6,046
203
function [m, xfall, sxall, syall] = inter_section(m, sttn, se, pixs, scl, sigma_x, sigma_f, sigma_d, maskc) % register frames across stable sections % Jinghao Lu, 02/02/2018 [pixh, pixw, nf] = size(m, 'reg'); if nargin < 4 || isempty(pixs) pixs = min(pixh, pixw); end if nargin < 5 ||...
903b46f7ef74e220cf0cf4e2cb31857240b71aab95204eb7cbfd9373601017fb
MATLAB
6,047
164
function ml_two_contexts_plot_rates_across_and_within(projectConfig) statField1 = 'meanFiringRate'; plot_feature_rich(projectConfig, statField1); plot_feature_poor(projectConfig, statField1); statField2 = 'peakFiringRate'; plot_feature_rich(projectConfig, statField2); plot_feature_poor(proj...
9e86245b9100660b27700e6b755967fe2e5978c2ee98a7f26761b2db05029abe
MATLAB
6,051
150
function cfg_artifacts=st_process_detector_results(cfg_artifacts) % ST_PROCESS_DETECTOR_RESULTS processes artifacts (as detected by ST_RUN_DETECTOR_SET) as follows: % - convert continuous artifacts (event tables) to segment-based artifact grids (ST_EVENT_TABLES_TO_ARRAY) % - expand artifacts to neighboring channel...
55543bd601b621455bbceb7ae132ec37274eb564bd7876ec52ead39699dea3dd
MATLAB
6,052
183
%% Figure 2: Inter-Subject Agreement Analsysis %% Inter-Subject Agreement Analsysis U_Scales_IndVar = struct('scale',[],'UU_diag_matched2tmp',[],'kendall_tau_corr',[], 'all_combo_diagonals',[],'all_combo_kendall_tau_corr',[], 'all_combo_diagonals_matched2TMP',[], 'all_combo_diagonals_matched2IND',[],'permutation_...
d888104a468b9f28883a940215e9fa67de97577dea8f227a86b7d3b61a62237f
MATLAB
6,056
183
% quick script mod of anova_legsIC_cond , for circular parameters circStepParams = {'stepDirections'}; legNames = {"R1", "R2", "R3", "L1", "L2", "L3"}; disp('Select output files from saveLegStepParamCond_bouts()'); [outputFNames, outputPath] = uigetfile('*.mat', ... 'Select cond_bouts file...
fb62b357c112d74ad063d13dce7418559a345e401b0773818ef7ee2d9324d62b
MATLAB
6,078
162
%{ Copyright (C) Cambridge Electronic Design Limited 2014 Author: James Thompson Web: www.ced.co.uk email: james@ced.co.uk, softhelp@ced.co.uk This file is part of CEDS64ML, a MATLAB interface to the SON64 library. CEDS64ML is free software: you can redistribute it and/or modify it under the t...
8acc2299b25dfa3ddd8d453c430e1599ab1a3a8fc72201d2a7c9e03d7d472ebc
MATLAB
6,080
172
%% Set up and perform Monte Carlo simulation of diffusion in a sphere at the center of FOV clear restoredefaultpath filePath = matlab.desktop.editor.getActiveFilename; root0 = fileparts(filePath); addpath(genpath(fullfile(root0,'lib'))); root = fullfile(root0,'data'); target = fullfile(root,'onesphere'); mkdir(target)...
2cb8080581a5f43b28aaa64cb7a4758f8145c9c7ae4882ae959af57233b98c9f
MATLAB
6,083
177
function [T] = ml_egomaps_compute_segment_table(... animal_pos_x_cm, animal_pos_y_cm, animal_facing_angle_deg, ... ARENA_WIDTH_CM, ARENA_HEIGHT_CM, RADIUS_CM, ... DISCRETIZATION_SCALE_FACTOR) % Facing angles are such that they increase clockwise and begin % vertical in "reversed" coordinates; y-axi...
ca6ce0721c47c8c9530c4f76ef5e35e142ebcddab0e7b51a0d023dbf39f16752
MATLAB
6,083
176
% plotCondBoutsStepParamLRDiff_allFlies.m % % Function to plot 1D step parameters for bouts aligned to yaw velocity % peaks. From output of saveLegStepParamCond_bouts() % One figure with 6 subplots, 1 for each leg % Can select more than 1 output file, will plot on same graph % Has option to plot reference steps (from ...
2b1071eec9357daa47246bc7f43acdf01e87b1ee2ed2b53f30d6e578d613f518
MATLAB
6,097
185
function recognition_demo(varargin) % RECOGNITION_DEMO Demonstrates using VLFeat for image classification if ~exist('vl_version') run(fullfile(fileparts(which(mfilename)), ... '..', '..', 'toolbox', 'vl_setup.m')) ; end opts.dataset = 'caltech101' ; opts.prefix = 'bovw' ; opts.encoderParams = {'type...
b11b23b20c7425c2013d9b9c66f53990fee7f1f956216c6bfc2f56939602795a
MATLAB
6,097
169
function demo % This demo file generates some artificial data and demonstrates how to % implement the direct linear discriminant analysis (DLDA), as well as % prevalence statistics. % % Prerequisit: niftimatlib-1.2 toolbox (https://github.com/NIFTI-Imaging/nifti_matlab) % % Ehsan Kakaei, Jochen Braun 2022 % (h...
174170a4eca1d1cba2481be3444667847bf7a6e5eea03ec0d421d5e993fdc222
MATLAB
6,100
128
function cal_params = check_cal_params(cal_params, prot_type) % vol_params = check_cal_params(vol_params) % % This function checks the elements of the struct vol_params to ensure % that all fields are set. Fields not set are set to a list of default % parameters. The struct checked is: % % - cal_params - Struct ...
e98c0056f7ea95ee38ceb47dfbc585b8e1b352f6d16cfd02ad403848ee4d5988
MATLAB
6,102
203
%% MAIN function to extract NB propagation %% Loading data clear close all clc [filename, pathname, filterindex] = uigetfile('*.mat', 'Select NetworkBurst file'); if isempty(strfind(filename,'NetworkBurstDetection')) errordlg('Selection Failed - End of Session', 'Error'); return end cd(pathname); load(filena...
6950744b1e460269676f909e5117c9d9be171f541c5f601e819d656f96fad882
MATLAB
6,104
54
function [complxDiff_norm,complxDiff,corrCoef]= GetComplxDiff6_single(SDsignal1,SDsignal2,shiftZi,shiftX,wLngZ,wLngX,deltaPhiStep) %wLng=4; % figure;surface(abs(SDsignal{1}(:,:,1)),'EdgeColor','none');caxis([0 5]) % wo=round(ginput(2)); disp('processing GetComplxDiff...') phi_stepMtx=NaN.*ones(size(SDsignal1)); Amp_s...
32df96cd7fad7aad8b78ddd76d6e111a6f6dc73345a65bf96686502deae81a54
MATLAB
6,105
163
% 6/8/23 - Noticed that heading could be off by 180 deg, which made the fly % appear to walk backwards when it wasn't. Manually went through all 2018 % trials (doesn't affect 2022, but those have other issues), and corrected % it using this script. figure; plot(bodytraj.tZeroed, bodytraj.unWrAng); %% figure; plot(...
a322922d5e52824f8df179151d2d003e2cdbe8aea7b2c3ba241da22619ce138a
MATLAB
6,106
109
% run amapOFshow clear all; runMode = 'batch'; globals; initglobals; PRINT_ERRORS = 0; PRINT_INFO=0; PRINT_NAN=0; DATA_TYPE = 'EM'; PLOT_TYPE = {'tuning'}; % {'map'}, {'trajectory'}, {'tuning'}, {'map';'trajectory'} ; %PLOT_TYPE = {'map'}; % {'map'}, {'trajectory'}, {'tuning'}, {'map';'trajectory'} ; %PLOT...
c97807d69a9c47af05b15c5a2cb2e82631bc640a8581efebb76581d79163399f
MATLAB
6,111
157
% This script accurately computes and displays electric fields sampled on % a cross-section (transverse plane) via the FMM method with accurate neighbor integration % % Copyright SNM/WAW 2017-2020 %% Load/prepare data planeABCD = [0 0 1 Z]; % Equation of the plane of the cross-section (Ax + By + Cz...