sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
79a3bedec922ba5062e1067e51f8c0b5d7d65190c4a9c0b21e18814e22ef8ed4
MATLAB
7,114
191
function [map,lo,hi] = cubehelix(N,start,rots,sat,gamma,irange,domain) % Generate an RGB colormap of Dave Green's Cubehelix colorscheme. With range and domain control. % % (c) 2015 Stephen Cobeldick % % ### Function ### % % Returns a colormap with colors defined by Dave Green's Cubehelix colorscheme. % The colo...
0e7e30e0169fc99df35b167d589fdf7c17af8df5e35067a34a7c5a0d04993c21
MATLAB
7,116
213
function FigureS12d_Motionenergy_single workpath='G:\Ishizu_data\movie\i34\20211119_AC'; cd(workpath); close all; n=4000;%ms / plot point (long-tone correct/error trial) %% Get task parameter(Bpod) temp = dir('Bpod*.mat'); Bpod_file=temp.name; load(temp.name); left = find(Chosen_side == 0); right = f...
63111679d6e9d09d97ebd93dc4ec11bdc8e4db2221462b25c8a64e4b22312441
MATLAB
7,117
175
function viterbi_trans_detection = lsim_fit_detect(obs_seqment_beats, type_det, init_state_1, init_state_2) C=2; max_state = 2; extra.sigma_diag = 1; extra.plot = 0; extra.check_convergence = 1; extra.time_series = 0; extra.left2right = 1; max_itration = 5; batch_size = 1; batch_size_catch = 5; num_g...
9e6749d14dd23ae40312bf003069d4fba6c034911fdd0553fe92d4dadc3a4fb7
MATLAB
7,118
151
function [in_structure_prob, G] = calc_structure_probability(measured_coords, std_dev,structure_coords, st, join_structures) % measured_coords: a 3-column matrix of measured coordinates for each dot % std_dev: a 3-element vector of standard deviations for x, y, and z dimensions % structure_coords: a 3D matrix where...
02961198c0653a4866ecc9603fd9880e9989f6e42303b1ec11effcf192f5e77b
MATLAB
7,121
183
function tcplv = TCPLV(eeg, fs, onset_time, varargin) % % tcplv = TCPLV(eeg, fs, onset_time) % tcplv = TCPLV(eeg, fs, onset_time, freq_rng, duration, pairofint, pertnum) % % ************************************************************************* % * PLV temporal dynamics estimated within 1sec time-steps for any ...
a03150ec465e6055a40828fcdce907b4f993501e390bdd45c249f33b4e12e3ce
MATLAB
7,142
197
%% LDE iteration w/o figures % L4EmeshX,L4ImeshY,LDEFrfunc: compsed by several different response % functions, and we choose the best from them for every step %% Problem for the BG parts: maybe not fine enough! % Let's involve the previously computed local responses... %% Starting from the finest function! % Output: I...
48bbf286e296d54b8d1d54fe0ab8f8bf6a78ee08721a83a2198e3839bf48e9e4
MATLAB
7,143
234
function wavelet_report(app) %WAVELET_REPORT Summary of this function goes here % Detailed explanation goes here cla(app.ax_wavelet_sig1) cla(app.ax_wavelet_sig2) cla(app.ax_xwt1) cla(app.ax_xwt2) cla(app.ax_xwt3) [form_idxs,~] = listdlg('PromptString',{'Please select fileformat ',... ''},... 'SelectionMode'...
6cee5ea4938f2fcb8ad63657776ba5588562ccbcab21531fdb0c9ade76dc411d
MATLAB
7,143
195
%% Function To save CSV files from Network to Gephi Format % Functional Network of Neural Ensambles % Only Significant Activity (!) % RUN AFTER: Ensemble_Sorting.m % AÑADIR NODOS DE REFERENCIA ESPACIAL: ESQUINAS DE NEGRO % AÑADIR NODOS SIN CONEXION PARA AMPLIAR LA DIFERENCIA ENTRE GRUPOS % Optimizar código % Input %...
b5153754261e1c2140bcd62aae27d83ad6a3195d273e88651880b3f768ead06b
MATLAB
7,143
171
function Positive_Negative_Both_RLt_Pattern_Sum20200304 path=['C:\Users\C238\Desktop\touchcellLtRt_terashita']; cd(path); LS=ls; SumRLtouchPoint=zeros(1,19); SumRLtouchFire=zeros(1,19); X=[]; SumRLtouchUnit=[]; SumRtouchUnit=[]; SumRLtouchPointUnit=[]; SumRtouchPointUnit=[]; for i=1:length(LS(:,1...
26e1f3c1bb42e182d318bcae8a7c6769a3fbd946c5efe1ec5ed4184b7a25acb9
MATLAB
7,149
178
function [ecg, phi] = ecg_gen_twa(N, fs, params, phase_bins, varargin) % ecg_gen_twa - Synthetic T-wave alternans (TWA) ECG generator % % Method: Generates synthetic ECG signals by generating Gaussian mixture % models with stochastic deviations in the phase domain, followed by % scaling the T-wave segment with...
617c5c444ee5686899fd00398ef88e84af4fce31ff4ddd072c889c2c8cfcd37b
MATLAB
7,150
173
%% EAG_export2mat % bla % % Version: 04-April-24 (R2023a) % Clean up clc; clear all; close all; %% Settings % --- where can we find the data SET.path2data = '...\EAG\'; % --- where can we find the CED scripts tp load spike data SET.path2CEDS64ML = 'C:\CEDMATLAB\CEDS64ML'; % --- where can we find the annotation SET.p...
41e83bdf86e2be04834ed1fd3627c19eb49d049993e9844f022dd7d558625d3c
MATLAB
7,153
235
function wavelet_report(app) %WAVELET_REPORT Summary of this function goes here % Detailed explanation goes here cla(app.ax_wavelet_sig1) cla(app.ax_wavelet_sig2) cla(app.ax_xwt1) cla(app.ax_xwt2) cla(app.ax_xwt3) [form_idxs,~] = listdlg('PromptString',{'Please select fileformat ',... ''},... 'SelectionMode'...
f3c3faf6eebb9ab36976ed276521de5dbc60fc1e5345fd646ec72b18e06d4446
MATLAB
7,155
171
close all; clear; clc; resultfname_amp = 'testProcessSeizureEEGPhaseAmplitudeFeatures_AfterDenoising_amp.txt'; resultfname_phase = 'testProcessSeizureEEGPhaseAmplitudeFeatures_AfterDenoising_phase.txt'; % this is the same as the previous one; except that the feature vectors are % kept in the frequency domain (look at F...
a9521e4416a29fb7d7d3e1c4452a82444cff77205f8d467c0cf9761dc4f61391
MATLAB
7,160
194
function [sig_mat_Y,sig_mat_X1,sig_mat_X2] = Get_Sig(ax,sig_mat) % TODO: % when I take the max of other bars, I should also consider their bar+errorbar, not only sig bars. % The graphics objects for the groups are assumed to be such that the first group is last. % Error bars are assumed to be plotted using the...
5cb515f94dce1457d22f443520c0746d9cd12737011ea1c4f804ef5d6ea00ce6
MATLAB
7,163
198
%% raincloud_plot - plots a combination of half-violin, boxplot, and raw % datapoints (1d scatter). % Use as h = raincloud_plot(X), where X is a data vector is a cell array of handles for the various figure parts. % Seee below for optional inputs. % Based on https://micahallen.org/2018/03/15/introducing-raincloud-plot...
26c265ec352f8bfbbc94b3de0742f8c95d0bc2324cafe841e612e82bf1add27c
MATLAB
7,168
184
function varargout = RaguRNDOpt2(varargin) % RAGURNDOPT2 M-file for RaguRNDOpt2.fig % RAGURNDOPT2, by itself, creates a new RAGURNDOPT2 or raises the existing % singleton*. % % H = RAGURNDOPT2 returns the handle to a new RAGURNDOPT2 or the handle to % the existing singleton*. % % RAGURNDOPT2('C...
394cc0801196a45c586738b78f1023bbbf144db6e19ccfcf601c9c2e26e9703c
MATLAB
7,171
177
function M = warping_transform_col(in_vector_boundaries, out_vector_boundaries, interp_order) % warping_transform - Generates matrices for time-warping one time-series to another (with different lengths). % This function can be used for ECG phase wrapping, mapping ECG beats of different lengths % into ECG beats of a fi...
e297e630d5b89a0d47714daf8fff1d30849537546b9478e1117de54adc1b1b8d
MATLAB
7,173
226
function Get_spikes(input, varargin) % PROGRAM Get_spikes. % Detect spikes and save them in a file. % % Saves spikes, spike times (in ms), used parameters and a sample segment % of the continuous data (optional) in filename_spikes.mat. % % input must be: % A .txt file with the names of the files to use...
0739d408bb1bd191db80bf6a20b5396587768107fc9d1651d5e17b43a00b1acd
MATLAB
7,174
234
close all; clear mex; funtype = 'gpu'; %funtype = 'cpu'; %funtype = 'matlab'; kCNNFolder = '..'; addpath(kCNNFolder); addpath(fullfile(kCNNFolder, 'matlab')); if (strcmp(funtype, 'gpu') || strcmp(funtype, 'cpu')) kMexFolder = fullfile(kCNNFolder, 'c++', 'build'); kBuildFolder = fullfile(kMexFolder, funtyp...
15526bee7980c597a8579121132096719bb6cc9c571c64b576a8f9fe797ab583
MATLAB
7,179
223
clear close all clc % load ECG1 % s = data; % load ECG2 % s = data(14, 1:end); % s = randn(1, 10000); fs = 1000; % load ECG3 % s = data(2, 1:end); addpath 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES' pth = 'J:\ECGData\Arrhythmia'; fs = 360; wd = cd; cd(pth); fname = '233'; segstart = 11.2 ...
d48f3717793099f93223d8ac4ea1d66248858d26a4dd0dc5b8b4a565b91755bb
MATLAB
7,190
192
%% HPC for large amount of IC tests. Start from NESS % AngId: 1-13 for 0:7.5:90 % ContrastID: B. "1/2 contrast" = bg + 1/2 * (X_E-bg, X_I-bg) % C. (normal) full contrast = (X_E, X_I) % D. super-charged = bg + 3/2 * (X_E-bg, X_I-bg) % SaveID Just for saving tag function [] = HPCGlobConvTest2_NES...
d3920257ab84c8b35b020d0d1062f233fcbed9292d540c4ac004a67f0bb11a4d
MATLAB
7,198
146
function [multi_matched_peaks_indexes, PeakToPeak_corrected, peak_location_cdi, PeakToPeak_corrected_Rule]=TwoStageSMFPeakDetectorRuleBasedCorrecction(ECG_data, wide_matched_template, narrow_matched_template, type, wide_wlen, narrow_wlen, PP_diff_wlen, PP_diff_th, average_peak_det_rate, fs, flgDbg) % =================...
50174b2c5688c61599754ed9ad8d7efe9ce2a0e7945736793b8713cda37f8963
MATLAB
7,202
188
% script to assemble information about burst amplitudes related to trial % outcome, when those bursts appear just before the stimulus. Parts of this % didn't make it into the final paper. clear clc close all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Parameters RerunAnalysis = tr...
9e011553932937a881a7715bec548d32f4bedeab06966e44e7c43d20b934e690
MATLAB
7,211
196
% % Test program for ECG filtering using EKF and EKS % % Dependencies: The baseline wander and ECG filtering toolboxes of the Open Source ECG Toolbox % % Open Source ECG Toolbox, version 1.0, November 2006 % Released under the GNU General Public License % Copyright (C) 2006 Reza Sameni % Sharif University of T...
11f8256f94e0c7ccb694a2b260e608129eeaccdf88172335d1fc861703a3e6b2
MATLAB
7,216
164
function update_correlation_axis(app) if isempty(app.corre_res) yyaxis(app.ax_signals_corre,'left') cla(app.ax_signals_corre) yyaxis(app.ax_signals_corre,'right') cla(app.ax_signals_corre) cla(app.ax_signal1_corre) cla(app.ax_signal2_corre) cla(app.ax_corre_1_1_1) cla(app.ax_corre_1_1_2...
3da4c5b832d96dfa5fb8bc75eafa664e6293154b0f4557063b07221ed6bd3928
MATLAB
7,220
134
clear close all; clc % parameters ofname = 'SVMOptimizedParamters02.txt'; % % % bins = [50 75 100 120 180 250 300 500 750];%75:6:81;%120; % % % bins = 120;%50:1:550;%:13:250;%75:7:120;%75:6:81;%120; % % % bins = 77; % gmorder = 5; % dropfeatures = 5; sigma = 150*ones(1, 7); % sigma = [181.5 27.0 179 66 111 26 19]; per...
36ca916a95ff3c9cdf6eb6715b382a769deec6452e38953eb3653cfd70749ff1
MATLAB
7,222
226
function Get_spikes(input, varargin) % PROGRAM Get_spikes. % Detect spikes and save them in a file. % % Saves spikes, spike times (in ms), used parameters and a sample segment % of the continuous data (optional) in filename_spikes.mat. % % input must be: % A .txt file with the names of the files to use...
12a49cad0db48047fa7d30a09fa8f26cc5365304c888a255ac0700097c790596
MATLAB
7,238
244
function [ChromaticCorrections,ROIs]=mnl_CalculateChromaticAberrationsFromGuideStars_v2 %Same as original but now with coloured figures %% Input Channel Data prompt='How many channels are used for imaging?'; nChan=input(prompt); LaserEx=nan(nChan,1); for i=1:nChan LaserQ=sprintf('%s%d%s','Please enter the excitati...
38360eb14b813ded56884e33603160167e0c43198e4c480b22e7f364c93b847c
MATLAB
7,239
226
function Get_spikes_folder(input, varargin) % PROGRAM Get_spikes. % Detect spikes and save them in a file. % % Saves spikes, spike times (in ms), used parameters and a sample segment % of the continuous data (optional) in filename_spikes.mat. % % input must be: % A .txt file with the names of the files...
d9afe9467874c8d4269ffe34a49bacb1c03bc2ce25230bb116fbc1ed4559aec0
MATLAB
7,242
255
function [x, objective, distance, times, mses] = ... SALSA(y,OMEGA,tau,n,varargin) %%%% Parameter values %% CONVOLUTIONFILTER isAconvfilter = 1 => A is the convolution filter, %% of the same size as the image and centered %% isAconvfilter = 0 => A is either a matr...
35b44085cdd551e67344a6a421e01c6913a5add491a052ac6946aa75d22d0959
MATLAB
7,243
77
function addMenu(obj, hFig) drawnow; outerPosition = hFig.outerPosition; hFig.figApply(@set, 'MenuBar','None'); obj.hMenus('FileMenu') = hFig.uimenu('Label', 'File'); uimenu(obj.hMenus('FileMenu'), 'Label', 'Save', 'Callback', @(hO, hE) obj.saveFiles()); uimenu(obj.hMenus('FileMenu'), 'Label',...
bf5165ce1240144c1a8e0fd9d2579ea92786e5fcd48193013e5a850667de277b
MATLAB
7,251
215
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %p = 0.001 %Each epoch, predict the prior, sensory and choice...
1c38068e0afb80979a97c77347b7262b36b860619462e04c01aef5467f01a5fb
MATLAB
7,253
231
clear close all clc % load ECG1 % s = data; load ECG2 s = data(5, 1:10*fs); % s = randn(1, 10000); fs = 1000; % load ECG3 % s = data(2, 1:end); % addpath 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES' % pth = 'J:\ECGData\Arrhythmia'; % fs = 360; % % wd = cd; % cd(pth); % fname = '233'; % seg...
26c1d9dc33311713ec9e60e3c3735937578947a0e9d2d123255fe8c40752c622
MATLAB
7,260
149
%%Prerequest %spike data and behavioral data (make sure the part name (end-16:end-4) of %spike data file is the same with behavioral data file) %% 1. Retrieve data disp('select brain region folder about spike data'); Folder_SpikDat = uigetdir('E:\Wang_SpikDat\'); session_str = extractBefore(Folder_SpikDat,"\" + w...
3ad84f18a315b4ffd02cdee3a2df8ca0be902ed5f730eca55b74893b86e9cee3
MATLAB
7,261
303
function ob = fatrix2_block(blocks, varargin) %function ob = fatrix2_block(blocks, options) %| %| Construct fatrix2_block object, a meta-object composed of fatrix2 blocks, %| such as block_diag(A_1, A_2, ..., A_M) %| See fatrix2_block_test.m for example usage. %| %| in %| blocks {cell} cell array of the blocks %| %| o...
829ab1467bb3e2f5e5bf58592f6ef761403d231e8a6cdaf10e250a3b6dbea648
MATLAB
7,270
232
function making_volume_csv_v2(mat_file_after_converting, dir_root_OG ) % mat_file_after_converting = "HB329.mat"; % dir_root_OG = 'HB329/'; csv_name = '16bit_allen_csv_20200916.csv'; label_file_name = append(dir_root_OG, '/tubemap/elastix_labels_to_resampled/result.tiff'); load(mat_file_after_converting); ...
1f2de142726ff3fada4fce4579f977a03ea58947d041083089a2d34a6df59e22
MATLAB
7,276
168
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This script plots fitted models to different groups of treated animals, % using growth and dissemination parameters from untreated animals reported % in [Benzekry et al., Cancer Res, 2016] (Scenario B) % It generates the plots of Figure 1C a...
a109f06e3f4e5407c16ad4ac0fea60606d09a62776eb611c6b80a2838c930394
MATLAB
7,280
186
% Response analysis of intracellular PN data recorded by Liza Bessonova % Two conditions: Before serotonin application % and After serotonin application clear close all clc load Liza_all_data_psth.mat %% % % Image the raw data % figure; % color = customcolormap([0 1], {'#ffffff','#000000'}); % %color2 = cu...
9069b0ec5e5779340da7ef900460b09a618da98d8a5eba7bf409acae30c3cf6f
MATLAB
7,286
143
function FSIcount20200108part2 path=['E:\CheetahWRLV20200411']; FSIsum=0; Rtcountsum=0; Ltcountsum=0; RtLtcountsum=0; Touchcountsum=0; Woncountsum=0; Woffcountsum=0; WonWoffcountsum=0; Doncountsum=0; WoDoncountsum=0; tDoncountsum=0; Wotcountsum=0; tWoDoncountsum=0; modBgracountsum=0; mod98coun...
db725c1eaeb64899ff96c027427c1b8942398202f71de21517045f0cf419b401
MATLAB
7,290
225
function points_s = eq_point_set_polar(dim,N,varargin) %EQ_POINT_SET_POLAR Center points of regions of an EQ partition % %Syntax % points_s = eq_point_set_polar(dim,N,options); % %Description % POINTS_S = EQ_POINT_SET_POLAR(dim,N) does the following: % 1) uses the recursive zonal equal area sphere partitioning algorith...
5fe70a6bd4b829ef6a0a783531299f2955ebe91e3e90b709e90488cbaf200306
MATLAB
7,305
192
function FourierfunctionRtouch190213 % % Ú×à–¾‚ð‚±‚±‚É‹Lq global dpath3 tfile fnameACresult ACresultW CCresultDrinkOn SpikeArray RpegTouchallWon LpegTouchallWon TurnMarkerTime RmedianPTTM RpegMedian LmedianPTTM LpegMedian render... RpNum LpNum OneTurnTime CCresultSpike locsP1time locsP2time locsP1time2 ...
72b98e823458cdbc0e0a688e2f2823bf3207f737e10118d7db95959097b4bb31
MATLAB
7,305
201
function PLV = PLV_RawSig(meth, sig1, fs, f0, varargin) % % PLV = PLV_RawSig(meth, sig1, fs, f0) % PLV = PLV_RawSig(meth, sig1, fs, f0, WS, ndft, pertnum, sig2) % % ************************************************************************* % * Calculating Phase Locking Value (PLV) matrix (Pairwise) using raw * % *...
6c3fe8fbc0708a7a5688cf4dbf1e11edd1ccbdbc1d6ac79cd53cbacc61c5fd22
MATLAB
7,317
261
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % analyzes docking time traces of tir % % runs through all .traces files in a folder ...
426a31ad76396ebe94954e57fc296b16cc6125759e63ab74f8c8ce97e9f2319d
MATLAB
7,322
208
load(cleanupFile) run([RETROMOCOBOX_PATH '/addRetroMoCoBoxToPath.m']); % run([MIRT_PATH '/setup.m']); addpath(SPM_PATH); %% fidHTML = fopen([htmlDir '/index.html'],'a'); %% And put the reconstructed images into the html all_ims = rn([outDir '/GRE_mag']); all_ims = all_ims(:,:,:,1); % keep just first echo all_i...
6cd50b49b6d0363c1137b5368bbeaca048a48df04bd51a70822923ea99781644
MATLAB
7,322
143
function MSNcount20200108part2 a=0; path=['E:\CheetahWRLV20200411']; MSNsum=0; Rtcountsum=0; Ltcountsum=0; RtLtcountsum=0; Touchcountsum=0; Woncountsum=0; Woffcountsum=0; WonWoffcountsum=0; Doncountsum=0; WoDoncountsum=0; tDoncountsum=0; Wotcountsum=0; tWoDoncountsum=0; modBgracountsum=0; mod98coun...
b1746583e6dc18a3b94440330b2d53df6ec8b487ccf1c0bc4c772f4f178293ba
MATLAB
7,328
245
%% compare factor analysis results using diff state criteria fileNames = {'FA_normal';... 'FA_strict';... 'FA_cp'}; plotTitles = {'original'; 'strict'; 'changepoints'}; sessionTags = {'M22027', '20220517';... 'M22029', '20220607';... 'M22031', '20220524'; 'M22032', '20220621'; ...
10032294d4fda4c811c5ef78fea6f84efbc792fb1a2bf58f15af3d286530f507
MATLAB
7,329
170
function keyPressFigWav(obj, ~, hEvent) %KEYPRESSFIGWAV Handle callbacks for keys pressed in main view if obj.isWorking jrclust.utils.qMsgBox('An operation is in progress.'); return; end hFigWav = obj.hFigs('FigWav'); factor = 4^double(jrclust.utils.keyMod(hEvent, 'shift')); % 1 or ...
c96ff8921328e7a43b4d5ac3f335f2088b982d34353016123147b24f9b29230f
MATLAB
7,335
175
% Script to read in EEG data for further analysis using FieldTrip % Triggers on movement offset using the optitrack markers. % Bad trials are removed and data are saved out for further analysis. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Housekeeping clear all; close all; clc;...
f5c664321eef83c75056e6fa15a6c4636cddaa87af9188854779c0d92ddc9af9
MATLAB
7,340
160
% Copyright 2024 Eelke Spaak, Donders Institute. % See https://github.com/Spaak/rift-phase-and-visibility for readme/license. % Belongs with: % Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension % to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscie...
9f89c01ddd19b9b26abc609209e3ec0c9303707291358ebe0a814d7bdfdbc5db
MATLAB
7,343
201
load(cleanupFile) run([RETROMOCOBOX_PATH '/addRetroMoCoBoxToPath.m']); addpath(SPM_PATH); run([ASPIRE_HOME '/aspire_startup.m']); %% Run ASPIRE on both noMoCo and MoCo if nEco == 1 % can't run ASPIRE, but need coil combination... magData = rn(fullfile(tempDir, 'GRE_5D_mag.nii')); magData = ssos(magData,5); ...
aff87d3569948246a193b7b964c880370ebb624af617be9d5cfdbf4014c37d35
MATLAB
7,350
194
% Ensembles Transitions: Hebbian Pathway % Input % fs: sampling frequency (4 plot only) % labels_frames: Ensemble Lalbel % signif_frames: Frames with Significative CoACtivity % CAG: Coactivitygraphy % ColorState: Ensemble Color [Nensembles,3] % If ifplot=1 plot...
2caabbfaa4cfdcc31e14d364e763b4e5b40781377d30762d8746d0e9234c9853
MATLAB
7,356
308
function [opt, extra] = vararg_pair(opt, varargs, varargin) %function [opt, extra] = vararg_pair(opt, varargs, [options]) %| %| Process name / value pairs, replacing the "default" field values %| of the opt structure with the user-specified values. %| This allows flexible argument order and "named arguments" somewhat ...
fa8209b5fa73ca697c5aa2e34dd5607951e23d51c054967c218fbfbbd168a58a
MATLAB
7,365
219
% this script attempts to correct the 'WM' holes % CORRECTION IS NOT NEEDED AS THE DIFFERENCE IN WM VOLUME DUE TO HOLES IS % LOWER THAN 0.1% (for HC) and LOWER THAN 0.011% (for MS)! clearvars close all addpath(genpath('/storage/stella/MATLAB_toolboxes/')); % insert the path to NIFTI_studio toolbox %% combine FAST an...
1d66b078d507da87a51718e1b44f20690b531fb1207b8ad715437ae38c230e13
MATLAB
7,371
229
function RaguMSConfInterval(out) % Copyright 2009-2011 Thomas Koenig % distributed under the terms of the GNU AFFERO General Public License [FileName,PathName] = uiputfile('*.txt','Enter file name'); [fid,err] = fopen(fullfile(PathName,FileName),'wt'); if fid == -1 error(err); end FeatLabels = {'Onset', 'Offse...
af71c78b0febb0ed2781352c3a65f44de6eb09951ca0fe27a292c3374d2b51b5
MATLAB
7,374
165
function [growVerts, allThreshVerts, growVertTracker] = growMap(growVerts, growSteps, allThreshVerts, allFaces) % Expands or Contracts Vertex Sets on a Mesh Over Specified Steps % % This function iteratively grows or shrinks clusters of vertices on a mesh by % adding neighboring vertices (growth) or removing border...
e2c2e0b10bdb071b712c77458f1982706666207f8e0743f2b74c2cf7a7f9dc29
MATLAB
7,382
253
function gui_advc (action) % % This file is needed by FASTICAG % This file holds the callbacks for advanced options -dialog % 23.8.1999 % Hugo Gävert %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Global variables % Handle to the window global hf_FastICA_AdvOpt; %...
1603760e449427cd973090ccf6603bc2790b31f73f690a6395740619fad2fa41
MATLAB
7,388
220
function [FigA FigB FigC]=PlotRepeatTouchSpike20170823(TouchIntervalSet,SpikeA,NN,PegTouchAll) %‘S‚Ẵ^ƒbƒ`Š´ŠÔŠu‚ð•␳ Hist0=cell(length(NN),4); SpikeCount=cell(length(NN),4); SpikeRate=cell(length(NN),4); Interval0=cell(length(NN),4); % NumFire=zeros(length(NN),4); for n=NN for m=2:4 B=[]; ...
2ac14ffd1216139d734a27c6d26c94ac96f24d6ef4c7ebc1791bf4a4c81b6271
MATLAB
7,389
261
function [CA]=mnl_MeasureChromaticAberration(Bead,Im,Scale,BeadID,foldername,figures) %Function to measure the chromatic aberration of beads. NB this uses the %code "centerOfMass" written by Jered R Wells. This is added as a %subfunction below. %% Calculate the centre of mass for each channel if strcmp(figures,'y')==1...
d45c9351119ec4d655432a3fd066b39e031ef97ad501761d925949eac8eea437
MATLAB
7,408
179
function phy(hClust) %PHY Export JRCLUST data to .npy format for Phy if exist('writeNPY', 'file') ~= 2 warning('Please make sure you have npy-matlab installed and on your path (https://github.com/kwikteam/npy-matlab)'); return; elseif ~isa(hClust, 'jrclust.sort.DensityPeakClustering') ...
fdc53072d0e2866204e6482ac15f403f84fcbf8af6fa757f626622ae61dd1555
MATLAB
7,417
237
function wavelet_report(app) %WAVELET_REPORT Summary of this function goes here % Detailed explanation goes here cla(app.ax_wavelet_sig1) cla(app.ax_wavelet_sig2) cla(app.ax_xwt1) cla(app.ax_xwt2) cla(app.ax_xwt3) [form_idxs,~] = listdlg('PromptString',{'Please select fileformat ',... ''},... 'SelectionMode'...
c9a04b0b0e16f1674e7aadf04338977d4709acdbe5a0506641f4875950d8fb1c
MATLAB
7,418
288
%George Roberts - 28/07/16 %Beamforming reconstruction of source power addpath('bfunc'); addpath('sfunc'); addpath('vfunc'); %load data, initialise grid dlocx = -0.03; dlocy = 0.04; dlocz = 0.07; n_theta = 180; rtmode = 2; % while (rtmode > 3 || rtmode < 1) % rtmode = input('Enter 1 to use radial components,...
2e5c89ef52363d1d2d882b3657863cd1afce7c26db7b27aed520790d7b20bb55
MATLAB
7,424
130
clear; close all; clc; addpath 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES' % % % dbstop if warning type = 'Arrhythmia'; switch(type) case 'Normal' pth = 'J:\ECGData\Normal'; fs = 128; segstart_list = 0 : 60 : 30*60; % segstart_list = 0 : 600 : 12*3600; dif...
e4cc36cebbc49438b963f0c193e74685b7759c99d2efc437a300620c6227682f
MATLAB
7,428
132
%PegTouch.m %PegTouch analysis %1AFInfoidate, mouseID, sessionNo,training condition, Num.Turns,TotalTouchTime, TotalWaterOn, Num.Stops, 1-10, 11-20, 21-30, 31-40,,,) %2B:Start time array %3C:Stop time array %4D:TurnTime, cumulative %5E:OneTurnTime %6F:cumulativeTouchTime array; fall down %7G:WaterOnTime arra...
ff78ee7ae3947f4a04599fde8c42a5b5b4d9e0b263e7ebe70c26a4495b6d7774
MATLAB
7,432
203
function FourierfunctionRLPeg20190925 % % Ú×à–¾‚ð‚±‚±‚É‹Lq global ACresult ACresultW CCresultDrinkOn SpikeArray RpegTouchallWon LpegTouchallWon TurnMarkerTime RmedianPTTM RpegMedian LmedianPTTM LpegMedian render... RpNum LpNum OneTurnTime CCresultSpike locsP1time locsP2time locsP1time2 locsP2time2 fname...
d049aace4db95659097885c597bfcf62a1e3a748ba880e3a76a6e44c75d83790
MATLAB
7,436
375
function [coherogram,phase,t,f] = bz_MTCoherogram(lfp1,lfp2,varargin) %MTCoherogram - Compute LFP coherogram by multi-taper estimation. % % USAGE % % [coherogram,phase,t,f] = MTCoherogram(lfp1,lfp2,<options>) % % lfp1,lfp2 wide-band LFPs (one channel each). % <options> op...
05f2a632b4f74304d984f75d80925eb48a7403305c8e8a647dcbbf7d191db20e
MATLAB
7,452
263
%% plot removal time dependent [cols,alpha] = chooseColors; figure('Position',[100 100 300 300]) hold on % set lims and labels xlim([0 31]) set(gca,'XTick',[0:5:30]) set(gca,'XTickLabel',-1:5) xlabel('Time (s)') ylabel('Accuracy (%)') %indicate tone start and action start plot([5 5],[40 90],'k','HandleVisibility','o...
2f84969a2ff50fe9ef9db8655be2a8da38b87a94e966f982fd25dd02da5542c2
MATLAB
7,453
191
function DataAugmFor3D(DataPath,SavePath,SegX,SegZ) addpath(genpath('./XxUtils')); if nargin < 4, SegZ = 13; end if nargin < 3, SegX = 64; end if nargin < 2, SavePath = '../your_augmented_datasets/';end % ------------------------------------------------------------------------ % generate 3D dataset for ZS-DeconvNet ...
d29ea5ceef696f7f176ec03fcd388e1380cdcca55fa610f8b5c19b631fbc2229
MATLAB
7,453
229
% Copyright 2024 Eelke Spaak, Donders Institute. % See https://github.com/Spaak/rift-phase-and-visibility for readme/license. % Belongs with: % Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension % to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscience,...
7903c913336c6ff8d8309ff66fe7d0ad74f0baa757b8318401994eeb7017ac96
MATLAB
7,454
261
close all; clear; clc; % parameters subject1 = 'Dog_3'; subject2 = 'Dog_3'; number1 = 6; number2 = 6; path1 = ['J:\Seizure\' subject1 '\']; path2 = ['J:\Seizure\' subject2 '\']; mode1 = 'interictal';%'preictal'; mode2 = 'preictal';%'interictal'; epochlen = 10; % epoch length in seconds epochoverlap = 7; % overlap betw...
e926e79bce6e12421565622072caecd5404c722f8f8fc75ed2c69e2fcae366ae
MATLAB
7,458
210
function exportnetwork(filename, labels, conn, directed, varargin) %% Export network data to a file in GEXF format. % Export a network to a GEXF (XML-like) file that can be loaded by network % visualization software, Gephi in particular. % % export_network(filename, labels, conn, directed,...) % % Input: % filename: ...
1092245d41b220e0d83d2bac972e89fa48f632eab0e53410099e0e9b09e6c629
MATLAB
7,466
191
function [handle,pltchans,epos,Zi] = topoplotIndie(Values,chanlocs,varargin) %% Set defaults headrad = 0.5; % actual head radius - Don't change this! GRID_SCALE = 67; % plot map on a 67X67 grid CIRCGRID = 201; % number of angles to use in drawing circles HEADCOLOR = [0 0 0]; % default head ...
24eb7ce6622dae97b02eb6452cf804937c258ba0522e4c17cfd352d949637ca1
MATLAB
7,467
197
%% GetAmplitudeRatio(MouseName, seDir) % Amplitude ratios from spike rate load('E:\seFilePaths_all'); tCorrectTrialRatio_summary =[]; for m = 1:size(seFilePaths_all,1) tic MouseName = seFilePaths_all.MouseName{m}; seFilePaths = seFilePaths_all.seFilePaths{m}; for i = 1: length(seFilePaths) ...
46ae067230a9270686e760b429438ddbe432e303dd5e24667148842e44e78afa
MATLAB
7,467
220
function varargout=xwt(x,y,varargin) %% Cross wavelet transform % Creates a figure of cross wavelet power in units of % normalized variance. % % USAGE: [Wxy,period,scale,coi,sig95]=xwt(x,y,[,settings]) % % x & y: two time series % Wxy: the cross wavelet transform of x against y % period: a vector of "Fourier" periods a...
7c0fe9978cf219101e06263ca0f89a8a1c776994069563a2a51dbb8f6fdbb677
MATLAB
7,468
211
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %p = 0.001 %Each epoch, predict the prior, sensory and choice...
967af73dac17529f7703fdcd71a09f21ea3e6687227fdb242bc9c38e0784fe7d
MATLAB
7,477
244
function results = stepwiseRegr(vett,nomiREG,avg_auc,t_onset,DataName1) % [fid msg]=fopen('REG_TOT2.txt', 'r'); % if(fid>0) % [vett cont]=fscanf(fid,'%f',[5 450]); % disp([num2str(cont) ' valori letti...']); % vett=vett'; % fclose(fid); % else % disp(msg); % end % % [fid1 msg1]=fopen('regressori2.txt', 'r'); % if(fi...
fa0e79b1b547e54aefe770cfe9d13b81fca409866b95e5fa96d4b9a7bfdbc243
MATLAB
7,479
230
% Function that Finds a feature subset equal or best than all features % to classify the conditon given % Input % Y: Labels: conditions % X: Dataset % NameFeatures: Feature Names % EXPIDs: Experiment IDs % Output function OKFeatures = Best_Subset_Feature(Y,X,NameFeatures,EXPI...
0f4ce8ba6cfda766e3373cff75af987708a64f47432591abb849ed09aaaadaf7
MATLAB
7,490
168
function update_spectral_axis(app,static) %UNTITLED Summary of this function goes here % Detailed explanation goes here int_idx = find(strcmp(app.popup_int_spect.Value,app.popup_int_spect.Items)); if static labels = {['DS = ' num2str(app.edt_ds1.Value)];['DS = ' num2str(app.edt_ds2.Value)]}; channel_idx ...
3330c61c385f9b9577e4049292a6084be8f0c1bc867a21365a9c9f2851821786
MATLAB
7,492
213
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %p = 0.001 %Each epoch, predict the prior, sensory and choice...
6d9a9536cef1ce716e8da0946feff1a048dc9822b6c3a8a6f89787e17c4c9b1c
MATLAB
7,502
218
% Function to anlize Driver Function: % Check if first samples are the biggest ones (mainly due to miss % detrending, fast bleaching or decay of fluorescence % Input % D: Original Set of Row Vector of Driver Signals % FR: Response Functions % XDupdate: Detrendend Signals % Xest: ...
0e00d8d62e3198494d3942da8e960d533f63d82a7013f88d11f5161a2ae15775
MATLAB
7,503
231
function [anoise,tnoise,QC] = spmup_rcompcor(fmridata,brainmask,whitematter,csf) % This function compute the 'compcor' regressors of Behzadi et al. 2007 % <http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2214855/> % One difference from the original paper is that we use more robusts % estimates for ROI selection based on ...
8a7ac16678e3266011e7af75c9b1ea7eb128b0eee2f0c9cdfed08a32961c8033
MATLAB
7,510
276
function [img handle] = imab(data, clims, bSep, noCols) % function [img handle] = imab(data, clims, bSep, noCols) % % Just show the 2D, 3D or 4D data as quickly as possible % % Concatenates the slice dimension from left to right, and the time % dimension from top to bottom. % % When Mosaiced, lowest slice is in bottom...
317d45567f950d9d7c58026446ee73245d67b7f73cd6ec4511ed08a28b84bf47
MATLAB
7,524
163
%change lines 40 -41 to decide which odor period to train and test on. %201-280 = ON period, 281-360 = OFF period clear all; tic clc; close all; fcount = 1; od=xlsread('Odor_details.xlsx','Sheet3','G25:G46'); %odor_data % od=xlsread('Odor_details.xlsx','Sheet3','C48:C69'); %odor_data %od : mmHg, aliphatic?, #...
cebeed54557b7985e1451a1d133757aec8f27a52dc3ded5a7e1f0c53fdd9706b
MATLAB
7,530
213
function plot_and_save_before_and_after_psth(all_psth, all_cells, name) % plot and save psth of before after input all psth - 7 ints % plot and save ir of before and after %calculate and plot pvalue of mean response for each intensitiey %all_psth(7*2 cell with all psth for all intensiteis % mkdir(name) cd(name) save('...
7c2f4900aedb20c94364d4311e0b1d3f88f4521b6b96e748ae57709285f56b9c
MATLAB
7,533
220
clear all close all COMMONPLOTS=1; ALLPLOTS=1; sigma=0.5; Veq=-76.72; Vth=-39.51; Vr=-41.70; tau=11.85; Vsp=-20; R=118.5; C=0.098; tau_Ref=1; P=10; taus=20; epsilon=0.05; T=20000; rate=10; dt=0.1; probaSpike=rate*(1e-3)*dt; probaSpikeext=0.1*(1e-3)*dt; wmax=2; wmin=0; t_vect=0:dt:T; ntimes=length(t_vect); n_Re...
dd96981ef1638cbd1b758e951743ccdbfa02b1be75e457260594e95bfde1db37
MATLAB
7,536
132
%1AFInfoidate, mouseID, sessionNo,training condition, Num.Turns,TotalTouchTime, TotalWaterOn, Num.Stops, 1-10, 11-20, 21-30, 31-40,,,) %2B:Start time array %3C:Stop time array %4D:TurnTime, cumulative %5E:OneTurnTime %6F:cumulativeTouchTime array; fall down %7G:WaterOnTime array %8H:WaterOffTime array %9I:Sto...
0c60706902e3520922c25f9cf133fecb94055eba47db9f7aa91ca6565be0efd3
MATLAB
7,545
166
% this script calculates the variance of FWF and T1w in % NAWM of MS patients and check its correlation with significant behavioral % scores and clinical parameters clearvars close all addpath(genpath('/storage/stella/MATLAB_toolboxes/')); addpath('/storage/stella/Analysis/matlab_scripts/'); cd('/storage/stella/Analy...
2e53db824e05faf0c95572158918248ddebae8fc3e440b2e0bd62231b086c93c
MATLAB
7,560
169
function hFigPreview = doPlotFigPreview(hFigPreview, figData, fKeepView, hCfg) %DOPLOTFIGPREVIEW hWait = jrclust.utils.qMsgBox('Plotting...', 0, 1); nSites = size(figData.tracesFilt, 2); XDataSamp = figData.windowBounds(1):figData.windowBounds(2); XData = XDataSamp / hCfg.sampleRate; tlimSecs ...
23233f2e3954781c0f49c79209d98fa55fbe946d55d96ac3a16715e95807eb96
MATLAB
7,566
240
function wavelet_report(app) %WAVELET_REPORT Summary of this function goes here % Detailed explanation goes here cla(app.ax_wavelet_sig1) cla(app.ax_wavelet_sig2) cla(app.ax_xwt1) cla(app.ax_xwt2) cla(app.ax_xwt3) [form_idxs,~] = listdlg('PromptString',{'Please select fileformat ',... ''},... 'SelectionMode'...
89b8d545b1a95740c40d70862c3bde05f440eec0ec51e099d8661832bc31fb2f
MATLAB
7,566
184
function [P_O_model ,alpha_out , beta_out , alpha_T_out , b_c_ot_nc_out , P_observ_cond_to_state_out , P_observ_cond_to_state_comp_out]... = forward_backward_chmm(pi_0_chmm, transition_matrices_chmm, chmm_gmm_para, Y_in) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CHMM forward-backward %%%%%%...
7566b888e8b05db7127de12c41c25e2241acd5fb9183c98666b5d5720131817c
MATLAB
7,568
184
% Script to read in and plot exported OptiTrack data % Also adds in triggers based on velocity to look for movement related % artefact. % Before running this script, please make sure all your markers are % labelled and all your rigid bodies are resolved in Motive. Then export % trackiong data as a .csv file whic...
3dbc0a9d5e6fc96f39a27deed31b649152fc2e5701fe0d90602c1ca81a74884a
MATLAB
7,570
183
function update_annotate_axis(app) int_idx = find(strcmp(app.popup_int_annotate.Value,app.popup_int_annotate.Items)); int_name = app.popup_int_annotate.Value; if int_idx == 1 borders = [nan nan]; else tmp =find(vertcat(app.burst_ints.type) == 1); borders = app.burst_ints(tmp(int_idx-1)).borders; end c...
c05af3ba31c66de5d86c6a34936cf2307a41ae21117228073838788455d10e70
MATLAB
7,574
194
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %p = 0.001 %Each epoch, predict the prior, sensory and choice...
0c07b147bc7f525e56b624eacf726bad4287fe6af8415dcf780dcfd01c92fcf3
MATLAB
7,581
193
%%Prequest %model spike and model state date generated from 'Network_modeling.ipynb' % This code can only be ran section by section % for runing one of section, mute the rest of others %% 1. single neuron simulation %{ T_I_ex = readtable('E:\Wang_plots\Network modeling\19n09000.xlsx','Sheet',1); T_v = readtable(...
5a951ed0adfffd0620c164128daeff6f5d13158458d98e6880c87e070e4a04e5
MATLAB
7,581
87
%%% load data from UKB_GxE.m %% %%%%%%%%%%%%%%%%% %% cross-validation of interactions %% %%%%%%%%%%%%%%%% clear SNP_Cardio_int_P SNP_Cardio_int_T SNP_Cardio_int_SE SNP_P SNP_Cardio_int_P=zeros(360, 22); SNP_Cardio_int_P(SNP_Cardio_int_P==0)=NaN; SNP_Dep_int_P=zeros(360, 22); SNP_Dep_int_P(SNP_Dep_int_P==0)=NaN; %%%% s...
caa7af8e642ddca807ad7d21d4364166685e53b10aff5cd30318130ecb10ef84
MATLAB
7,581
194
%{ ---------------------------------------------------------------------------- Determine the time window for task relevant neurons %Start of task %Sound on %Sound off %Before choice %After choice (0sec) %After choice (1sec) %After choice (2sec) %p = 0.001 %Each epoch, predict the prior, sensory and choice...
1a00740cb5b36394c4b96f1fa6e4a942a2dd9320860954b9426dfa5cc02cc340
MATLAB
7,585
150
function dispFeatures = getFigProjFeatures(hClust, sitesToShow, selected) %GETFIGPROJFEATURES Get features to show in feature projection view % input: sitesToShow, vector of site indices % input: selected, vector of primary (and optionally secondary) % selected clusters % output: d...
461a09de8fdd4cb7c9da025d642a1ba4bf1091c18d9cf6ec19e10115afffb4a3
MATLAB
7,587
182
%% percent of intensity encoding and reponsive cells %% early responsvie cd('I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\eopn3\all_ints_data\is responsive and IE control_vs_eopn3_vs_c57') load("all_ints_with_tags.mat") %% G1 = grpstats(T, "tag","mean",DataVars=["Is_reponsive","Is_reponsive_and_IR"]); wr...
4a473e091c18695e416a42e2e5e29d996a14f8bdc0b348c8fdad15a79640fadd
MATLAB
7,604
201
function [bad_comps] = plot_ICA_comps(comp150,ch_table,lay,bad_comps) %% Lukas Rier July 2022 comps_n_page = 7; currpage = 1; n_comps = size(comp150.topo,2); comps_table = cell(n_comps,3); table_color = zeros(n_comps,3); for comp_i = 1:n_comps comps_table{comp_i,1} = comp_i; comps_table{comp_i,2} = 'Good'; ...
958c48b466fdb94222100cb18b8b7b036aa3758991dd349b6e5acb4690eb1b5e
MATLAB
7,605
242
close all; clear mex; funtype = 'gpu'; %funtype = 'cpu'; %funtype = 'matlab'; kCNNFolder = '..'; addpath(kCNNFolder); addpath(fullfile(kCNNFolder, 'matlab')); if (strcmp(funtype, 'gpu') || strcmp(funtype, 'cpu')) kMexFolder = fullfile(kCNNFolder, 'c++', 'build'); kBuildFolder = fullfile(kMexFolder, funtyp...
c3da8ab72758b712300f0ffd9d3578f69f04fc652213b82622abaefe89460b37
MATLAB
7,611
224
clearvars close all addpath(genpath('/storage/stella/MATLAB_toolboxes/')); % insert the path to NIFTI_studio toolbox %% simple generating three tissue masks (CSF, GM, WM) integrating info from FIRST and FAST (using MNI priors for registration) folder = pwd; slice = 86; % just to visualize maps brain_all = load_unto...