sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
116ee8d526b7b0cd6214712057ce80d41c102c4088f3031861e66e52ef7d0590
MATLAB
5,805
147
function plot_PT_met_model_ind(... AX,... temps_PT,... temps_met,... PT_size,... met_burden,... resection_time,... min_size,... max_size,... max_time,... flag_plot_met_distrib,... t_ther,... file) font = 18; if ~exist('max_size', 'var') max_size = 1e10; end colors...
b7a6811d903f1f77da3c9e572dcdf0d9c3851b2fa5d41c81fc7e6475e89f1957
MATLAB
5,806
190
% Sample fetal-maternal ECG generator clc clear; close all; rand('seed',0); randn('seed',1); fs = 400; N = 4000; dim1 = 8; SIR = -30; SNR = -20; SNR2 = 5; beta = 2; w_bw = 1; % weight of baseline wander noise in the generated noise (for noisetype = 5) w_em = 1; % weight of electrode ...
1d2e7fae03faee5ee7addeb54b4e20fd9731644e1c6c9d6f9c0204b52948f303
MATLAB
5,808
128
gwfparams.dataDir = 'path'; % KiloSort/Phy output folder gwfparams.fileName = 'temp_wh.dat'; % .dat file containing the raw gwfparams.dataType = 'int16'; % Data type of .dat file (this should be BP filtered) gwfparams.nCh = 32; % Number of channels that were streamed to...
ba99bd25e7c4e1cd25b812bf979724723ac33935b49e118ec840d650c4b34edb
MATLAB
5,815
141
function [h, H2] = equalizer_filter_design(Sx, Sy, params) %EQUALIZER_FILTER_DESIGN Design a frequency-domain equalizer from power spectra. % % Syntax: % [h, H2] = equalizer_filter_design(Sx, Sy) % [h, H2] = equalizer_filter_design(Sx, Sy, params) % % Description: % This function designs an equali...
c162b69b11934b8ab3818959dca11e59882bf8714261e60c0aa910cb3c43c02d
MATLAB
5,820
167
%% before_laser_baseline clear clc cd('E:\2023 - ledramp\eopn3\all_psth_T_files') [file, path] = uigetfile('all_psth_table.mat','MultiSelect','on');%select all_psth_table cd(path) %% T = table; for i = 1:length(file) load(file{i}) files_data = readtable([file{i}(1:end-4) '.csv']); all_psthT.i...
00bf23cb8fa92f9451befc14b83da1c3f5cf6e005c5b93d94d578f14d8d76ff4
MATLAB
5,821
176
% run_retroMoCoDemo_FatNavRecon.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Load in some example FatNav data from a real experiment (2mm resolution, % 4x4 GRAPPA acceleration) and do the reconstruction % % Can be used to get a feeling for the process i...
9c31434b20e26aa739096e686fa0b378641b1218ecc3405a9649519de0df6595
MATLAB
5,822
164
%% analize DTA cd('I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\DTA\all_ints_data') DTA = importdata('all_ints_data_DTA.mat'); C57 = importdata('all_ints_data_C57(all_cells).mat'); CONTROL = importdata('all_ints_data_control(mcherry).mat'); %% add tags DTA.tag = repmat({'DTA'}, size(DTA, 1), 1); ...
0c94e75581ae43f081c5941f43851fa317ef886b37bdbbbcb4ea6a9edee95b07
MATLAB
5,827
121
function [coher_achda, phase_achda, t, f, coher_shuff, phase_shuff] = AK_coherFP(beh, varargin) %Compute coherogram between ACh and DA photometry signals acquired during %dual color photometry recordings using Buzsaki function 'MTCoherogram' % % [coher_achda, phase_achda, t, f] = AK_coherFP(beh) % [coher_achda...
591243c6e405ab1251fd0af60aea30f1b3578757e621d5df989af3834b88162e
MATLAB
5,829
166
clear p = params_2DAA; fpath = fullfile(p.processed_data_dir,'allData.mat'); load(fpath,'evs','tis','bvs','traces') [cols,alpha] = chooseColors; %% run DR and decoding procedure for different trial samples fpath = fullfile(p.data_dir,'tone_decoding_per_sub'); saveData = 1; saveFigs = 1; n_rep = 20; % ~80 sec. per rep ...
ccc4a1d3b7150d2b6899ddc0d0edd333542d98236d7a96d146f50500b2f8e6ae
MATLAB
5,832
185
function [data json] = parse_json(json) % [DATA JSON] = PARSE_JSON(json) % This function parses a JSON string and returns a cell array with the % parsed data. JSON objects are converted to structures and JSON arrays are % converted to cell arrays. % % Example: % google_search = 'http://ajax.googleapis.com/ajax/s...
eae8cf320f506a76e1de4c5568ac5d6e7ac99802ec53a131a9d25a060f0c8312
MATLAB
5,840
221
% Z:\ephys_ntsr1\convnet_nosetracking %% make training set %load('C:\Users\jvoigts\Dropbox\wh_tracking\convnet_nosetracking\trainingset2.mat'); train_dir='Z:\ephys_ntsr1\convnet_whtracking\training_jvs'; tset=[]; tset.in=[]; tset.out=[]; c=0; locations_pos=[]; locations_neg=[]; for i=[1 4 6] c=c+1; I = i...
42a9130295c466cdb13ede86ffb7a48b07a5b401c3f371783b115291967df1c4
MATLAB
5,847
146
function [phase_avg, freq_avg, amp_avg] = Phase_Ex_TFP(x1, fs, varargin) % % [phase_avg, freq_avg, amp_avg] = Phase_Ex_TFP(x1, fs) % [phase_avg, freq_avg, amp_avg] = Phase_Ex_TFP(x1, fs, f0, bw_base, f0_dev, bw_base_dev, dither_std, pertnum) % % ************************************************************************...
cfe99b5bcf5973531788a7d0322fe61655671caeb9e76d2b949a3c50706efad8
MATLAB
5,865
137
% test baseline wander removal by periodicity maximization % Status: UNDER TEST % Reza Sameni, 2023 clear; close all; % load patient165_s0323lre; data = data(1:25000, 2)'; fs = 1000; load SampleECG128Hz; data = y(:, 3)' ; fs = 128; % data = data - lp_filter_zero_phase(data, 0.05/fs); data_hp = data - lp_filter_zero...
7f34677733747e4cdcf1b30afd7a9e419c55cdb369546957f1ba2b9ba09b5465
MATLAB
5,866
196
function spmup_plotqc(tablein,fighandle) % routine to plot data with non parametric kernel density % % FORMAT spmup_plotqc(tablein,fighandle) % % INPUT tablein is a matlab 'table' i.e. a matrix with properties such as labels % figurehandle should be either 'new' (default) or 'current' to either % creat...
3c97accc66ce79c1e8f36a1f91b5b8392fc7e25ec743c2abaa83e521c9980b72
MATLAB
5,868
180
function [BadChannels,SampleBkg,SampleVx]=mnl_FilterChannels_Somas(Somas,Data,Scale) % Function to automatically filter out the bad channels % % Inputs % Trace - the Structured Trace extracted from "mnl_ReadXML_BranchesSeperately_WhileLoop" % Scale - the Scale of the image % Data - the chromatically corrected image ...
9fc4ef696309505042b4cf30b6c933b501027e7152ddfdf82384b5d207e2f53c
MATLAB
5,869
179
% This function the Eikonal equation by using the Fast Marching algorithm % of Sethian. % T: arival time map % D: distance map % Max_Known_Dist: distance at which to exit % SVr: seed positions % unisotropy: wave speed unisotropy in a uniform intensity image % debug_plots: set to true only if working with 2d ima...
436667583e48010b1e0e56640d7a74bacb325d8a664237213ea5999e88815ab6
MATLAB
5,871
263
function ob = fatrix2_vertcat(blocks, varargin) %function ob = fatrix2_vertcat(blocks, [options]) %| vertcat: B = [A1; A2; ...] %| %| in %| blocks {cell} cell array of the (fatrix2) blocks %| %| option %| 'dim_cat' dimension along which to concatenate odims %| all other odims must match %| default is ndim+1 if *al...
b04bc20fe71f56300f394ac9a80afd1560f0050085d079e70012d56419110f8e
MATLAB
5,883
155
%% HPC for large amount of IC tests. Start from NESS % BlockID 1,2,5 % SaveID Just for saving tag function [] = HPCGlobConvTest2_RAND(BlockID, NSample) CurrentFolder = pwd %FigurePath = [CurrentFolder '/Figures/Demo022722/']; addpath(CurrentFolder) addpath([CurrentFolder '/Utils']) addpath([CurrentFolder '/Data']) Sav...
e00ae8370d0145d0dffa7e7a1eba1330d1d6e04f2b77eab7a3702f2508774798
MATLAB
5,888
216
%% [cols,alpha] = chooseColors; t_cols = {}; this_cmap = winter; t_cols{1} = 'k'; t_cols{2} = [1 0.5 0]; t_cols{3} = this_cmap(64,:); %% plot subject VE figure('Position',[100 100 300 300]) hold on this_cols = {t_cols{1},t_cols{2},t_cols{3}}; all_ves = cat(3,subject_ves{:}); sample_mean = mean(cat(3,subject_ves{:}...
fa5f47c13f65d05fe04f22910bd0985b02ae562f58eadb472de2e8024095ec4e
MATLAB
5,895
227
clear;clc;close all; addpath('eeglab2023.0'); addpath('Sleepscoring'); %% EEG = pop_loadset(); % EEG_hydro = EEG(1); EEG_std = EEG(2); %% events_hydro = []; events_std = []; % hydro SWS for i = 1: length(EEG_hydro.event) event = convertCharsToStrings(EEG_hydro.event(i).type); eve...
8043d5bed313ed81d3493cc1614d56230670480ee7d56e1138afd78d1b8abb91
MATLAB
5,898
128
%% clear close all close(findall(groot, "Type", "figure")); path(pathdef); addpath( genpath( 'Source' ) ) filenameData = 'DataCalculated/PreparedData/DataSonoNERF_Training_UALogo_test'; load( filenameData) fnSave = [ 'DataCalculated/TrainedSonoNERFs/sonoNerfTrained - UALogo....
087b6be68fd4c2e4c2ed8daba765082db07d42e4a6e14f9544cd4d75a3d328f4
MATLAB
5,910
184
function hAxes = dscatter(X,Y, varargin) % DSCATTER creates a scatter plot coloured by density. % % DSCATTER(X,Y) creates a scatterplot of X and Y at the locations % specified by the vectors X and Y (which must be the same size), colored % by the density of the points. % % DSCATTER(...,'MARKER',M) allows you to...
0a7f050afb75f83bcf312c9dfa3cad42f8bcb7185a1e7d12c0cea7d8cbb10f87
MATLAB
5,913
201
clear close all clc load ECG2 s = data(4, 1:end); smoothingwlen1 = 3; smoothingwlen2 = 3; smoothingwlen3 = 3; wlen1 = 15e-3; wlen2 = 15e-3; wlen3 = 15e-3; p1 = 4; % spline order p2 = 4; % spline order p3 = 4; % spline order snr = 25; % dB s = s - LPFilter(s, 0.1/fs); nvar = var(s)/10^(snr/10); x = s + sqrt(nvar)*r...
0b2d36100dbad060cd15a2fea2755293bb014dd9265fd15115ec6c90f2b234fa
MATLAB
5,914
196
function CCFourier20200219 global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon CCFourierLtUnit=[]; CCFourierRtUnit=[]; % %SpikeArray‚ÅLPegTouchAllARpegTouchall‚ðƒAƒ‰ƒCƒ“‚µ‚½ƒNƒƒXƒRƒŠƒIƒOƒ‰ƒ€ % %SpikeArray‚ÅLPegTouchAll‚ðƒAƒ‰ƒCƒ“‚·‚é % duration=5000; % CrossCoL=[]; % Cr...
4f0ec341f5e932434f30080195f908daf73f7c345c9e8a33d029febd472eafdd
MATLAB
5,915
123
function [align,time,events,fig,sp] = plot_fp2fp(beh,varargin) %Align one photometry signal to peaks of another photometry signal and plot average trace % % plot_fp2fp(beh) % [align,time,events] = plot_fp2fp(beh) % [align,time,events,fig,sp] = plot_fp2fp(beh) % [align,time,events,fig,sp] = plot_fp2fp(beh,...
7e04473f22bab5f31165555ea06c57216a60f089be4a1c4934bbe2cfbe8a93c0
MATLAB
5,917
161
function calculate_IE_fun(file, path) if ~exist("file", 'var') [file, path] = uigetfile('*.mat','MultiSelect','on'); end cd(path) datafile = fullfile(path, file); ploting1 = 0; continut2premuation = 0; %ploting2 = 0; windows = {31:38, 55:129, 130:140}; %windows for calculating the response time - on, sustaneid a...
283435924b98b7ebaac271e78d0ee4fbc2c45967fb96d52441bff57983f787b3
MATLAB
5,919
152
% Test program for fetal ECG cancellation using EKF and EKS % % Dependencies: The baseline wander and ECG filtering toolboxes of the Open Source ECG Toolbox % % Sample code for testing naive maternal template subtraction technique % % Reza Sameni (C) % Email: rsameni@shirazu.ac.ir % Web: www.sameni.info % % Crated 2007...
07858c1a9ce2b113791332642cb6a8aaeceffe974d7f29ff176df967317e06cb
MATLAB
5,936
139
%% Init: clear close all clc path(pathdef); addpath( genpath( 'Source' ) ) addpath( genpath( 'SonoTraceLab' ) ) rng(42) %% Load the surface and prepare the surface normals nFreqsSim = 14; structMeshPreparation = struct(); structMeshPreparation.orientation = [ 0 0 0]; ...
91dfa8a4b165d590f28c1e7d2e23dd1680aba3026502d56395238315ddda7d95
MATLAB
5,939
216
close all; clear; clc; % parameters subject1 = 'Dog_4'; subject2 = 'Dog_4'; tri = 28; number1 = tri; number2 = tri; path1 = ['E:\Sameni\Projects\Seizure\' subject1 '\']; path2 = ['E:\Sameni\Projects\Seizure\' subject2 '\']; mode1 = 'interictal'; mode2 = 'preictal'; SpectralWinLen = 5.0; % in seconds SpectralOverlapPer...
b82dca8e8742f149cd55f988af5473e26ce8e00c80c6e0458d42a9a51f445514
MATLAB
5,944
197
%% Analyse PSTH metrics by speed %% onset and offset features by speed plotFlag=false; for ispeed = 1:6 %%%%%%%%%%%% onset features %%%%%%%%% statVals = stat.onsetCharVec(statGoodVals & stat.speedVec==ispeed); runVals = run.onsetCharVec(runGoodVals & run.speedVec==ispeed); statSessions = stat.session(statGoodVals ...
7862238487f3b5b35b977f0079a22321dc1fe74eb0ad2c7bc5037786cc0b5fea
MATLAB
5,964
153
function corre_report(app) [int_idxs,~] = listdlg('PromptString',{'Please select intervals ',... 'to be plotted/saved.',''},... 'SelectionMode','multiple','ListString',app.popup_int_spect.Items); [form_idxs,~] = listdlg('PromptString',{'Please select fileformat ',... ''},... 'SelectionMode','multiple...
d1b57d176b159e2e0669c88c7e08286f622c562ea6f627c40aca1a0869d113df
MATLAB
5,966
127
function eCE = CondEn( x, delay, order, windowSize ) % CondEn.m efficiently [UK13] calculates values conditional entropy of ordinal patterns [UK14] % in sliding windows % INPUT % - x - time series % - delay - delay between points in ordinal patterns (delay = 1 means successive points) % - order - order of ordi...
4e5628cd35d0afbfb1d1aa6f3bace5b28ba30807ba7dbc6ad81f0f2723170d4d
MATLAB
5,967
178
% incorporate subject index in classification clear close all; clc; R1 = importdata('/Users/rsameni/Desktop/Seizure/kaggle/SourcesWithResultsBackup/testFreqDomainEnergyIncreaseRate01.txt'); R2 = importdata('/Users/rsameni/Desktop/Seizure/kaggle/SourcesWithResultsBackup/testICASubspaceAngles01.txt'); R3 = importdata('...
52ace3ae4ea75c6d561d95fe1861acda8e489b4a6f80d09ac5e56ccd3ebcce49
MATLAB
5,968
172
% Use like: h = rm_raincloud(data, colours, plot_top_to_bottom, density_type, bandwidth) % Where 'data' is an M x N cell array of N data series and M measurements % And 'colours' is an N x 3 array defining the colour to plot each data series % plot_top_to_bottom: Default plots left-to-right, set to 1 to rotate. % densi...
3e271b6c969f0d51c2119ba0cd756ff9a95b19620c6c30b1f20c14d041fa8993
MATLAB
5,972
133
function Worm_Axes = Find_Worm_Longitudinal_Axis(Data,Plot1,Ax) % TODO: use scale-bar: Scale_Factor = Data.Info.Experiment(1).Scale_Factor; Initial_Radius = 120; % 60 ./ Scale_Factor; Mask_Size = 100; % This functions uses a higher level perspective (the entire neuron) to detect the longitudinal axis of the wo...
1cb0b9ef3ad6dfb06e5190d03085923548e640cf91770fdd201a9c42c0a05a93
MATLAB
5,974
157
%No. Label Name: R G B A %% RIGHT SIDE first clear full_cell snp=12; id=[1:180]'; tstat_roi=SNP_Cardio_int_beta(:,snp)./SNP_Cardio_int_SE(:,snp); id=[1:180]'; tstat_roi=tmp2.Estimate./tmp2.SE; %snp=strcmp(snps.Properties.VariableNames,'rs7575796_A'); %tstat_roi=SNP_Dep_int_beta(:,snp)./SNP_Dep_int_SE(:,...
a97e15882dc659ff6b6a2ea3e9507b961e15bc5c0d54343f9304daede225c70c
MATLAB
5,975
175
function res = detect(obj) %DETECT Detect spikes in all recordings tDetect = tic(); % get manually-set spike thresholds if ~isempty(obj.hCfg.threshFile) try S = load(obj.hCfg.threshFile); siteThresh = S.siteThresh; obj.hCfg.updateLog('loadThresh', sprintf('Lo...
0e0996ea65e24a504c1d26770b19c39b0c9f67ef6f74ca28b69acfc5de116baf
MATLAB
5,979
183
close all clc clear % results = importdata('J:\ECGData\PTB\AllDataSmootherResultsPTB06_ComparisonWithWavelet2_Backup.txt'); fs = 1000; % results = importdata('J:\ECGData\Arrhythmia\AllDataSmootherResultsArrhythmia06_ComparisonWithWavelet2_Backup.txt'); fs = 360; results = importdata('J:\ECGData\Normal\AllDataSmootherRe...
a7321dd1badb93350a6f3765792a8d4ec9c01d791d82ff28bfbd137a070a23d1
MATLAB
5,980
156
function [d, tmpOut] = fsaverage2fsLR(f, hemi, d, pths) % Resamples data from fsaverage to fs_LR space. % % This function converts surface data from the fsaverage surface space (used in FreeSurfer) % to the fs_LR surface space (used in the Human Connectome Project). It supports both % metric and label data resampling u...
b2dfcd3d0cc18433cff69bdeea403e4fcbe469599d5700ec9afe9aa79eeffdf5
MATLAB
5,980
118
% report all wavelet level results clear; close all; clc; addpath 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES' randn('seed', 0); rand('seed', 0); % % % dbstop if warning type = {'PTB'};%%%{'Normal', 'Arrhythmia', 'PTB'}; for ttp = 1 : length(type), switch(type{ttp}) case 'Normal'...
d822919cc0cbcf30dd0e51f89789001232dbf046ae9f2e24fef5f95acc5a081f
MATLAB
5,991
136
function sfs = spmup_sfs(fmridata,TR,csf,roi) % computes the Signal Fluctuation Sensitivity metric % DeDora et 2016 <http://journal.frontiersin.org/article/10.3389/fnins.2016.00180/full> % % FORMAT: SFS = spmup_sfs(fmridata,TR,csf) % SFS = spmup_sfs(fmridata,TR,csf,roi) % % INPUT: fmridata is the name of the t...
084a82bb8182bf75af827c52e8f73221d29f9af50b008beaa55de062a7ea61e2
MATLAB
5,993
124
% compare with this paper: % S. Krishnan and C. Seelamantula, “On the selection of optimum savitzky-golay filters,” Signal Processing, IEEE Transactions on, vol. 61, no. 2, pp. 380–391, Jan 2013. clear; close all; clc; addpath 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES' randn('seed', 0); rand...
f05acc91ff0e8b3aee34ab69a2eef6710fe4c8c1e21fefd1944e6325012e4f7c
MATLAB
5,995
156
% gets the data showing the probability of eyesclosed over time for each % trial outcome type. clear clc close all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Parameters OnlyClosestStimuli = false; % only use closest trials Parameters = analysisParameters(); Paths = Parameters.Pa...
0cf31e2f1474f9942255142e8007fdbe8c550687b7ff82cab17218688e1f4144
MATLAB
5,998
196
% this script calculates FWF in GM ROIs extracted using the atlas % normalized to the subject's space clc clearvars close all addpath(genpath('/storage/stella/MATLAB_toolboxes/')); addpath('/storage/stella/Analysis/matlab_scripts/'); addpath('/storage/stella/Analysis/DTI_FreeWaterFraction_May2022/SCRIPTS_MATLAB/'); lo...
0c083b424c57f7dea4c6dac0aa68e01f478cb03d9b35fc90cc78ead02b43ea04
MATLAB
6,001
136
function [Data,Overwrite_Axes] = Add_Features_To_All_Workspaces(Data,P,Overwrite_Axes) Scale_Factor = Data.Info.Experiment(1).Scale_Factor; Data.Parameters = Parameters_Func(Scale_Factor); if(~isempty(Data.Vertices) && ~isempty(Data.Segments)) for s=1:numel(Data.Segments) % For each segment. if(~isemp...
5a110d3f2cbfe4eb76aecae258e911827afc2e119f63f61c4d1964504a48700c
MATLAB
6,005
175
function fig2_connectivity(folder, save) %% Figure 2: General connectivity % Subplots/information: % - Ipsilateral projections dominate connectivity % - Total in/output per node for ipsi/contra hemispheres % - Average projection density between brain regions and hemispheres % - Projection density vs euclidean distance ...
59f2785eb0dce07dae9a218c172a47027331a87c88a38a2e92626473586c7ce4
MATLAB
6,006
166
% % Test program for mean ECG extraction. % % By: % Reza Sameni, September 2006 % LIS-INPG, Grenoble, France - Sharif University of Technology, Tehran, Iran % reza.sameni@gmail.com clc clear close all; load('SampleECG2.mat'); data = data(1:15000,8)'; fs = 1000; t = [0:length(data)-1]/fs; f = 1; ...
1c0a7198c129386fc0021dfd2272ad9386f0b2a5e232b0b997eae441e81b0001
MATLAB
6,007
141
% Example end-to-end pipeline of extracting data, preprocessing, % feature extraction and spatial perturbation. The first part of the script % reads in five minutes of MNI SEEG data that was downsampled to 200Hz due % to file size limitations. The data is notch filtered, and the Janca % detector [1] is used to de...
c0ec55b3d95220f51e8e0fc409bc80a897ff7a548764c8120b8522202296b6e9
MATLAB
6,008
110
function [Cor_Cond1, Cor_Cond2, Cor_Inter, ... % Correctness of decoding DoP_Cond1, DoP_Cond2, DoP_Inter] = ... % Degree of Proximity dPCA_classification(Xtrial, loop, numOfTrials, numCompsToUse, options, dim, params) % dim: Channels x Cond1 x Cond2 x Time % Data reconstruction XtrainFull ...
305a7acfa25e845ef35688e5e48982d00b09901257013ec718bd950346cec5f7
MATLAB
6,019
193
% % Test program for generating synthetic multichannel maternal/fetal ECGs % mixtures with additive colored noise % % Dependencies: The synthetic ECG generator and noise generator package of % the Open Source ECG Toolbox % % Open Source ECG Toolbox, version 2.0, December 2008 % Released under the GNU General ...
ea370d405abe26669c3c0c64df26aeb3e16bf60cfe74182e37ed5e232a782a2f
MATLAB
6,026
153
% run_retroMoCoDemo_NUFFT.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Demo of the NUFFT operation to peform retrospective motion-correction on % real example 3D datasets. % %%% The data for this demo can be downloaded from: % 1mm data: https://bit.ly/retroData_2(32 MB) % 600 um data: https://bit.ly/retroData_3 (...
cea71a1de2cbf2e16cfa45416730c26bffc2781285ae0d8afae178762db4c18f
MATLAB
6,036
136
% This program is intended to extract % % % Figure 2, Supplementary Figure S5, S6. % % % by Hiro Taiyo Hamada, Araya Inc. clear all; close all; addpath(fullfile(pwd, '/programs')) % session1 datapath = fullfile(pwd, '/data/session1'); listing_tph = makeList(datapath, '*TPH*'); listing_cont = makeList(datapath, '*...
a12ba2262be2fd562e38ca6cff1228449e0beb8b585a025752ae73f1b7dc4021
MATLAB
6,048
190
clear; clc; close all; rng('default') assert(~isempty(strfind(pwd, 'embanded/examples/matlab')), 'Please change folder to the examples directory') run(strrep(pwd,'examples/matlab','setup.m')) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Simulate envelope and EEG data and fit a 'decodin...
2dbba821281c2ef1637e9a96b03478ba276857190cefda38bf93f696d74c2333
MATLAB
6,051
139
%Results will vary slightly in different executions, mostly consistent clear all; tic clc; close all; fcount = 1; od=xlsread('por_data.xlsx','Sheet1','G1:G22'); od([1,8,20,22])=[]; load('nmrdata.mat') nmr = nmr'; fnames = {'two_oct','hex','iaa','hxa','two_hep','ani',... 'msal','chex','apin','lcar','e...
7d291c6f62306b8d70017ed5f4274c13d5ee9decb9aea2403ed3f67f0c2d79c8
MATLAB
6,051
140
function destriped_image = bandpass_wavelet_fourier(image_to_destripe, gauss_sizes, dec_levels, wavelet, sigma ) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Destriping algorithm for image (2D array) % Implements bandpass-wavelet-Fourier filtering, where an image is seprated into bands of varying...
b7c8fad9e4f38ad99a3e8c3b267dec0f6f2ad4cb2e065fdde65a82a8bfbe4296
MATLAB
6,054
176
function T = adaptative_threshold(varargin) % evaluate from an SPM T map the mixing distributions corresponding to the % null hypothesis (in theory a Gaussian centred on 0, but the algorithms % allows a shift because of global effects) and the hypotheses of activation % and deactivation (a Gamma and a negated Gamma)...
3b9851ef7c3a3d6b6e85d52e84dcd44d7e4c05031451420e961fed2d566cb4ca
MATLAB
6,056
178
function [pmat_td, pmat_gr] = TM_parallel(sbj_id, mode, delta, gamma, datdir) %% data load game = []; dirt = []; % south:1, east:2, west:3, north:4 resp = []; % left:1, forward:2, right:3, 4: listen tigroar = []; varnames = {'game','dirt','tigroar','resp'}; Nses = 4; for s = 1:Nses if mode == 0 dat = lo...
d849f2f6d9312c8ad54d9b81ce0150f5115315dc4061bfc4ea4680387b87afb5
MATLAB
6,061
191
% % Button down function: EntropyTab % function EntropyTabButtonDown(app, event) % working(app,'on') % auto_derived(app) % working(app,'off') % end % lbl_entropy_unit1 % Text ='seconds' % Position = [502,340,54,22] % lbl_entropy_unit2 % Text ='seconds' % Position = [496,10,54,22] %...
49e98d531dc5901d78e603d2d8eba010c2677d98624ecebcbf5074534382c468
MATLAB
6,063
148
function WonWofftest3window20190721 global StartTime FinishTime fname SpikeUnits TurnMarkerTime OneTurnTime RPegTouchAll LPegTouchAll DrinkOnArray dpath3... MedPegTimeR MedPegTimeL RpegTimeArray LpegTimeArray RpegTouchall LpegTouchall WaterOnArrayOriginal WaterOffArrayOriginal... RpegTimeArray LpegTimeArray DrName...
c22849b787b18617449b0b3a4d877478b8778f4aca1a630cdf1848ceb166743b
MATLAB
6,073
137
warning('This function has been deprecated. Run test_ecg_get_twa2.m instead.'); % % Test program for generating synthetic abnormal multichannel ECGs with additive % colored noise % The current example is for the TWA abnormality % % Dependencies: The synthetic ECG generator and noise generator package of % the ...
098d00b8c3905833c500fb3b2df60589cdb9232f9c93c8b13129d4bf7d627642
MATLAB
6,074
137
function robustPE = rePE( x, delay, order, windowSize, lowThreshold, highThreshold ) % @brief rePE efficiently computes values of robust permutation entropy [KUU14,U15] % in maximally overlapping sliding windows % INPUT % - x - considered time series % - delay - delay between points in ordinal patterns (delay = ...
b0895ce4437a372b9b6043e13b3469f81f8fa4fb0e0fdf1f4042b26adf070c8d
MATLAB
6,081
161
function [IF, PR, PS, PL] = Phase_Features_SingleCh(meth, sig, fs, f0, varargin) % % [IF, PR, PS, PL] = Phase_Features_SingleCh(meth, sig, fs, f0) % [IF, PR, PS, PL] = Phase_Features_SingleCh(meth, sig, fs, f0, WS, ndft, pertnum) % % ************************************************************************* % * Calcul...
5a43bb464cc530d751c86bb1733ae3fa0713d189ccf399d95c311ef48caaede4
MATLAB
6,086
119
%% Process Data clear all; [FPfiles,FPpath] = uigetfile('*.mat','Select FP Files to Analyze','MultiSelect','On'); if isempty(FPfiles) fprintf('No Photometry File Selected!\n'); else [paramFile,paramPath] = uigetfile('*.m','Select FP Parameters File'); if isempty(paramFile) fprintf('No Pa...
d871fb987d089cd0c67ce947a10758b9b63329167ec78a6ed86cf7edf9735bb8
MATLAB
6,092
188
function computeWaveformSim(obj, updateMe) %COMPUTWAVEFORMSIM Compute waveform-based similarity scores for all clusters if nargin < 2 || isempty(obj.waveformSim) updateMe = []; end if isempty(obj.meanWfGlobal) return; end % these guys are not in the default param set, but can b...
1b62b2a518bc10a1a2706075f4cb14766f9aa48f0eea3f0b9b217a2011f7b94d
MATLAB
6,093
127
% SAMPLE_DELI Demo of LSIM-based ECG delineation with ecg_delineate_lsim % % Runs ecg_delineate_lsim on every .mat record in this folder, plots % the detected fiducial points against the expert annotations and prints % the mean absolute error (ms) per fiducial point. % % Each .mat record is expected to contain...
99ae436b4ff6d07265da262ff256d55d6fa60c08b2a3e1aaa2f9717d039af9cb
MATLAB
6,097
134
function [stacked_events, num_non_zeros] = event_stacker(signal, event_indexes, event_bounds, varargin) % event_stacker - Synchronous event stacking from input vectors and event indexes. % % Usage: % [stacked_events, num_non_zeros] = event_stacker(signal, event_indexes, event_bounds, method) % % Inputs: % signal: T...
6b91205add76f278a6ec4ddf0f685f662e3977498274f326a91884e51ace6fe5
MATLAB
6,100
147
function [lh_proj_data, rh_proj_data] = CBIG_RF_projectVol2fsaverage(input, interp, lh_map, rh_map) % Usage: [lh_proj_data, rh_proj_data] = CBIG_RF_ProjectVol2fsaverage(input, interp, lh_map, rh_map) % % This function projects an input volume to fsaverage. % % ----------- % DEFINITIONS % ----------- % Input arguments:...
6ec4af0fe14b3a101b3eecda98c3fee512e3823154857d1bcfea79009fd7d731
MATLAB
6,104
110
%----------------------------------------------------------------------- % Job saved on 14-Apr-2021 15:05:13 by cfg_util (rev $Rev: 7345 $) % spm SPM - SPM12 (7771) % cfg_basicio BasicIO - Unknown %----------------------------------------------------------------------- %% matlabbatch{1}.spm.spatial.preproc.channel.vols...
0766f5bf2c4e94c4a217e2e8a06776e449974a32aad4ebddf2c840f412f79937
MATLAB
6,105
180
%% clear p = params_2DAA; [cols,alpha] = chooseColors; fpath = fullfile(p.processed_data_dir,'allData.mat'); load(fpath,'tis','bvs') %% did the animal perform a v or h shuttle in a given trial? % we only consider the time up to shutoff! transitions = zeros(p.nSubjects,p.nSessions,50,2); for sub = 1:p.nSubjects ...
041aef5426a4910e8eae5213ab917a13ad41c4d250ddd0a026284ed29eb477f7
MATLAB
6,116
181
%plot before and after per cluster %calcualte_mean_psth clear clc [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) %% for w = 1:length(file) clearvars -except file w load(file{w}) ...
6281141bac866eb4b151e7476e43e0d49a5827f2304543b39cd311b58a198413
MATLAB
6,116
169
function CrossCoAllAnalysis cd('C:\Users\B133_2\Desktop\CheetahData\2018-1-15_15-54-39 4301'); load 4301_180115 % load PeakTrough TetrodeNum PeakMatrix N=[]; RRp_peak=[]; B=[]; StdRRpPeak=[]; N=size(PeakMatrix); U=N(1); M=4; PeakRp=[U,U]; U DiffMaxMinRpArray SameT_RRppeak=[]; SameT_RRptrough=[];...
a0e4e6dd027c6f34b448fa5ab083a0983798340a0f30ac9f94260075e754ee2a
MATLAB
6,118
161
function xlinc=getlinearsegment(xxtr,StdNoise,n) % CHEck Initial and Final Samples mslope=(xxtr(end)-xxtr(1))/numel(xxtr); xlinc=mslope*([1:length(xxtr)]-1)+xxtr(1); if and( xxtr(1)>StdNoise , xxtr(end)>-StdNoise) % 1st and Final Sample Test above noise if n==1 %if isempty(Apeaks) % exp ...
c507a9e352414cd8e943790f7a96176ac835534df29cce10a431f1fb0f12780b
MATLAB
6,121
165
function cellcount20230425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%‚±‚±‚©‚çStriatum MSN%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% path=['E:\CheetahWRLV20200411']; cd(path) LS1=ls; Cellsum=0; Rtcountsum=0; Ltcountsum=0; RtLtcountsum=0; Touchcountsum=0; Woncountsum=0; Woffcountsum=0; WonWoffcountsum=0; Doncountsum=0...
6cae40b48bdd66c28913b6ee6f8614aada8fe6c749e703114dd4f7b5629faa66
MATLAB
6,125
157
function noise = biosignal_noise_gen(noisetype, SignalPower, snr, N, varargin) % biosignal_noise_gen - Generate biosignal noise based on various types. % % Description: % This function generates biosignal noise based on different modes, such % as white noise, colored noise, real muscle artifacts, real electrod...
faaf4ee2dd9128a926b6b4f8928f21d27159c694cdea660e2fd711c8b9cc1950
MATLAB
6,127
170
%% LDE iteration w/o figures % L4EmeshX,L4ImeshY,LDEFrfunc: compsed by several different response % functions, and we choose the best from them for every step %% Starting from the finest function! % Output: Iteration firing maps, and L1 diff norm function [LDERepFinal,LDEIL2Diff,L2DiffNormNeib,L2Diameter,LDEequv,FuncUs...
b36582c66eb695794c17f01dfb7054d65d63e21fe34bc661d54600a899d3e5f6
MATLAB
6,128
96
% Matlab function that for some levels of noise and a number of repetition % is reading the csv noisy signals (used for GP-filitering) and filters them % via Reza's matlab GP implementation and produces the corresponding csv files % containing the filtered signals corresponding to Reza's % method/implementation. clear ...
819825c0217d3ec6f79f36418bc8ee4fdacc98d3ae07d4fa787540981076ef9c
MATLAB
6,130
162
function [img, ser, mrprot] = parse_siemens_shadow(dcm) % [img, ser, mrprot] = parse_siemens_shadow(dcm) % function to parse siemens numaris 4 shadow data % returns three structs with image, series header, mrprot info % does not work with arrayed dcm() if (size(dcm,2) > 1) error('parse_siemens_shadow does n...
89dd46f8ce40fc2ae6f9af4dff7d375e65e19f26a20a7446d331fa59e8c73936
MATLAB
6,135
160
%this script uses 3 different matlab package : %matspect.tar.gz is the matlab code for spectroscopy analysis %spm8.tar.gz is the spm code (you can also get it from their site) %batch5.tar.gz is my matlab code (mainly for automatisation of spm command) %unzip those and add all directories (and sub dir) in your matlab p...
1a08cbe6d6ca31aff330c8f6d6ea24edc8976ac2e15a78dbeb98fff4bcdaa70e
MATLAB
6,139
140
function plot_psth_and_ir_per_waveform_for_PHb(CTP) %% plot waveforms for easch cluster and celltype %ints = CTP.ints; %% CTP.psth_high_int = cell2mat(cellfun(@(x) x(1).psth.mean, CTP.ints, 'UniformOutput', false)); %% plot psth per waveform mkdir('cell_type_PSTH') cd('cell_type_PSTH') %% PSTH_per_waveform = grpstats(...
ca2b974c24237b60769ed1623c281e72eeee59718519a7314d52155ecc6a7c14
MATLAB
6,152
143
% Script to create markers based on the OptiTrack for the right index % finger abduction task in EEG-MEG. Trigger is when finger returns to % initial position (i.e. end of finger abduction) % For this, we need the EEG data, MEG data, and OT data % Zelekha Seedat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
95495ee14952c09ffe1a3de07e1a6edca2885556278b254173898b02fc8da9f1
MATLAB
6,154
228
function gopt = illustration_options(gdefault, varargin) %ILLUSTRATION_OPTIONS Options for illustrations of EQ partitions % %Syntax % gopt = illustration_options(gdefault,options); % %Description % GOPT = ILLUSTRATION_OPTIONS(GDEFAULT,options) collects illustration options, % specified as eRTIS_Sensor_Overlay, value pa...
b6b4c16b0a56a3756cb4f0be97d4c1c1362ef2a547c0f2398d7684f8b821c877
MATLAB
6,154
172
function NW2_Pattern_3_20201208 path=['C:\Users\C238\Desktop\touchcellLtRt_Hirokane']; cd(path); LS=ls; LtNWFRUnit=[]; RtNWFRUnit=[]; LtNW12Point=0; LtNW12Fire=0; LtNW23Point=0; LtNW23Fire=0; LtNW34Point=0; LtNW34Fire=0; LtNW13Point=0; LtNW13Fire=0; LtNW14Point=0; LtNW14Fire=0; LtNW24Point=0; LtNW24F...
7328df0cba4baa1b4a589976db5f303a95af20c5c0c6d5dc71b1fe2e6c05bdea
MATLAB
6,155
172
function NW2_Pattern_3_20200302 path=['C:\Users\C238\Desktop\touchcellLtRt_terashita']; cd(path); LS=ls; LtNWFRUnit=[]; RtNWFRUnit=[]; LtNW12Point=0; LtNW12Fire=0; LtNW23Point=0; LtNW23Fire=0; LtNW34Point=0; LtNW34Fire=0; LtNW13Point=0; LtNW13Fire=0; LtNW14Point=0; LtNW14Fire=0; LtNW24Point=0; LtNW24...
3b541837a10c47d10aab23b3d7294de3a65d34d98067ab5785d39bd15fee2aed
MATLAB
6,156
135
clear all, close all % Concentrazioni esterne % Concetrazione K+: 3-12 mM -> range da circa 1 a 15 mM % Concentrazione Na+: 130-150 mM -> range da circa 80 a 160 mM % Concentrazione Ca2+: ~1 mM -> range attorno 1 mM CL = 6.38e-6; RL = 5e3; Vt2 = -.218; kp1 = 3.04e-4; kp2 = 7.5e-3; R1 = 655; R2 = 6...
bc0279e6eec998cdbb1af4f6797ef1c365a1aacdab48c20d5439da46be4812f7
MATLAB
6,157
136
%% Multiclass Classification ############################################# % Features: Xpca, dims: Nobservations x Npcs % Labels: Y, dims: Nobservations x 1 fprintf('\n>> For every kernel and pair of PCs, calculate: ') fprintf('\n>> LOOCV (leave-one-out cross validation) Accuracy:') % Test 3 functi...
202e54596b946e29c3284a9cf8fa09fe0f892d1c3acddf678d760d97b99e58e1
MATLAB
6,159
191
% Load NIFTI or ANALYZE dataset, but not applying any appropriate affine % geometric transform or voxel intensity scaling. % % Although according to NIFTI website, all those header information are % supposed to be applied to the loaded NIFTI image, there are some % situations that people do want to leave the origi...
da6e370c1cc3fad0882a60cddf96adea9298def56aa7b8fac715b04a18fe60a5
MATLAB
6,161
164
% data organization for E7 2DAA experiment clear p = params_2DAA; %% load and structure nidaq data sesTypes = [0 1 1 1 2 2 2 2 2 3 3]; for sub = 1:p.nSubjects sub thisSub = p.subjects(sub); for ses = 1:p.nSessions sesDir = fullfile(p.rootDir,'behavior',['session' num2str(ses)],['subject' num2str...
97e3d53a649a3449bf45024c6a6179598d451b007ffa01133ded4731ce2e0355
MATLAB
6,162
189
% Function to accumulate Active Neurons in Venn Diagrams % 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: ...
89efed08fef4de9b7b66bf784acd23e8814e5c898b83ebccc70c4ae1b2ec0aaa
MATLAB
6,165
109
%% NATSORTFILES Examples % The function <https://www.mathworks.com/matlabcentral/fileexchange/47434 % |NATSORTFILES|> sorts a cell array of filenames or filepaths (1xN char), % taking into account any number values within the strings. This is known % as a _natural order sort_ or an _alphanumeric sort_. Note that MA...
322103782d42e148232c27914bfce8768be03138444fe356d24b99174ae44f77
MATLAB
6,166
121
clear; close all; clc; addpath 'G:\Sameni\Documents\Papers\Journal 40 (Spline ECG Filtering)\CODES' randn('seed', 0); rand('seed', 0); % % % dbstop if warning type = {'Normal', 'Arrhythmia', 'PTB'}; for ttp = 1 : length(type), switch(type{ttp}) case 'Normal' pth = 'J:\ECGData\Normal'; ...
3de3126289c84f826d50afba52cf064c4a49decc50863b41b6144e2ce7ba7af6
MATLAB
6,177
121
%% layer and cell types per cluster form all_psthT clc clear cd('I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\figure5_S_layers') load('all_cells_PSTH.mat') %% pool ACd ACv, 6a 6b change_position_name = all_psthT.position; AC_names = find(contains(change_position_name, 'ACA')); change_position_name(find...
f68155a7d15869c00e2c1dfebf8ab026ecb9c20b9e3793e6018af36c91aba1e3
MATLAB
6,177
184
classdef file_writer < handle % % Class: % adi.binary.file_writer % % This is meant to handle the binary file format which is publically % available online. The binary format only supports writing one % record. There is no SDK for this format. Instead low % level read/write...
fdeba09c82bf44fc3dcc3866118f9946804fd6e9b49232eff500e89f4d3afeb9
MATLAB
6,181
192
function save_lag_fig(app) print_cell = {}; print_cell{1,1} = 'Interval'; print_cell{1,2} = 'signal1'; print_cell{1,3} = 'movmean'; print_cell{1,4} = 'signal2'; print_cell{1,5} = 'movmean'; print_cell{1,6} = 'Lag'; print_cell{1,7} = 'Kendalls tau'; print_cell{1,8} = 'p'; print_cell{1,9} = 'spearmans rho'; print_cell{...
41bd2307521c077af125570839852ceefdd1fbd33fdb7dae484e0c7a3375e74e
MATLAB
6,183
179
%% HPC for large amount of IC tests % ICId Initial Condition Id : 1-4: 0, 22.5, 45, 90 deg % ContrastID: A. bg fr % 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 ...
a6eaebbb6a4ac6dfe9457b10a5ce00f30b79d2f1fb7aefe23ec40c09413f4419
MATLAB
6,183
150
function [phase, inst_freq, amp] = Phase_Ex_Trad(x1, fs, varargin) % % [phase, inst_freq, amp] = Phase_Ex_Trad(x1, fs) % [phase, inst_freq, amp] = Phase_Ex_Trad(x1, fs, WS, max_f, ndft) % % ************************************************************************* % * Instantaneous Phase (IP) estimation using the conve...
d5021dbc8d9cf8ccc6c953f6b4ff649f622c2d644237bd8aa2083d935a367986
MATLAB
6,192
108
function lickingsearch cd('C:\Users\C238') if ~exist('CrossCorr', 'dir') mkdir('CrossCorr') end SaveDir = 'C:\Users\C238\CrossCorr\'; CoreDir='C:\Users\C238\CheetahWRLV20220213'; cd(CoreDir); MouseList=ls; for m=1:length(MouseList(:,1)) %%ƒ}ƒEƒX”ԍ† Mouse=strtrim(MouseList(m,:)); if ~strcmp(M...
c76c1ecb1d0eef09e7be799a8a1dcb61d723afc706dc318000af739d3113b412
MATLAB
6,200
263
% nufft_table_test.m % 3D test if 1, printm '3d' if 1 || ~isfield(s, 't'), printm 'precompute structure' % ktype = 'minmax:kb'; ktype = 'kaiser'; Jd = [3 4 3]; Nd = [10 8 9]; Ld = [2^8 2^7 2^7]; Kd = 2 * Nd; % n_shift = zeros(size(Nd)); printm 'easy: 0 shift' n_shift = [3 7 2]; % stress it gam = 2*p...
5afe8fc71673f74f6867ba97d8f86efbcb34b3f4e85b960a7e283e3641c8385c
MATLAB
6,202
201
%---------------------------------------------------- %RETROICOR_interpolate_hera_reject % %Interpolates heart rate data after editing in Hera %to remove rejected periods by inserting new peaks. % %EJH2011-14 %---------------------------------------------------- function matfile=RETROICOR_interpolate_hera_reject(matfil...
36b5b8692f028d18eb78a3e8fec1add79473ef6075260a53b9a9650fc5fe6123
MATLAB
6,207
150
function [pTvaf,pExp,tvafPerm,tvaf,vaf,vafs,vafp,vafpPerm,vafPerm,explainedPermAll,coeff,score,latent,tsquared,explained,mu] = permutedPCA(inData,numPerms,permType) % [p,coeff,score,latent,tsquared,explained,mu] = permutedPCA(inData,numPerms,permType) % % permutedPCA computes the total variance accounted for by a PC...
154f08dcd8ad12162ada806450d57d70dc4a4763bdaf282e85e98cb3a9d36327
MATLAB
6,222
183
function varargout = Legend(varargin) % Copyright Benjamin Cowley, Matthew Kaufman, Zachary Butler, Byron Yu, 2012-2013 % ---GNU General Public License Copyright--- % This file is part of DataHigh. % % DataHigh is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public Lic...