sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
2e0912d737d1e7ad64171618f4cca8a1d052647a32854702c996831a8bb200a7
MATLAB
5,147
174
%load IRdata.mat load IRdata_example.mat d=intensity; % intensity for k=1:3 switch k case 1 dataset=earlyres; case 2 dataset=steadyres; case 3 dataset=OFFres; end for i=1:size(dataset,1) a=dataset(i,:);...
3b4b407656e8fba02270df7a38f7e49f7a6668b45d3325796cfeaba85f12da1a
MATLAB
5,152
148
% Detects bursts in EEG data, saves them. Can take >6 h to run. clear clc close all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% load in and set parameters for analysis % set parameters for how you want to run the script this time RunParallelBurstDetection = true; % true for faster...
73cd9a779087dd57845f534863112dc6926c58eb484bd6e40da7d48b5942b7ba
MATLAB
5,153
100
function [test_indices train_indices ind]=cv_stratified_multilabel_DBP(N,n_folds,bestmodel) % N is the label matrix %Stratifies by discretizing multiclass tracking data into one unique label %after bining individual classes. The final discretized label makes up an %combination of individual classes labels. %best...
2064e0ba03e1f8047ca6ba4f61320f39fbc1c35e22ba12ba86ca3a2ff76fbc0c
MATLAB
5,154
141
function Apply_And_Save() p = 1; % Input_Dir = uigetdir; % Let the user choose a directory. Input_Dir = 'D:\Dropbox (Technion Dropbox)\Omer Yuval\Neuronalizer\PVD Images\Sharon\DEG_for_Menorah_analyser_Filtered_Format_Names'; Files_List = List_All_Files(Input_Dir,'mat'); % SaveDir = 'D:\Dropbox (Technion ...
9bb71fcea7948cbb0bc525930ede1221f08926306e78f962737319ed195c2593
MATLAB
5,157
165
function varargout = choice(varargin) % CHOICE M-file for choice.fig % CHOICE, by itself, creates a new CHOICE or raises the existing % singleton*. % % H = CHOICE returns the handle to a new CHOICE or the handle to % the existing singleton*. % % CHOICE('CALLBACK',hObject,eventData,handles,...) ...
78451773f8c6f88cdd6f4fe905a7d47562b219616f2a6db50df748dd89f2ee9a
MATLAB
5,158
183
function [A,B,C,determinant] = IOT3Dnew(I0,I1) %This function receives I0 and I1 as 3D input images and find an initial %masspreserving mapping between them. The details for the method can be %found in, % % Haker, Steven, et al. "Optimal mass transport for registration and warping." % International Journal of Comput...
211ad84c30026026349a9a180748af15ca7525aa53916e1327031b091311a6c0
MATLAB
5,165
180
% caculate mean ramp per cluster clear clc ploting = 1 ; norm = 1; ploting2 =1; %% [file, path] = uigetfile('*.mat','MultiSelect','on');%When the user clicks the load psetion button, a window should open to enable the user to select a file. cd(path) datafile = fullfile(path, file); %save path %% counts = 0; for i = 1...
4cdfb247100f8814ce7c0a69962f77bb74d861f6fa8f91f84c538092fa775c76
MATLAB
5,165
148
function [p1 n1 n2]=compute_spike_boundary(spike_ref,fs) % COMPUTE_SPIKE_BOUNDARY - Function to detect spike endpoints % % Syntax: % [p1, n1, n2] = compute_spike_boundary(spike_ref, fs) % % Inputs: % spike_ref - 300 ms [10-60] Hz filtered spike segment with spike peak at % 75 ms. The spike seg...
b80d1804e4fd4374530690c7a167e75d0927b822f191ace3f022fe46fa155512
MATLAB
5,175
120
%% Precomputing on Planes: Give input, compute firing rates as functions of inputs % Output: save([SaveFolder 'MFpV_LDE_' num2str(InputCtgr) '.mat'],... % 'f_EnIOut','meanVs','SteadyIndicate','FailureIndicate','L4ERcrd','L4IRcrd') % Input: InputCtgr: Choices from 1-3. Orthogonal, suboptimal, optimal %...
c556a74f5e547cd5720324c1a2469e60f1e8d5a5f459c91dcd36650eb9ef96bf
MATLAB
5,175
104
%ica eegdir1='G:\BORI\bedrest\RENDEZETT\A) Bedrest_EEG\Bedrest_PreEEG\EEGRest\'; eegdir2='G:\BORI\bedrest\RENDEZETT\A) Bedrest_EEG\Bedrest_PreEEG\EEGIca\'; %ActualSet = ['A_1'; 'A_2'; 'A_3'; 'A_4'; 'A_5'; 'A_7'; 'A_8'; 'A_9']; %nrFD = [32, 32,29,31,31,31,30,32]; %A %chanel nr %ActualSet = ['B_1'; 'B_2'; 'B_...
dd0f9dc1318281de633a6ddae46e0ae5847cf8a2dd7c347d90b460f6380c0dbb
MATLAB
5,175
120
%% Precomputing on Planes: Give input, compute firing rates as functions of inputs % Output: save([SaveFolder 'MFpV_LDE_' num2str(InputCtgr) '.mat'],... % 'f_EnIOut','meanVs','SteadyIndicate','FailureIndicate','L4ERcrd','L4IRcrd') % Input: InputCtgr: Choices from 1-3. Orthogonal, suboptimal, optimal %...
f797300d19a8db079251b9e1959ee6141c526c558a5abe254332d2820035e798
MATLAB
5,175
161
%{ ---------------------------------------------------------------------------- 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...
09b21d84e2c021bf38aece4f8e8fa36b39aa0066229a4417ef8284710b71b7da
MATLAB
5,180
82
function Corrected_Angle = Correct_Projected_Angle(A,A0,At) % This function... % All angles are given in radians. % A is the angle to be corrected (radians) of the rectangle, pointing from the vertex center outside. % A0 is the reference angle (of the corresponding midline point). % At is the local tilting angle...
00233389b4ff111c9fbbef28b6751978d53dc376b5a8e3acf056cd09582b2a83
MATLAB
5,182
72
function [taskFCvTaskFC_diffs, taskFCvTaskFC_diffs_tvals, taskFCvTaskFC_diffs_pvals, percentSigValuesFDR_total, percentSigValuesFDR_pos, percentSigValuesFDR_neg, FDRThreshP05] = calcTaskVSTaskFCDiffs(task1ConnMatrix, task2ConnMatrix) taskFCvTaskFC_diffs=zeros(size(task1ConnMatrix,1),size(task1ConnMatrix,2),size(tas...
9bebb0014bc7d2eae8af10dabc40167e4c38bdcd86630e5714fda5e00d31ea56
MATLAB
5,184
90
function options = spmup_getoptions(BIDS_dir) % routine to return all the spmup options with defaults set % % FORMAT options = spmup_getoptions(BIDS_dir) % INPUT BIDS_dir is a folder in which analyses should be carried on % OUTPUT options is a structure with spmup optional default parameters set % 'outdi...
952b0afc1508763e12fccbdb853242d690080e71adeefb85af40c7f7f1baef7c
MATLAB
5,186
195
function [fid_cor phase_cor Frequency_correction] = correct_freq_and_phase_by_correlation(fid,par,info) global sw H1offset sfrq1H sw = info.spectrum.SW_h; sfrq1H = info.spectrum.synthesizer_frequency; H1offset = info.spectrum.ppm_center; % B0 correction using cross-correlation (based on Pat Bolan freqAlignXCorr.m) m...
4e00996b2af0813b24d9c626c126a5df977dac7d3477ab685893b71e5b881770
MATLAB
5,190
164
%% CM_preprocessing %% Enter mouse name, session date, recording site, data directory clear MouseName = 'EF0148'; seshDate = '190313'; recSite = 'left POm'; Genotype = 'Emx-Cre;Ai32'; Sex = 'male'; Manipulation = 'NaN'; inhSite= 'NaN'; seshType= 'NaN'; DoB = '180627'; MainDir = 'E:\'; IntanDir = [Mai...
0887087c2cc9e19996a5ec4840ee6c0e1527c136e43757ebbd4d57e1d9a95e45
MATLAB
5,194
180
function controlfilename = createLCmodel_control_press117T(metabname,l1,l2,l3,preproc_dir) do_water_scaling=0; doecc=0; %triky do ecc only for suj46 if findstr(metabname,'Suj46_100803_MC_slaser_TE_35_NEX128') doecc=1; end TEMET=1; basis_set_file_path = '/home/romain/images5/spectro7T/basis/basis_sLASER_7T_TE...
cc860323ca303b0b5a9c51da64b742f4278727cd337dc3666048b03759c9d5f6
MATLAB
5,198
147
function [y1,y2,Pbar,Phat,PSmoothed,Kgain] = KFNotch(x,f0,fs,varargin) % % [y1,y2,Pbar,Phat,PSmoothed,Kgain] = KFNotch(x,f0,fs,Q,R,gamma), % Removing Power-Line noise using a linear Kalman filter and smoother % % inputs: % x: vector of noisy signals contaminated with power-line % f0: the notch frequency % fs: sampling ...
8d9300ba2eb1d2bf7855159c1bacd3fb1ab35ce7e92f8915d35846d79963e036
MATLAB
5,203
93
function update_cluster_plots(app) %UNTITLED Summary of this function goes here % Detailed explanation goes here clu_idx = app.settings.cluster_display; tmp = 'abcd'; colors = [[0.0 0.0 1.0];[1.0 0.0 0.0];[0.0 0.5 0.0];[0.620690 0.0 0.0];[0.413793 0.0 0.758621];[0.965517 0.517241 0.034483]; [0.448276 0.379310 ...
507719302f84aa87c293ab4f0f549ff61dac5e58514ed7e639212e670aec20ed
MATLAB
5,204
125
% Detrending by Segments Linear & Smoothing Methods % Input % X: signals of Ns x Frames % Output % XD: Detrended Signals % function XD=linsmooth_detrending(X) [Ns,Frames]=size(X); % Ns-Signals of Frames % Initialize Outputs: XD=zeros(Ns,Frames); %% MAIN LOOP for i=1:Ns x=X(i,:); % Read Single Fluorescence Sign...
b3252af41a72abcb997a05f9ed993417f302fced2975e838fe6d81391e76003b
MATLAB
5,207
126
clear close all; clc % parameters % % % logfileame = 'SVMOptimizedParamters03.txt'; outputfileame1 = 'Submission55.csv'; outputfileame2 = 'Submission55_unbiased.csv'; % % % 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 ...
6c6f8351d5431030efd0b593b24f26c6762eeb610108a0c94dfdc8afe8f89a73
MATLAB
5,214
125
%% Plot lick direction probability during rule trainsition % Chang et al Fig 5a % Get right and left lick probability during rule transition across mice load('E:\Cross-Modal_Project\Revision\rule_transition\data_array.mat') mainDir = 'E:\Cross-Modal_Project\Revision\rule_transition'; recSites = {'left S1', 'left S2',...
fe86f4905b501ef88b983b8a78befb9ea5b5e9702d558b7db10d720305c4bdb9
MATLAB
5,223
96
function [fid, hdr, cleanupObj] = write_nifti2_hdr(hdr, filename) mydelete(filename); %avoid permission issues, and replace links with files instead of overwriting the pointed-to file fid = fopen(filename, 'Wb'); %always write native-endian - capital W means fwrite() doesn't flush every call if fid == -1 ...
4998accf3eee352bdb36f7f5cdb083eff24f05a584f6e62e757d793685e76cb0
MATLAB
5,226
209
% simulate_periodic_eeg should create a vector of a specified length, of % which a certain proportion should contain a sine wave of specified % periodicity, with bursts a certain length. clear clc close all DefaultCenterFrequency = 10; DefaultBurstAmplitude = 30; DefaultBurstDensity = .4; DefaultBurstDuration = 1; De...
859536e455a24c7fddf9c3e415b4fc9036fae9d25db79fade81bd630741379b7
MATLAB
5,227
188
%% load centroids, tis, evs clear p = params_2DAA; fpath = fullfile(p.processed_data_dir,'allData.mat'); load(fpath,'evs','tis','bvs') [cols,alpha] = chooseColors; pad_pre = 5; pad_post = 10; %% get traces for sub = 1:p.nSubjects for ses = 1:p.nSessions pos_traces{sub,ses} = []; pos_traces_aligne...
156b179c3b97bd09098ae59e3a25f06b12ab2156934dc7148bf2730d61c31163
MATLAB
5,234
174
clear close all clc % load ECG1 % s = data; load ECG2 s = data(1, 1250:2250); % 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'; % s...
ddf33f460808c6bfa525483e7d2b8cd44522ccc2f50e14f1bacee023ab87272d
MATLAB
5,237
131
% Epoch each subject's pre-processed localizer data. Also identify and save % good channels for each subject. % Enter path to SPM 12 folder SPM_folder = 'D:\spm12'; % Enter Path to the MEG_Decision_Study folder study_folder = 'D:\MEG_Decision_Study'; %% Set folders to save things % Folder where epoched trained data s...
23fc4a69df6aac14ec5eaea78a8ad6288bee5d835902214fbdc7830ca8f31f29
MATLAB
5,238
149
function varargout=wt_ax(ax,d,varargin) %% Continous Wavelet Transform % Creates a figure of wavelet power in units of % normalized variance. % % USAGE: [wave,period,scale,coi,sig95]=wt(d[,params]) % % d: a time series % wave: the wavelet transform of d % period: a vector of "Fourier" periods associated with wave % sca...
ac1cbb5fe83ff006cd650c527e1c13d4a0fc848a1cc8abb8bc14dc2ff340db34
MATLAB
5,239
180
function gui_l (x, y) % % This file is needed by FASTICAG % The load dialog for loading new data % and new initial guess. % 24.8.1998 % Hugo Gävert %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Global variables % Handle to the window global hf_FastICA_Load; % Ha...
aa31d4bca0a5076177a51b76b857cd5c4cbc0b473b6ab964d546b88b32d1e8e0
MATLAB
5,241
111
function [par, confirm] = edit_parameter(par_in) %EDIT_PARAMETER Summary of this function goes here % Detailed explanation goes here fields = { 'max_spikes_plot', 'to_plot_std', 'all_classes_ax',... 'mintemp', 'maxtemp', 'tempstep',... 'SWCycles', 'KNearNeighb', 'min_clus',... 'randoms...
c94fd39b11b278b389b8ae769b426b1a1be254f8df03d5ebdecdfedec03cb741
MATLAB
5,247
166
clear close all; clc; pth = 'E:\Sameni\Projects\Seizure\SourceCodes\Probabilistic\SourcesWithResultsBackup\'; R1 = importdata([pth 'testFreqDomainEnergyIncreaseRate01.txt']); R2 = importdata([pth 'testICASubspaceAngles01.txt']); R3 = importdata([pth 'testWeightedHistogramAveraging02.txt']); R4 = importdata([pth 'testP...
9b0fae2e917f461b2e740d427c19c5ebc56c831c3e0003c70a2d2ff58f8ab205
MATLAB
5,248
197
% Previous methods used either fixed thresholds or standard-deviation based % thresholds to determine theta events. This is not ok when there's a % highly variable amount of that oscillation in the signal. clear clc close all P = burstParameters(); XLim = [140 160]; Signals = []; Titles = {}; % load high-theta sign...
fe5ecfbee1097fa5b820154201dbeb506cc8e07f8c7b2a50b88f24b39c037864
MATLAB
5,251
105
function vdm_files = spmup_compute_vdm(fmap_folder) % create vdm maps for each fmri session - assumes data follow BIDS % % FORMAT: vdm_files = spmup_compute_vdm(fmap_folder) % % INPUT: fmap_folder is the folder where to find gradient field maps % % OUTPUT: vdm_files is a cell array with the names for the vdm maps fo...
a0841d720b0aefcc89cd5c519d723dcae33ad85018f692a52147ddac6b12108b
MATLAB
5,254
160
function [spikes,thr,thrmax, noise_std_detect, index] = amp_detect(x,handles) % Detect spikes with amplitude thresholding. Uses median estimation. % Detection is done with filters set by fmin_detect and fmax_detect. Spikes % are stored for sorting using fmin_sort and fmax_sort. This trick can % eliminate noise in the d...
c25aba0bbfbecfd6de82fcf36338f569be7999e4058122b76213ceebea90360a
MATLAB
5,259
167
function entiresessionPhotomPlot_LoneFigV2(x,y,eb,setupParam,TrialParam,allTrials,loneFigure) allTrialsID = allTrials.ID; if setupParam.CompareGroups == 1 % GroupParam = TrialParam.GroupParam; groupnames1 = fieldnames(allTrialsID); groupidx = zeros(1,numel(groupnames1)); for i = 1:numel(groupnames...
cd8d77a7a496becd55c8557d52bb514ed40a9eb94632cc063a7db8f15c0c78ae
MATLAB
5,260
124
clear all close all clc constants; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Load data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% import_data; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Settings %%%%%%%%%%%%%%%%%%%%%%...
526b713c159deca2ecef6790d337c1e234fe52c593dfa64ef1fc0c20149796c6
MATLAB
5,264
200
function hdr = load_nifti(niftifile,hdronly) % hdr = load_nifti(niftifile,hdronly) % % Loads nifti header and volume. The volume is stored % in hdr.vol. Columns and rows are not swapped. % % Handles compressed nifti (nii.gz) by issuing a unix command to % uncompress the file to a temporary file, which is then deleted. ...
5801236f1ba14ebdb596d05012fee97cbe09febe598df503db8be5aca5fe03db
MATLAB
5,265
133
function [fid, dcmInfo] = spec_read(dn, debug) % function to read spectroscopy data from siemens dicom .ima/.dcm files % usage: [fid, dcmInfo] = spec_read(dn) % arguments dn = filename version = '2021.07.27'; if (nargin == 1), debug = false; end dcmInfo = dicominfo(dn); % R2006b dicominfo() now reads...
5b31ab34b76986b2547ee158930b328afaa668878e9438ba47a2081b9f7e36fe
MATLAB
5,265
167
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 % get structural mask ...
27ebbe417157e12224e0a8bcde34eed920c4fe327f5c0e885149aabe95b6215c
MATLAB
5,276
153
function unitSims = unitWaveformSim(meanWfSet, clusterSites, hCfg, scoreData, iCluster) %UNITWAVEFORMSIM Mean waveform similarity scores for one cluster against all others updateMe = scoreData.updateMe; cviShift1 = scoreData.cviShift1; cviShift2 = scoreData.cviShift2; simScoreOld = scoreData.simScor...
a3a1b5ffde4d71a09cf0d1433e565fe533e92efca2757f707403a9385928bc66
MATLAB
5,276
121
%% Precomputing on Planes: Give input, compute firing rates as functions of inputs % Output: save([SaveFolder 'MFpV_LDE_' num2str(InputCtgr) '.mat'],... % 'f_EnIOut','meanVs','SteadyIndicate','FailureIndicate','L4ERcrd','L4IRcrd') % Input: InputCtgr: Choices from 1-3. Orthogonal, suboptimal, optimal %...
ad30a63e9af5be3f2a3aa4cb90e1307de6626f06194260964c0a2ff0522fc45c
MATLAB
5,276
67
function [taskFCvRestFC_diffs, taskFCvRestFC_diffs_tvals, taskFCvRestFC_diffs_pvals, percentSigValuesFDR_total, percentSigValuesFDR_pos, percentSigValuesFDR_neg, percentSigValuesFDR_total_bytask, percentSigValuesFDR_pos_bytask, percentSigValuesFDR_neg_bytask, FDRthreshByTask] = calcTaskVSRestFCDiffs(taskConnMatrix, res...
b8829a97192feccadb9e9d7d562f7084ee953fa39e6ab1943e27d9d863cba886
MATLAB
5,276
126
function PVD_CNN = PVD_CNN_Train(Training_Mode,S,net) % Run Examples: % PVD_CNN = PVD_CNN_Train(1,[]); switch(nargin) case 0 Training_Mode = 1; S = PVD_CNN_Params(); net = []; case 1 S = PVD_CNN_Params(); net = []; case 2 net = []; end rng('default'); % Reset the random seed...
9656b789562d1f297a7cdc5a60214d81ddef571dcdb39e39c4fe942848cffecb
MATLAB
5,279
170
function mnl_CompareDifferentThresholds_ClusterClassification %% Load in each csv c=1; next=2; Quant=struct('Threshold',[],'DataMatrix',[],'Single_n',[],'Single_pc',[],'Multiple_n',[],'Multiple_pc',[],... 'MultipleClose_n',[],'MultipleClose_pc',[],'Few_n',[],'Few_pc',[],'Scattered_n',[],'Scattered_pc',[]); %Load in...
82d70f55067951999aa2d09c5fabec10612da22c6a22889644f204797f90cdf0
MATLAB
5,281
127
%% loading data tmp = load('dataFig45.mat','mono','IPD300','ILD35','FQs','PHs','ILDs'); FQs = tmp.FQs; % data for monaural AM tuning monoPLk = mean(tmp.mono.RToutPLk); monoALk = mean(tmp.mono.RToutALk); monoPSp = mean(tmp.mono.RToutPSp); monoASp = mean(tmp.mono.RToutASp); monoPEx = mean(tmp.mono.RToutPEx); mo...
a3c7d06421c3aac731f6e1f822cf2f28ada3a4f1911ba5812045ccde914942c1
MATLAB
5,283
140
function this = gifti(varargin) % GIfTI Geometry file format class % Geometry format under the Neuroimaging Informatics Technology Initiative % (NIfTI): % http://www.nitrc.org/projects/gifti/ % http://nifti.nimh.nih.gov/ %_______________________________________________________...
4e33b7136d41329c91d041b52f70f8385980346f9ab950870a3d4950fa11ec62
MATLAB
5,289
135
function [d, tmpOut] = LR2fsaverage(f, hemi, d, pths) % Resamples data from fs_LR to fsaverage space. % % This function converts surface data from the fs_LR surface space (used in % the Human Connectome Project) to the fsaverage surface space (used in % FreeSurfer). It supports resampling both metric and label data u...
7f792f6164bb2ef4b76fa8dac362ca63ed1d439b4a72164a8f590241ce9d3816
MATLAB
5,290
116
classdef UtilsTest < matlab.unittest.TestCase %UTILSTEST Test that various utilities run as expected properties testDir; testFile; testText; end methods (TestClassSetup) function createTextFile(testCase) testCase.testDir = tempname(); mkdir(testC...
088bc057b2496822f3a47b826c9f77eca53e3c42db8ca1ac4652daca8431d3a2
MATLAB
5,291
158
function trials = load_trials(session, channel, unit) % Make trials info = get_info(); for fold = 1:info.num_folds fullfilename = fullfile(... info.folders.trials, ... get_id(session, channel, unit), ... sprintf('fold%02d.mat', fold)); file = load_f...
b1efbbab52c4da6ba8889df654a59982fdf878fceffe39b3f056e65fbb8c48b4
MATLAB
5,291
178
%% Init clear path(pathdef); addpath( genpath( 'Source' ) ) rng(42) %% Load load( 'Data\HRTF_Typical_Bat'); M = matfile('DataCalculated\Simulations/DataSonoNerf_IRs_UALogo_public.mat'); fnSave = 'DataCalculated/PreparedData/DataSonoNERF_Training_UALogo_test.mat'; %% Settings ...
120cdee4bff4720f9abc5961be8223db8bb62fdfe9dea2f01ce1967097f1cf7b
MATLAB
5,297
176
function [ output_args ] = plot_summary_dim_projections( proj_a, proj_e, dim_ves, saveFigs,out_dir ) %% plot projections per dim cols = chooseColors; lims = [-2.5 7.5]; rep_mean_a = squeeze(mean(cat(3,proj_a{:}),3)); rep_mean_e = squeeze(mean(cat(3,proj_e{:}),3)); rep_mean_ve = squeeze(me...
714928688b84cd1b56eb6a2837cf76ded0ec09d65b6ed9fbd2c0f438d713e5a8
MATLAB
5,297
167
% Function to accumulate Rate of Activity (RoA) % of each Cell For each Experiment of the same % experimental setup, i.e., same experimental conditions % -------------------------------------------------------------------- % Input % Load experiment manually from different folder: one by one % R_Condition: Selected...
a3e45063c1af16a8e813347fc6da81b7b46643af519fae60f1615d2393e294cf
MATLAB
5,299
116
function [clusters] = loadKSClust(phyPath,varargin) %loadKSClut - Load KiloSort Clusters % % Usage: % clusters = loadKSClust(phyPath); % % Description: This function is designed to import data from silicone % probe recordings after it's been sorted using KiloSort and manually % curated using Ph...
dedca462af9ab269388835e9ac74d5f12e511877c6e105c01101495fa590745f
MATLAB
5,300
209
function [spikeMatrix, peak_idxs, peakTimes_ms, classes, peak_vals, dip1, dip2 ]=comBIN(aaa,data,sr,spk_pos,NBINS_peak,NBINS_dip,NBINS_dip2,npointsbeforepeak,npointsafterpeak) %comBIN(spks,data,sr,1,1,1) if nargin<8 npointsbeforepeak=2...
bb5648d7b3055674bbfae550212b579fa577418737e63f3217cbf0b7092286f1
MATLAB
5,301
149
function [t,swc]=senpai_skeletonize(cIM,neuron,somas) % senpai_skeletonize: % produces a matlab tree structure and an swc-formatted matrix for % the skeleton of a binary segmentation % % Execute the function in the command window: % Syntax: % % [t,pred,swc,xn,yn,zn]...
746d3be732f5b17cf607cdaf78a87506e8e301cde06d7dc75d43a7065161cdc2
MATLAB
5,303
152
close all; clear; clc; resultfname = 'testProcessSeizureEEGICAOnNormalizedHistogram.txt'; % parameters subject = {'Dog_1', 'Dog_2', 'Dog_3', 'Dog_4', 'Dog_5', 'Patient_1', 'Patient_2'}; ffs = 120; f0 = 60; % powerline frequency Hz Q = 60; % notch filter Q-factor % wlens = [1.0 3.0 10.0]; % energy window lengths in sec...
1e7b97f5c79b4fc24225c76136064e10f368f262770c5704cbe24ff3fd45a753
MATLAB
5,305
149
classdef ManualTest < matlab.unittest.TestCase %MANUALTEST Test manual UI properties hJRC; end properties (Dependent) hCfg; hClust; hCurate; end %% SETUP METHODS methods (TestClassSetup) function setupProps(obj) hCfg_ = jrclust.Config(ful...
64ad44766506b1a6a58c88da5d9481368def95c48ef1314458f17dc7b980d1dd
MATLAB
5,309
183
% A test of correlation dimension calculation % clear; close all; fs = 1000; data = load('s0010_re.txt'); % data = load('s0014lre.txt'); time = data(:,1)'; data = data(:,2:end)'; data = data - LPFilter(data,1.5/fs); data = LPFilter(data,150/fs); I = 1:2*fs; data = data(:,I); % data = randn(si...
c46c4682dff3374484867ade020481ceb436fff06da32857aae01e11ab769f13
MATLAB
5,309
161
%{ ---------------------------------------------------------------------------- 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...
d9ba30bddecbc1c1303017da0883b7808f244ae2c1517acadc1c653200141bc7
MATLAB
5,310
151
% Channel selection based on different methods (modified version 2.0) % The channel selection method tries to rank the components according to % their similarity to the maternal and fetal mixtures. Therefore, it % should give the noisy channels the lowest rank. % Notes: % 1- The first objective of this routine is ...
5913bb162b68a0cc682c649307b906787d6a2d9175403ecce0be48c4b32f0ee1
MATLAB
5,311
163
function mnl_CombineManualClassificationGroups %% Load in CSVs disp('Please load in all the csv files') [files]=uipickfiles; %Pre-allocate groups for bars Classes_Struct=struct('Thd',[],'DataMatrix',[], 'SingleCluster',[],'PartialCluster',[],'MultipleCluster',[], ... 'Single_n',[],'Single_pc',[],'Partial_n',[],'Par...
123e05b376d8fcd3b7f4582c86e9f6b09317458f01f1685b005d9c6ff2888a52
MATLAB
5,314
207
% Load NIFTI header extension after its header is loaded using load_nii_hdr. % % Usage: ext = load_nii_ext(filename) % % filename - NIFTI file name. % % Returned values: % % ext - Structure of NIFTI header extension, which includes num_ext, % and all the extended header sections in the header extension. % ...
2aaf0de673ffed4e1db3ef35ecc3cbae9bb61f30d7c61bb200ebed51f8db45eb
MATLAB
5,314
170
%% analyze time clear clc cd('I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\time of experiment') t = importdata("all_ints_data_with_time.mat"); %% %% t.Is_reponsive = cell2mat(t.Is_reponsive); t.Is_reponsive_and_IR = cell2mat(t.Is_reponsive_and_IR); % G1 = grpstats(t,"file_name","mean","DataVars",[...
b20e6e5ff05d303605124a8c541f3ff63e191a36a99d6a7c5278ab9dc3a9de78
MATLAB
5,314
200
% Statistical test for functional modularizations of a neural network. % % Reproduces the results shown in Fig. 5 discussed in the section "Inferring nested modularizations in neural networks" in % "Correlations reveal the hierarchical organization of networks with latent binary variables" (2023) Stefan Häusler % Runt...
37f77b1ced4c9d57b682d442742649735dcfe8375c68cff053767309f3676cb4
MATLAB
5,316
162
%{ ---------------------------------------------------------------------------- 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...
8a4bebafa3431653d7bf76367eeb12f9b1744411eb1ccd663f5c07169033492b
MATLAB
5,317
67
function Set_Plots_Menu(P) % set(P.GUI_Handles.Plots_Menu_Handles(:)); P.GUI_Handles.Plots_Menu_Handles = gobjects(1,60); H_Menu1_Length = uimenu(P.GUI_Handles.Menus(3),'Label','Length'); P.GUI_Handles.Plots_Menu_Handles(1) = uimenu(H_Menu1_Length,'Label','Neuronal Length per Menorah Order','Checked','on'); ...
5eda77005346d163c4363f7df218c80ce4aa97187f16f9e1cb68426b26c51f82
MATLAB
5,320
67
function Set_Plots_Menu(P) % set(P.GUI_Handles.Plots_Menu_Handles(:)); P.GUI_Handles.Plots_Menu_Handles = gobjects(1,60); H_Menu1_Length = uimenu(P.GUI_Handles.Menus(3),'Label','Length'); P.GUI_Handles.Plots_Menu_Handles(1) = uimenu(H_Menu1_Length,'Label','Neuronal Length per Menorah Order','Checked','on'); ...
a988045e4e84fea564fe8cde2bef3ffd2242da485b9be510bccbb45bdca18ea1
MATLAB
5,320
177
function controlfilename = createLCmodel_control_laser(metabname,l1,l2,l3,preproc_dir) do_water_scaling=1; doecc=0; simul=0; basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/First/basis_LASER_TE=65_CENIR.BASIS'; %basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/LASER/TE_65/basis_LASE...
b3414b1ad7d4eaea9b0e1146fa417cc9c7ec167d65bb5d09d0b87de7b28e5644
MATLAB
5,324
113
function [vcg, phi]= vcg_gen_stochastic(N, fs, f, f_deviations, alpha, delta_alpha, b, delta_b, theta, delta_theta, teta0) % vcg_gen_stochastic - Synthetic cardiac dipole/vectorcardiogram (VCG) generator with beat-wise stochastic deviations % % [vcg, phi]= vcg_gen_stochastic(N, fs, f, f_deviations, alpha, delta_alph...
688199afef8715cc86531086c24e9887649d8f4820d8165e59259f3eb5b74bb4
MATLAB
5,332
170
function x = EOGRemoval(eeg, eog, power_env_wlen, th, num_ch_den_per_itr, num_itr, adapt_reference, flagplot) % EOGRemoval has been deprecated. Use eog_canceller_nsca instead. warning('EOGRemoval has been deprecated. Use eog_canceller_nsca instead. Compare input arguments for compatibility.'); % % x = eog_canceller_ns...
ea2ed7eee63ba6d3e735790a26a19132a37a364fc691831f85bbab4e48be7d37
MATLAB
5,338
158
%{ ---------------------------------------------------------------------------- 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...
046cc8e2d19025e3a887deed231c9ed56e742c943e8c7c9d3f0b78298c53446c
MATLAB
5,343
95
function WindowApply20220316 global RtouchSpikeOnUnit LtouchSpikeOnUnit RtouchSpikeOffUnit LtouchSpikeOffUnit LtNegativeSpikeOffKaisuu RtNegativeSpikeOffKaisuu ... RtPositiveSpikeOffKaisuu LtPositiveSpikeOffKaisuu pegpatternum pegpatternname... LtPositiveFiringRate LtNegativeFiringRate RtPositiveFiringRat...
c1c7cc4e821425cec22480c81d56f2b9e88cab4fd9a069d7482d9cefa2021423
MATLAB
5,345
135
function RLphase190226 global ACresult ACresultW CCresultDrinkOn SpikeArray RpegTouchallWon LpegTouchallWon TurnMarkerTime ... RpNum LpNum OneTurnTime CCresultSpike locsP1time locsP2time locsP1time2 locsP2time2 pksA1 pksA2 CCresultRtouchWon CCresultLtouchWon dpath3 %%ƒ^ƒbƒ`‚Ì’†‰›’l‚Ì”z—ñ‚ðŽg‚Á‚½¶‰E‚ÌˆÊ‘Š‚ð...
07664db8be3131a68709bfe5d281bfb3ab43e370a4c272d3e6a33ea1ae70c230
MATLAB
5,351
207
function [p, table] = anova_rm(X, displayopt) % [p, table] = anova_rm(X, displayopt) % Single factor, repeated measures ANOVA. % % [p, table] = anova_rm(X, displayopt) performs a repeated measures ANOVA % for comparing the means of two or more columns (time) in one or more % samples(groups). Unbalanced ...
06eeb3dc113ad72a2233b422d28b434407007ca8da51fb9f804202a05f5c8146
MATLAB
5,352
93
function [Step_Routes,Step_Normalization] = Normalize_Rects_Values(im,Step_Parameters,Parameters1) if(Step_Parameters.Trial_Step_Index == 0) % If not in a trial or in the first step of a trial. % Create a sub-matrix: [XVb,YVb] = Get_Rect_Vector(Step_Parameters.Step_Coordinates,Step_Parameters.Previous_Angle,3...
6e512ba7c6b741926e6188491a054107099b48bdf1565e7efeeed2c60fbf6188
MATLAB
5,352
220
function par = set_parameters() % LOAD PARAMS par.segments_length = 5; % length (in minutes) of segments in which the data is cutted (default 5min). par.sr = 10000; % sampling rate (in Hz). This parameter will be only used if the data file don't have a sr. % PLOTTING PARAMETER...
1639fd42349b0b9a52d9b860bce3593ca42b57ebfe0a559c5188f665169958cf
MATLAB
5,357
170
%Solve for the conc/copies of dynamin pre and post stimulation. %Read in a vector of 8 parameters, that were solved for using the Python %genetic algorithms: %read in optimal parameters, assign to values %INPUTS: (these are the first 8 values printed in optFitParms_prePost.txt %files). % kfDRC=parmVector8(1); % Rdilute...
512bad29f40f26cc64ece65334c3a24c7ce99ed8b0424f081c6217bfff108cfb
MATLAB
5,360
329
A1=rgb2gray(A); I_filter = im2double (A); sigma = 0.2; %default parameters hsize_r = 3; hsize_c = 3; imageycbcr = rgb2ycbcr (I_filter); lum = imageycbcr (:, :, 1); im_gaus = filter2 (fspecial ('gaussian', [hsize_r hsize_c] , sigma), lum); imageycbcr (:, :, 1) = im_gaus; image_rgb = ycbcr2rgb (imageycbcr); % ...
fed8845474b31a8a12578af37de6add9de622e01b375e6b07c243c67c14bbfb2
MATLAB
5,361
209
function [spikeMatrix, peak_idxs, peakTimes_ms, classes, peak_vals, dip1, dip2 ]=comBIN(aaa,data,sr,spk_pos,NBINS_peak,NBINS_dip,NBINS_dip2,npointsbeforepeak,npointsafterpeak) %comBIN(spks,data,sr,1,1,1) if nargin<8 npointsbeforepeak=2...
903372e04fbd7702976fb262cf203fa050560ce52722593c34dca0825b1263d6
MATLAB
5,366
124
function AnalyzeResults13_SpectralFeaturesFunction(outputfileame1, outputfileame2, per_subject, ntrees) close all; % % parameters % % % % logfileame = 'SVMOptimizedParamters03.txt'; % outputfileame1 = 'Submission55.csv'; % outputfileame2 = 'Submission55_unbiased.csv'; % % % bins = [50 75 100 120 180 250 300 500 750];%7...
14dfa236a60b180d9d1e12b07ef57f0c77f4fac8913862aa5b79158872d8ebcf
MATLAB
5,374
105
function [FinalIm,ConInc,FinalCompLevel,err1,datestamp] = IncompleteLetterFineFun(ImWidth,ImBorder,PropComp,CheckSize,WhichLetter); % LetterIm = IncompleteLetterFineFun(ImWidth,ImBorder,PropComp,CheckSize,WhichLetter); % % needs inputs of ImWidth (image width in pixels), ImBorder (gap between letter and image boundarie...
51c2cf388b968a3bf5fde258517c63e9bdaf7278a3a160e16bf418406ceccecb
MATLAB
5,374
135
% Analyze classifier activaitons on heldout localizer data - this is used % to pick a l1 penalty and make some classifier performance plots. % Enter path of MEG_Decision_Study folder study_folder = '/Users/erussek/Dropbox/MEG_Decision_Study_WC'; % Path to localizer activations group_struc_folder = fullfile(study_fold...
4eff07b3e96d6701e5e7e5e23a9a652d6f9439c2704bace73d6dc556a0a31b59
MATLAB
5,376
153
%% Read Data ############################################################## % X & Y From Multiple Feature Tables function [X,Y,NamesFeatures,folder_name,MatFileName,EXPIDs]=makedatatable() X=[]; % Features: Observations x Features Yall=[]; % Labels Y=[]; % Labels readOK = true; Dirpwd=pwd; slashesindx=find(Dirpwd=='\')...
c883591b93cb4da15b0bb26439ec498fb212651622dc203db8a9487c4a330157
MATLAB
5,380
225
function par = set_parameters() % LOAD PARAMS par.segments_length = 5; % length (in minutes) of segments in which the data is cutted (default 5min). par.sr = 10000; % sampling rate (in Hz). This parameter will be only used if the data file don't have a sr. % PLOTTING PARAMETER...
b08e157ddcc65e8d0a6f31b1bfe2c107edd9df5cb22bfdd743017f46ec7c0f6a
MATLAB
5,383
105
function [FinalIm,ConInc,FinalCompLevel,err1,datestamp] = IncompleteLetterFineFitFun(ImWidth,ImBorder,PropComp,CheckSize,WhichLetter); % LetterIm = IncompleteLetterFineFitFun(ImWidth,ImBorder,PropComp,CheckSize,WhichLetter); % % needs inputs of ImWidth (image width in pixels), ImBorder (gap between letter and image bou...
acc8e71b01c1085145571d6b9c2c6a2bc8fec3f71f441b98f96866e1b7294a16
MATLAB
5,384
175
function [err, sn, kernel] = nufft1_error(om, N1, J1, K1, kernel, sn) %function [err, sn, kernel] = nufft1_error(om, N1, J1, K1, kernel, sn) %| %| Compute worst-case error for each input frequency for 1D NUFFT %| using specified (inline) `ad hoc' kernel function (e.g., gaussian). %| This is worst-case for a unit-norm ...
cf1c43a4d503abe4c46701d1cef09e9d8092f09628447d4a00387dcbf5410a5e
MATLAB
5,388
125
% % Test program for generating synthetic multichannel ECGs with beat-wise deviations and additive noise % % Open Source ECG Toolbox, version 2.0, April 2008 % Released under the GNU General Public License % Copyright (C) 2008 Reza Sameni % Sharif University of Technology, Tehran, Iran -- GIPSA-Lab, Grenoble, Fr...
de83971f908cfc369e22c1d0367919e1e721bd1489157cea0b2e7c47206586cc
MATLAB
5,388
165
function [FinalClusters,FinalClusterIDs,NumTraceLim,MinDendriteLength,InitialClusterNum,Y]=mnl_EuclideanCrawler_Mag_Weighted_v3(Trace,EuThresh,dim,FigureDisplay,Y,MinPoints,MinLength) %Function to create clusters based on the Euclidean Distances weighted by %the norm mean magnitude of each trace. v2 has an improved plo...
9dd504927e091f2c43df0f3d1a600a73e6fad7c4dd8a98f12b7b8cf2dba09a5b
MATLAB
5,389
181
function varargout = PostDimReduceSingleDim(varargin) % SingleDim displays all trajectories versus time for single dimensions % As shown in Yu et. al (2009) with 15 dimensions % % Copyright Benjamin Cowley, Matthew Kaufman, Zachary Butler, Byron Yu, 2012-2013 % ---GNU General Public License Copyright--- % This file i...
9a5b96facefd8a848c6de12ae16fe57ef2cdcdd27cafc04d54f0890f2a774a6f
MATLAB
5,393
233
function par = set_parameters() % LOAD PARAMS par.segments_length = 5; % length (in minutes) of segments in which the data is cutted (default 5min). par.sr = 10000; % sampling rate (in Hz). This parameter will be only used if the data file don't have a sr. % PLOTTING PARAMETER...
e6571e17d2558f8695dd83cd83d9afb71d532da442c87ce701bd686fbff3d359
MATLAB
5,393
166
function [r_course,r_outliers] = spmup_volumecorr(varargin) % compute the Pearson correlation between volumes of the time series % and return possible outliers among correlated volumes (this assumes of % course that r is not biased by outlying voxels between volumes) % % FORMAT [r_course, outliers] = spmup_volumecorr...
c9fbe51b600467328e22faceb87f067884bf76fd6b55141c1c092918fd3777fb
MATLAB
5,398
148
function W4_Pattern_5_20201208 path=['C:\Users\C238\Desktop\touchcellLtRt_Hirokane']; cd(path); LS=ls; LtWFRUnit=[]; RtWFRUnit=[]; LtW1234Point=0; LtW1234Fire=0; LtW2345Point=0; LtW2345Fire=0; LtW1235Point=0; LtW1235Fire=0; LtW1245Point=0; LtW1245Fire=0; LtW1345Point=0; LtW1345Fire=0; RtW1234Point=0; ...
db4d8ea37845adb6e58dce9d6116551190003f6ab7670351258027e9e8e04f99
MATLAB
5,399
148
function W4_Pattern_5_20200302 path=['C:\Users\C238\Desktop\touchcellLtRt_terashita']; cd(path); LS=ls; LtWFRUnit=[]; RtWFRUnit=[]; LtW1234Point=0; LtW1234Fire=0; LtW2345Point=0; LtW2345Fire=0; LtW1235Point=0; LtW1235Fire=0; LtW1245Point=0; LtW1245Fire=0; LtW1345Point=0; LtW1345Fire=0; RtW1234Point=0;...
ae36ecbcdd5dcdc457f5e0d09eab031b0a07e34c8d9a77856fe674455051e0f9
MATLAB
5,405
193
% test fetal ECG morphology extraction by the deflation algorithm and double KF for fetal denoising % Copyright Reza Sameni, 2018 % Created 2008 % Modified June 2018 % % Modified Oct 2020: % ECGBeatFitter replaced with new function call format clear; close all; load('FOETAL_ECG.dat'); data = FOETAL_ECG(:...
08d385813e242e4a11168d605e97b2d2edfd452dcd7874883eaae0f67cca285f
MATLAB
5,406
145
function corrData = plotAuxCorr(hClust, selected) %PLOTAUXCORR Plot aux channel correlation with firing rates figure if nargin < 2 selected = []; end hCfg = hClust.hCfg; % load aux channel data [auxSamples, auxTimes] = loadAuxChannel(hCfg); if isempty(auxSamples) corrData = ...
27847c8247aa4233604ee85621a55978d10c1ef384bb486df0c0e9f377d9de0f
MATLAB
5,408
192
function [] = fmodel(session, channel, unit) % Approximates the fitted S-kernels with Gaussian functions % % Parameters % ---------- % - session: scalar % Session number with format: yymmdd % - channel: scalar % Channel number fprintf('===== F-Model =====\n\n'); main_timer = tic(); info = get_info();...
559532f98c9934bb8b35046fb6bb0e672881e5156f1a441b28cf108d75915c81
MATLAB
5,412
187
% % % 1. Extraction of 5HT receptors % 2. Visualization of the expression % % by Hiro Taiyo Hamada, 2020/12/17 % 1. extraction of 5HT receptors niftidirect = '/Volumes/HD-ADU3/tphskk/analysis_programs/optofMRIAnalysis/5HTR'; niftiList = makeList(niftidirect, '*.nii'); template = '/Volumes/HD-ADU3/tphskk/analysis_pro...
88a6d5da670f84f06c0caa1b85e8afaf91bcc4f44e5a4a64630c86aee8e69725
MATLAB
5,412
121
%% Calcium Imaging Analysis Operator (get active pocktes) % CIAO_02e_activeROI allows you to identify active pockets based on a % global image threshold using Otsu's method. We determine a threshold and % create a corresponding mask for each stimulus. % We assume that there is a 03_Data_Processed folder within the main...
a08a32f297dada357a43009c7437e444dc5359229c02833478cc4ca7da0268f4
MATLAB
5,420
135
function extract_ecg_features( input_path, output_path, opts) % function extract_ecg_features(input_path, output_path, opts) % % Inputs: % input_path (string or char): Path to the folder containing input ECG signals (WFDB format) % output_path (string or char): Path to save the extracted feature output (.csv file...