sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
5e82b644242fd9439d98c4069bb85288619ef7b81ddd8967cac792a5385f61be | MATLAB | 5,432 | 135 | function varargout = set_parameters_ui(varargin)
% SET_PARAMETERS_UI MATLAB code for set_parameters_ui.fig
% SET_PARAMETERS_UI, by itself, creates a new SET_PARAMETERS_UI or raises the existing
% singleton*.
%
% H = SET_PARAMETERS_UI returns the handle to a new SET_PARAMETERS_UI or the handle to
% t... |
45639e12e36104706adb6c2edb15a4385183ca3cf7f0cf7d0ef096ffe2a1d667 | MATLAB | 5,435 | 142 | function plot_psth_and_ir_per_waveform(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(CTP, "i... |
79e433c0e6c83332f346f78f7de1f9da60f45de9b0e4e409212628ac81efbde3 | MATLAB | 5,438 | 99 | %% single cell simulation: to collect mean V (and firing rates)
% Input: NeuronType 'e' or 'i'
% InitialStates V and all Gs
% NeuronNum Number of NeuronSimulated. Generally we don't
% want this number too large.
% Output: meanV, fr Collected from all neurons, ... |
85d7114df15cea62fedf9f626b3ec387cd16f6cbb879e1b8e85f8b618cb9eddc | MATLAB | 5,440 | 237 | function par = set_parameters(fs)
% LOAD PARAMS
par.segments_length = 5; % length (in minutes) of segments in which the data is cutted (default 5min).
if isempty(fs)
par.sr = 10000; % sampling rate (in Hz). This parameter will be only used if the data file don't have a sr.
els... |
6895ee3884e9f329af402bec91fec14c5b5bdf2c42e0451f5c986be4616e35d7 | MATLAB | 5,443 | 146 | function maze_view=Head_Orientation_No_floors(TrackingData)
% Head_Orientation_No_floors determines the head orientation/facing location/view of the animal inside the maze.
%
% Input:
% - TrackingData: Structure containing the position and orientation data
%
% Output:
% - maze_view: Matrix repr... |
0b4ce4090efca0598cc4d9dc8a89dba006bd7e6defdbafa0faa5093fbc466e00 | MATLAB | 5,447 | 192 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Freq + Phase correction + sum of an array of FIDs %%%%%%%%%%%%%
%%%% JV 13/12/04 %%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%function [SUM fid_cor phase_cor freq... |
8d001112d1179af79f4bcfc4278bfa69d5446d916b294c898294155ae4eb82bc | MATLAB | 5,448 | 158 | %% plot OS tuning numbers
%Table of contents
%
% 1-initial loading
% 2-waveforms
%% 1-initial loading
load osCategorizedTable.mat
neuronTable = osCategorizedTable;
% load neuronTable.mat
% % Make sure these indices are correct:
mainDir = 1;
orthoDir = 2;
neuronTable = neuronTable(strcmp(ne... |
d70c3a41c9c434d27b167f95e7c3d865ac77bccadaca6ccee0df30d7b31dc519 | MATLAB | 5,449 | 124 | function AnalyzeResults14_SpectralFeaturesFunction(Rdata, Rtextdata, outputfileame1, outputfileame2, per_subject, ntrees)
% close all;
% % parameters
% % % % logfileame = 'SVMOptimizedParamters03.txt';
% outputfileame1 = 'Submission55.csv';
% outputfileame2 = 'Submission55_unbiased.csv';
% % % bins = [50 75 100 120 180... |
bccb393d05a81c89a9acbc904876379d2a824358f4080219a33499c294b0638b | MATLAB | 5,456 | 74 | function WindowApplySpikeOff20210107
global RtouchSpikeOffUnit LtouchSpikeOffUnit LtNegativeSpikeOffKaisuu RtNegativeSpikeOffKaisuu RtPositiveSpikeOffKaisuu LtPositiveSpikeOffKaisuu
%%%%%%%%LtouchSpikeffUnitÌꪯ
LtPositiveSpikeOffKaisuu=zeros(1,2);
LtPositiveHistogramXaxis=zeros(1,2); %%%%% PositiveqX... |
635fc30750985a874d059a40f747972b954d8247c48eaeac3814a7cbedb86122 | MATLAB | 5,458 | 135 | function [index, rank] = sqi_beat_shape_variability(x, ff, fs, varargin)
% sqi_beat_shape_variability - Signal quality index (SQI) based on pseudo-periodicity measures
%
% [index, rank] = sqi_beat_shape_variability(x, ff, fs, method, num_peak_det_itr, beat_width, ranking_mode, plot_results)
%
% Inputs:
% x: Input d... |
7331cb8dee89e98f8cc9e55163b3df280db4489bf78b6acf93ae51e663faa959 | MATLAB | 5,459 | 166 | function [pmat_td, pmat_gr] = TM_hierarchical_noreest(sbj_id, mode, beta, 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 == ... |
a6a0ec77b3978b8658c9306b7f45d47c1ca7cb4ad384d90798b959a22285b7c1 | MATLAB | 5,464 | 160 | function [reference_SAVE,sigsubref_SAVE] = scaleRefToSig_postDecayV4(Dts,DecayAdjData,setupParam,delay,allTrials)
a = allTrials.Grouped;
k = 1:numel(a);
allTrialsID = allTrials.ID;
BLperiod = setupParam.BLperiod;
BLstart(k) = BLperiod(1) + delay(k);
BLend(k) = BLperiod(2) + delay(k);
BLidx1 = zeros(1,... |
9ee62891ca4e074d9fce0d27c3e1cd6d9c517d6186a5957c4640605b409fe698 | MATLAB | 5,467 | 156 | 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('/Users/rsameni/Desktop/Seizure/kaggle/Sou... |
bda473dadd5359796bcd4926368e8fad2dfb38b86c6f093a234952d58cd579eb | MATLAB | 5,468 | 141 | %{
----------------------------------------------------------------------------
Analyzing behavioral data
At least for the correct rate
----------------------------------------------------------------------------
%}
function FigureS1ef_Dual_RL_analysis_220314_para_all_220909_2
close all
analysis_folder = {
... |
d41d782cf777e64d3cbcdb8cc28b93412585e2381b9ebc64ec4099636f34d8d1 | MATLAB | 5,470 | 154 | %% analize PHb cimogenetics
%% plot all cells before and after
nds = [10,8,6,4,3,2,1];
all_cells{2}.cluster = all_cells{1}.cluster;
%% takeout nan cells
nan_idx = find(sum(isnan(cell2mat(all_cells{1}.ttest_pval)), 2) >1);
nan_cells{1} = all_cells{1}(nan_idx, :);
all_cells{1}(nan_idx,:) = [];
nan_cells{2} = all_... |
45a66beed30cfc18f2bf7a26b4af7ac1674e59cd169980d35bae6d65b2cce908 | MATLAB | 5,475 | 151 | function [pathnameWeights] = getPMDFWeights(maxGoodRho,maxRho,pathnameHeadModel)
%##########################################################################
%Create weighting values for PMDFs on the basis of maxGoodRho, maxRho.
%We want channels that are too long to be penalized, rather than
%forcibly excluded. This ... |
01dc4f8dae3e99b1f9993c992b95b60b616dc1402cf472ae040028d4e53b99b4 | MATLAB | 5,487 | 107 | function [Scores,BG_Intensity,BG_Peak_Width] = Normalize_Rects_Values_Generalized(Image0,Scores,Step_Origin,Previous_Angle,Rect_Width,Rect_Length,BG_Intensity,BG_Peak_Width,Parameters1,Im_Rows,Im_Cols)
% TODO:
% replace 260 & 265 with parameters.
% *** I get negative values in histcounts. ***
% Create a sub-m... |
5fc6bd7f324feb31aa2af7d455ebc5bdf11d7586716344b4e9c1c175314344a1 | MATLAB | 5,487 | 142 | function [assignment,cost] = munkres(costMat)
% MUNKRES Munkres Assign Algorithm
%
% [ASSIGN,COST] = munkres(COSTMAT) returns the optimal assignment in ASSIGN
% with the minimum COST based on the assignment problem represented by the
% COSTMAT, where the (i,j)th element represents the cost to assign the jth
% job to... |
4cc782f266bddfdb36c278a3736dcf75cc88116554e193c220051f2643537d8c | MATLAB | 5,495 | 133 | % Test script for removing EOG artifacts from EEG data using the
% iterative subspace denoising algorithm developed by Sameni and Gouy-Pailler (2014).
%
% Revision History:
% 2011: First release.
% 2020: Replaced obsolete psd() with pwelch() for power spectral density estimation.
% 2024: Renamed from deprecated v... |
29cf5a4f85b9366497aeba61c331f6ee3a184354d5f3a6c9dd91d82510cb1261 | MATLAB | 5,496 | 132 | clear
clc
windows = {40:50, 65:125, 140:150}; %windows for calculating the response time - on, sustaneid and off
ploting = 0;
%%
% Needs to be in D:\Data\IR data Shira_May_14_2022
[file, path] = uigetfile('*.mat','MultiSelect','on');%When the user clicks the load psetion button, a window should open to enable t... |
048db6d2338127e8d1543e0516730fc7e37e9e5476cf71a49caadbab432df599 | MATLAB | 5,509 | 136 | % Recursive Zonal Equal Area Sphere Partitioning Toolbox.
% Release 1.10 2005-06-26
%
%Functions by category
%=====================
%
%Installation
%------------
%
% install_eq_toolbox Install toolbox
% uninstall_eq_toolbox Uninstall toolbox
%
%Recursive zonal equal area sphere partitions
%---------------------... |
13faf384b086c2fbf9afb6e16a013cceeb9f3ace8a48518d1a0dfe053528ce07 | MATLAB | 5,528 | 154 | % function results = rst_HLM_logit(data,N,regressor,groups,conditions)
% %
% % HLM for response curves using a hierarchical logistic linear model for
% % binary data as for instance binary responses along a continuum or in time.
% % Whilst Matlab default assumes common regression across all categories
% % (parallel ... |
1111233715487058976df8c28792343b3621137009fd62f59af50224fd7c5ddf | MATLAB | 5,531 | 168 | function [pmat_td, pmat_gr] = TM_hierarchical_fullprob(sbj_id, mode, beta, 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 ==... |
828554bc9d9e0a504db23cc806d1c260642bbde7f7a6baebbb2a1e25b6fb8629 | MATLAB | 5,536 | 167 | function c = correct_T2_metab(c1,metab,typee)
if ~exist('typee'), typee='';end
if iscell(c1)
for k=1:length(c1)
c{k} = correct_T2_metab(c1{k},metab,typee)
end
return
end
c=c1;
if ~exist('metab')
met = find_metab_list(c1);
for nbmet=1:length(met)
c = correct_T2_metab(c,met{n... |
ed9ef2da6a5cb84057e7bfdff973d6140db83d58cc3dbbc1b1dbdec8e92af890 | MATLAB | 5,536 | 135 |
%% loading data
load('dataFig6.mat');
%% plotting
% color definitions
cPLk = [0.0,0.4,0]; cPSp = [0.2,0.6,0]; cPEx = [0.4,0.8,0];
cALk = [0.0,0,0.4]; cASp = [0.2,0,0.6]; cAEx = [0.4,0,0.8];
% ISIHs
figure(61); clf; set(gcf,'Position',[10,10,900,600]);
subplot(2,3,1); cla; hold on;
plot(ISI,ISIH25PLk... |
2c2d265e70c148cfaa51c3ef8aed60a585a2a3cfb66c00c94222cc6cb4e42f5b | MATLAB | 5,540 | 153 | %% 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: Angle:ranging from 0-90 deg, although we only use 0 7.5 15 22.5... |
c22e04443fd8b2eea551658e6583ef89d44fc6d1a39c6c457fdf45d015a4cc4c | MATLAB | 5,542 | 147 | %Shinjini Kundu (c) 2022
%wrapper code to run VOT method, updated
function final_results = multVOT_init(I0,I1,f,g,h)
% This function takes an initalization to run
% gradient descent, rather than assuming the identity as the start point.
%% inputs:
% I0 template image
% I1 source image
% f g ... |
f13c7282ef83c71563beb3013e7b7e015d7598986728ef54233bc516d1fffa31 | MATLAB | 5,548 | 149 | function [feature_vec, feature_info] = ecg_amp_to_int_ratio_features(data, position, fs)
% function [feature_vec, feature_info] = ecg_amp_to_int_ratio_features(data, position, fs)
% Extract features related to the ECG amplitude-to- time interval ratios
%
% Inputs:
% data: ECG signal as a vector (... |
586f495fe2654be86228ce3e813d71f2a62e690a5eb236ed8227da870e713497 | MATLAB | 5,549 | 148 | function pretouch_post_touch_figure_20200313
path=['G:\CheetahWRLV20200121\119\2017-6-7_20-8-33 11901-51_0\11941_170607_C7__'];
cd(path)
CDFolder2=['G:\CheetahWRLV20200121\119\2017-6-7_20-8-33 11901-51_0'];
tfile=['Sc4_SS_01.t'];
SpikeArray=GetSpikeAll(CDFolder2,tfile);
file=['Bdata.mat'];
... |
73b35ffec14198088acc2816ed0aa0a6a3b264fa1af85d94cd84e9770c1baa2d | MATLAB | 5,556 | 173 | function model=sopls_cv(varargin)
% sopls_cv sequential and orthogonalized PLS with cross-validation
% The function sopls_cv uses cross-validation for selecting the optimal
% complexity of a sequential and orthogonalized PLS (SO-PLS) multi-block
% regression model.
% After the model selection phase, it ... |
4c01b6a0b2897986fbce9f75825273e271a04565dfe0a31044bbe154c3cd8340 | MATLAB | 5,557 | 200 | function controlfilename = createLCmodel_control(metabname,l1,l2,l3,preproc_dir)
nb=5;
switch nb
case 1
basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/basis_PRESS_TE68_CENIR_090730.BASIS';
basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/PRESS_new2/basis_PRESS_TE=68_CENIR_0... |
1b806335316786c91b3e00e33acd83b7776fbf91f6b6f3f9ebb7ca3f9e99bc3d | MATLAB | 5,564 | 154 | %
% 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... |
d0729cf7e884fb3da2eef7f849fead66b462954f76df1f8ceba1602385937395 | MATLAB | 5,564 | 134 | %
% Test program for generating synthetic abnormal multichannel ECGs with additive
% colored noise. The current example is designed to model T-wave alternans (TWA)
%
% Dependencies: The synthetic ECG generator and noise generator package of
% the Open Source ECG Toolbox
%
% Reference:
%
% - Sameni, Reza,... |
9765a5f4132b24a23f7275f7b3cb30dc17be16a0bd28e2974d57b6a9f086008e | MATLAB | 5,573 | 149 | function [DataAVG_SAVE] = eventwindowAverageV2(ProcessedEventWindowData,varnamesDATA,setupParam,TrialParam,allTrials)
% Setup group info (if there are groups)
allTrialsID = allTrials.ID;
if setupParam.CompareGroups == 1
GroupParam = TrialParam.GroupParam;
groupnames1 = fieldnames(allTrialsID);
groupidx = ... |
aba68160aa5b1f4e821c9c15a9e8d5e26cc0e7ba216095a5c08a4ba7b905654a | MATLAB | 5,575 | 186 | % this script calculates the average value of tissue volumes in the pool of Healthy Control
% subjects
clearvars
close all
addpath(genpath('/storage/stella/MATLAB_toolboxes/'));
addpath('/storage/stella/Analysis/matlab_scripts/');
%% Extracts values from the txt files and evaluates mean and SD
HCsubj = dir('HC*');
%f... |
63263242aaca366fd4ba69a81d09c7c913ad96cf367200f3cfe7651600208d79 | MATLAB | 5,581 | 185 | function [nonoise_x,nonoise_u,nonoise_w,nonoise_loss,noise_x,noise_u,noise_w,noise_loss,ijolt,iswitch,wopt,wstab1,wstab2] = generate_run(sigmau)
% GENERATE_RUN This method is used to generate Figures 2 and S2 in the
% manuscript. The method returns a two realizations of the dynamics
% described in Section "Closed-Loop ... |
9fd5734e8a28c91231b6cfd54b926c35dd2b0687cf83bfd70af22dede9901780 | MATLAB | 5,590 | 159 | function [ trans_collection,trans_collection_pe,trans_types,trans_spds,pe_spds ] = collect_transition_data_per_ses(p, traces, evs, bvs, tis, speed_control)
% collect all ITI transitions (independent of direction and speed)
% return shuttle direction and speed as additional output
% use these outputs elsewh... |
b3f3e4a86b1c1b3cc263f37fa635235c34df031fe1852dd01f0fe89af981febb | MATLAB | 5,594 | 95 | %% NOTE: Add ambient, add synaptic failure, maybe change ref setup
function [oRefTimeE,oVE,oSpE,oGE_ampa_R,oGE_nmda_R,oGE_gaba_R,...
oGE_ampa_D,oGE_nmda_D,oGE_gaba_D,...
oRefTimeI,oVI,oSpI,oGI_ampa_R,oGI_nmda_R,oGI_gaba_R,...
oGI_ampa_D,oGI_nmda_D,oGI_... |
8be779bd610e2fb2875f6857100c20f1acc42480b34fe3877d9ff5bb472117ae | MATLAB | 5,595 | 168 | function [FinalClusters,FinalClusterIDs,NumTraceLim,MinDendriteLength,InitialClusterNum,Y]=mnl_EuclideanCrawler_Mag_Weighted_Axons(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. "_Axons" has ammend... |
2f90d2d2a9dc0714669d3a64ce0170e1f057ef5c91017f5fa1e2a12b657e72f2 | MATLAB | 5,598 | 185 | clear
close all
clc
% load ECG1
% s = data;
load ECG2
s = data(1, 1250:4250);
% 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... |
ba4f13bb9b669a2cd6c4f0787ffdf152bd98bc58a304a6b1cb0b5d05a5df3868 | MATLAB | 5,600 | 168 | function [f,outliers] = spmup_spectral(varargin)
% fMRI spectral analysis - slice by slice
% allows checking for artifacts, typically in the coil or in k-space reconstruction
%
% FORMAT [f,outliers] = spmup_spectral
% [f,outliers] = spmup_spectral(P)
% [f,outliers] = spmup_spectral(P,M)
% [f,outli... |
d538fa42b775f517c6af6c725f67959175af3c0cfbdfcb20b02376c97a830182 | MATLAB | 5,605 | 135 | function [vcg, phi] = vcg_gen_var_hr(HR, fs, alpha, b, theta, theta0, varargin)
%
% vcg_gen_var_hr - Synthetic cardiac dipole/vectorcardiogram (VCG) generator with variable heart rate
%
% Usage:
% [vcg, phi] = vcg_gen_var_hr(HR, fs, alpha, b, theta, theta0, method)
%
% This function generates a synthetic card... |
554416c77b146d10e32f076b918446f0ce69b247ccc6a620306e6bed9a76448f | MATLAB | 5,608 | 154 | % 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,... |
7f3a647e40b81a43958e924e8ff3f6c44146ddca3949c9e2ec7e4ccc498708a1 | MATLAB | 5,612 | 190 | function err = save_nifti(hdr,niftifile)
% err = save_nifti(hdr,niftifile)
%
% Pixel data should be in hdr.vol
%
% Handles data structures with more than 32k cols by setting
% hdr.dim(2) = -1 and hdr.glmin = ncols. This is FreeSurfer specific,
% for handling surfaces. The exception to this is when the total
% number of... |
b228f5c8890d8e23c5eed5bfb28ec38cc56662f1e3c11b0d62870278f74095d5 | MATLAB | 5,623 | 225 | function [movie_frame] = project_s2_partition(N,varargin)
%PROJECT_S2_PARTITION Use projection to illustrate an EQ partition of S^2
%
%Syntax
% [movie_frame] = project_s2_partition(N,options);
%
%Description
% PROJECT_S2_PARTITION(N) uses projection to illustrate the partition of
% the unit sphere S^2 into N regions.
%... |
17ef0eac979785c0971990bde75fec255c27d83e97736aa80cc9560a160e6d6a | MATLAB | 5,635 | 153 | function [prot,rstraj] = read_twix_hdr(fid)
% function to read raw data header information from siemens MRI scanners
% (currently VB and VD software versions are supported and tested).
%
% Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de), Mar/11/2014
nbuffers = fread(fid, 1,'uint32');
prot = ... |
638c2be2ca3a94bd7659762dbd973c177471e2bc90c9e654d1c8105c6768ab5f | MATLAB | 5,635 | 217 | clear
close all
clc
% load ECG1
% s = data;
load ECG2
s = data(5, 1:end);
% s = randn(1, 10000); fs = 1000;
% load ECG3
% s = data(2, 1:end);
% s = resample(s, 0.3*fs, fs);
% fs = 0.3*fs;
s = LPFilter(s - LPFilter(s, 1.0/fs), 100.0/fs);
s = s(:)';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
6d8000c7fe02ba00adaa2bd1135ab43e375c1d2ff3a7a94f4f73bf3714f9bda0 | MATLAB | 5,640 | 113 | % This file is a demo for testing the Connectivity analysis functions
% This function is produced by Esmaeil Seraj (esmaeil.seraj09@gmail.com)
%
% Dependencies: Functions "bdf2mat_main.mat", "emg_onset.mat",
% "trigger_avg_erp.mat", "BPFilter5.mat", "BaseLine2.mat"
% and "sig_trend.mat" (p... |
912d494d639bf110cbfa9fafd0c96ceb5dd7944e33d401ee6eb85c2302e58630 | MATLAB | 5,640 | 200 | clear
p = params_2DAA;
fpath = fullfile(p.processed_data_dir,'allData.mat');
load(fpath,'evs','tis','bvs','traces')
[cols,alpha] = chooseColors;
saveFigs = 1;
%% run DR and decoding procedure for different trial samples
%fpath = 'G:\SRM_results\one_subspace_task_decoding\subspace_decomposition_one_subspace';
%aveData =... |
87c2ba07196774abbf3c7174f0a8ed08f26be5c26cd487f9adf3e21f50be24b1 | MATLAB | 5,641 | 215 | clearvars -except ONimageS OFFimageS refpic Error
%% preprocess_A
NF=size(ONimageS,1);
rep = size(ONimageS,2);
wide=512;
minvo=30;% 1.4 x, fov 600 x 600 um, resolution 1.17 x 1.17 um, r =sqrt(minvo/pi)*1.17 = 3.6 um
fsize=1;
Fsize=30;
ONimage = zeros(NF,512,512);
OFFimage = zeros(NF,512,512);
fo... |
c6b964616d8d6ce19f1e8a6ab471cf767f8fccc06f00036b3fd26393859bca07 | MATLAB | 5,643 | 140 |
%% Init:
clear
close all
clc
path(pathdef);
addpath( genpath( 'Source' ) )
load('DataCalculated/TrainedSonoNERFs/sonoNerfTrained - UALogo.mat')
%% Inference: preparation
frequenciesERTF = structSonoNERF.SonoNERF.Layers(2).frequencySamples(1:end/2);
numFrequencies = length( freque... |
b9941a2b61d3edc54bf04f3fcb4af573276253bce60f02d95c2411f2088ddf4a | MATLAB | 5,646 | 177 | function Run_MSCD(run)
% Based on Betzel et al (2019). The community structure of functional brain
% networks exhibits scale-specific patterns of variability across
% individuals and time. Neuroimage.
%% FIND partitions of interest across runs of the Multilayer community detection algorithm
... |
0d5aaf30b07ac6e83272af84c24184cb3a79e41a707af736211fdb2d082db8c4 | MATLAB | 5,647 | 212 | function [w_st, ST, X_st] = kruskal(X, w)
% function [w_st, ST, X_st] = kruskal(X, w)
%
% This function finds the minimum spanning tree of the graph where each
% edge has a specified weight using the Kruskal's algorithm.
%
% Assumptions
% -----------
% N: 1x1 scalar - Number of nodes (vertices) of the grap... |
e3ce1154427a60e90555c20c22d552c64cd2557f21b0ad1db1d677afdf653a3c | MATLAB | 5,648 | 148 | function rasterandtouch20190612
cd('C:\Users\C238\Desktop\CheetahWRLV20180729\119\2017-6-7_20-8-33 11901-51');
dpath=('C:\Users\C238\Desktop\CheetahWRLV20180729\119\2017-6-7_20-8-33 11901-51\');
dpath3=('C:\Users\C238\Desktop\CheetahWRLV20180729\119\2017-6-7_20-8-33 11901-51');
tfile=['Sc6_SS_03.t'];
SpikeArray=... |
bb009c4c882d030e9901c1cc9f36694fdb3b008b5cf0e8499286ea81f403d0da | MATLAB | 5,651 | 155 | clc
clear
close all
addpath(genpath(pwd))
%%
% This demo generates one chmm model observation, then compare our approximate inference with the exact inference
%C is the number of channels in CHMM
C = 3;
T = 2000; % T is the number of time samples
channel_num_states(1:C) = randi([2,6],1,C);
while(sum(channel_num_st... |
ba2c256666f5155ade17e9db7363c0a6a07d0f7cf4fc4d707079f46aa0dc130c | MATLAB | 5,654 | 167 | function [pmat_td, pmat_gr] = TM_topdown(sbj_id, mode, 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 = load([datd... |
5bfd95466ad73b77f87d149e5f742f519f76e9f853b769c68746f43243dd78df | MATLAB | 5,656 | 215 | clear
[file, path] = uigetfile('*.mat');%When the user clicks the load data button, a window should open to enable the user to select a file.
datafile = fullfile(path, file); %save path
load(datafile)
close all
cd(path)
clc
%%
data = clusters.cluster_cells;
fields = fieldnames(data);
types = {'on', 'off', 'sustained'}... |
4591bd1a04ad78346570375958c1d6d7f4644f6dc8d8fe27aece47742e0d33bf | MATLAB | 5,661 | 171 | function Lt_Rt_Pattern1_and_CV__5Touches_figure20200308
path=['C:\Users\C238\Desktop\touchcellLtRt_terashita'];
cd(path);
load('Lt_Rt_Pattern1_and_CV_5Touches.mat');
% %Ltouch
%
% LtouchPW0_FR=[]; LtouchPW0_CV=[];
% LtouchPW1_FR=[]; LtouchPW1_CV=[];
% LtouchPW2_FR=[]; LtouchPW2_CV=[];
% LtouchPW3_... |
98e676994ef7ca61446aa04506ea6b3531a69ebb65bdb9923e82cd546ae6e815 | MATLAB | 5,663 | 159 | function [prot,rstraj] = read_twix_hdr_DICOM2(DICOMfile)
% function to read raw data header information from siemens MRI scanners
% (currently VB and VD software versions are supported and tested).
%
% Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de), Mar/11/2014
dcminfo = dicominfo(DICOMfile);
... |
8052ba87d1879470ce279df904f45729fa5ef53895e13a9ac2387caed7f7a462 | MATLAB | 5,666 | 180 | function entiresessionPhotomPlot_SigRefV2(x,y,eb,setupParam,TrialParam,allTrials)
allTrialsID = allTrials.ID;
if setupParam.CompareGroups == 1
% GroupParam = TrialParam.GroupParam;
groupnames1 = fieldnames(allTrialsID);
groupidx = zeros(1,numel(groupnames1));
for i = 1:numel(groupnames1)
... |
788cdf6c695087e7cf4f7eb6b583f150d56449f2b510fbf30e9ba4fad0bee7bc | MATLAB | 5,668 | 98 | function save_entropy_res(app)
%save_entropy_res Summary of this function goes here
% Detailed explanation goes here
[int_idxs,~] = listdlg('PromptString',{'Please select intervals ',...
'to be plotted/saved.',''},...
'SelectionMode','multiple','ListString',app.popup_int_entropy.Items);
[form_idxs,~] = listd... |
eb454a97134857ed46cccedfc4e337fb0386a12922eae84eb5010a70ad6ce99d | MATLAB | 5,678 | 137 | % This program is for filtering the ECG components from EEG signals
% recorded during an fMRI experiment. Here we focus on the AF8 channel
% which was more noisy. The steps of the program may be summarized as
% follows:
% 1- find a rough estimate of the baseline wander and remove it. Different
% baseline wander re... |
5b69795a2d43c20e3535a633701951747007e3d37bac4eb636ecf74e74c8bc65 | MATLAB | 5,681 | 166 | function controlfilename = createLCmodel_control(metabname,l1,l2,l3,preproc_dir)
basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/basis_PRESS_TE68_CENIR_090730.BASIS';
basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/basis_PRESS_TE=68_CENIR_090901.BASIS';
basis_set_file_path = '/home/ro... |
bd1fab22f80d5e72bb54896d225b269b28322c737584c362378d75a5d1f8c849 | MATLAB | 5,682 | 166 | function controlfilename = createLCmodel_control(metabname,l1,l2,l3,preproc_dir)
basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/basis_PRESS_TE68_CENIR_090730.BASIS';
basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/basis_PRESS_TE=68_CENIR_090901.BASIS';
basis_set_file_path = '/home/ro... |
2bad49e417f6d37c21a6b11896dd08a4dffc9fbc4e89880a2705c3e28226b9d4 | MATLAB | 5,689 | 145 | function [Cells]=mnl_GeneratePossionsNchannels(NumPoints,Spreads,Ndim)
% Code for creating N dimensional poisson distributions at
% user-specified spreads.
%
%Inputs
% NumPoints=number of cells
% Spread=[pdf variances] e.g. [0 0.1 0.2 0.5 1 2 4 8]
% Ndim - Number of dimensions
%
%Outputs
% Cells=Structure containing c... |
479372eea1ad123b4d08a085f51297abd8c5b34e09c4df7931a8a50ac3994fbb | MATLAB | 5,689 | 160 | function idx2 = getSpikePositions(input_sig,fs,orig_sig,params)
%GETSPIKEPOSITIONS computes spike positions from thresholded data
%
% This function computes the exact spike locations based on a thresholded
% signal. The spike locations are indicated as non-zero elements in
% input_sig and are accordingly evaluate... |
74f1bca2936d3c00eef750e923ab1880d46b6a9d530e7c0a452615f67e9ae27d | MATLAB | 5,690 | 169 | function [X,ndx,dbg] = natsortfiles(X,varargin)
% Alphanumeric / Natural-Order sort of a cell array of filename/filepath strings (1xN char).
%
% (c) 2012 Stephen Cobeldick
%
% Alphanumeric sort of a cell array of filenames or filepaths: sorts by
% character order and also by the values of any numbers that are wit... |
f5d8a57cc5d0beb448cdc4c27750b328d361704dcc0b1baa5bdddaa15d5a9d78 | MATLAB | 5,692 | 133 | function res = computeDelta(dRes, res, hCfg)
%COMPUTEDELTA Compute delta for spike features
hCfg.updateLog('computeDelta', 'Computing delta', 1, 0);
% create CUDA kernel
chunkSize = 16;
nC_max = 45;
if hCfg.useGPU
ptxFile = fullfile(jrclust.utils.basedir(), '+jrclust', '+CUDA', 'jrc_cud... |
d65313a7c0d2ffd93e37bc6665de4e96e922e78ade783d72fdc372e39b5ddaf9 | MATLAB | 5,695 | 204 | % test ECG PCA, ICA, PiCA plots after component removal
%
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);
[V,D] = eig(cov(data'));
s2 = V'*data;
... |
0c681712505ff811c6732a0c0fb34d6023dc7b77b4acc90de0ce71c53a801980 | MATLAB | 5,696 | 179 | classdef CurateController < handle
%CURATECONTROLLER Interface for manually curating sorted clusters
%% CONFIGURATION
properties (Dependent)
hCfg; % Config object
hClust; % Clustering object
nShown; % number of units actually shown
end
properties (S... |
95792027e7cfba19af7cefbcfdd3143c167fcb0811511f8ea2e6b41b5d763d4e | MATLAB | 5,697 | 136 | %calculate new correct fit
clear
clc
ploting1 = 1;
ploting2 = 0;
windows = {40:50, 65:125, 140:150}; %windows for calculating the response time - on, sustaneid and off
%%
% Needs to be in D:\Data\IR data Shira_May_14_2022
[file, path] = uigetfile('*.mat','MultiSelect','on');%When the user clicks the load pse... |
13c116805873c771a5dbb72539d1bd9361e9e0afc8feb62750c668cc06bb604c | MATLAB | 5,699 | 201 | 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);
W = jadeR(data);
s = W*data;
[V,D] = eig(cov(data'));
s2 = V'*data;
s2 = s2(end:-1:1,:);
peaks... |
6c2e0440612a08c26f0136e0b01a1c407f40063b025aae38463dbde1049cfedf | MATLAB | 5,701 | 183 | function cycles_and_criteria(DataBroadband, SampleRate, DataNarrowband, ...
CycleTable, CriteriaSet, Bursts, KeepTimepoints)
arguments
DataBroadband
SampleRate (1,1)
DataNarrowband = [];
CycleTable = [];
CriteriaSet = [];
Bursts = [];
KeepTimepoints = true(1, numel(DataBroadband));
end
%... |
d740b5ab5c5798030b8423f7f539d94e9b79cf98e03e5215584892f3562358f5 | MATLAB | 5,701 | 178 | function fig5_shortest_path(folder, save)
%% Figure 5: Shortest path pathlength
% Bilateral dist matrices
% Total in/output per node for ipsi/contra hemispheres
% Ratio between input/output per node
% Average projection density between brain regions and hemispheres
%% Load
if nargin == 0
folder = 'All';
end
load(... |
2a24f856dfa80b09ae53279a04d57ca04049968013016ba3239580e6c7cf3415 | MATLAB | 5,704 | 128 | function [erp, synch_eeg, trigger_time_sec, time_vec, varargout] = trigger_avg_erp(eeg, fs, freq_band, onset_time, varargin)
%
% [erp, synch_eeg, trigger_time_sec, time_vec] = trigger_avg_erp(eeg, fs, freq_band, onset_time)
% [erp, synch_eeg, trigger_time_sec, time_vec, synch_emg] = trigger_avg_erp(eeg, fs, freq_band,... |
1e4068d18124d38b466405eb02b9e9e137b745becf8b3b80d1cb7107dac34811 | MATLAB | 5,705 | 151 | 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... |
12e23b81ec2655dc9950ba059240044e4ff756bda00d5a2a81a917ec9e7d4242 | MATLAB | 5,707 | 123 | function [LtWFR,RtWFR]=function_W2_Pattern_3_20200302(LtouchUnit,RtouchUnit)
LtouchUnitPositive= LtouchUnit(:,[1:6]);
RtouchUnitPositive= RtouchUnit(:,[1:6]);
%Ltouch
for x=1:length(LtouchUnitPositive(:,1));
if LtouchUnitPositive(x,[2:6])==[1,1,0... |
1da9a27083fdc31986f34e07f16bf38791e878a27f0ddcfb9a8a1f2618947fd1 | MATLAB | 5,715 | 200 |
function log_joint_prob = compute_joint_state_observation_prob( PI_0, A, CHMM_GMM_Param, Y_in, X)
%Initializing all parameters
C = size(Y_in , 1);
Dim_Observation = zeros(C , 1);
State_Numbers = zeros(C , 1);
Num_GMM_Component = zeros(C , 1);
for zee = 1:C
Dim_Observation(zee,1) = size( Y_in{zee,1} ,... |
96d7b524e5ab97384640d72a8c688668fe040fd1657682e709a2527c78e8816e | MATLAB | 5,721 | 172 | function [c1, c2, A, B, C, D, CHI_lag, reconU] = dynfit_pcaN_laguerreN_3(U,Y,shifts,TAU_SCALE)
if(nargin<4)
TAU_SCALE = 1;
end
lambda = 0;
idx1 = 1:floor(length(U)/2);
idx2 = (floor(length(U)/2)+1):length(U);
U1 = U(idx1);
Y1 = Y(idx1);
U2 = U(idx2);
Y2 ... |
39c7b1fecd7c2129b41f2fafa5ff0c020c94f08aff52b5ff4bea6113d01b1beb | MATLAB | 5,723 | 178 | % 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,... |
adcfc6cbaa96722bc68c00fe80686e85467237bc1acaf6a9858e39afb4a8783c | MATLAB | 5,725 | 172 | function [c1, c2, A, B, C, D, CHI_lag, reconU] = dynfit_pcaN_laguerreN_3_noZ(U,Y,shifts,TAU_SCALE)
if(nargin<4)
TAU_SCALE = 1;
end
lambda = 0;
idx1 = 1:floor(length(U)/2);
idx2 = (floor(length(U)/2)+1):length(U);
U1 = U(idx1);
Y1 = Y(idx1);
U2 = U(idx2);
... |
51fcecb6abaf7176065fdbe5e724d751e9e0cd246a0db122885c3f09a1e54aa4 | MATLAB | 5,730 | 205 | clear
close all
clc
% load ECG1
% s = data;
%
load ECG2
s = data(14, 1:end);
% load ECG3
% s = data(2, 1:end);
% s = resample(s, 0.3*fs, fs);
% fs = 0.3*fs;
s = LPFilter(s - LPFilter(s, 1.0/fs), 100.0/fs);
s = s(:);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% warning('off', 'MATLA... |
d7356353fd4fcb880b7579d570cfb6a0dfdbb0a141477500954062a2a003aa63 | MATLAB | 5,730 | 186 |
%{
----------------------------------------------------------------------------
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... |
0a1ca3927a05f607fd32a1d23af1b91f11a60c5117f844d6f7cc1a809a12ef31 | MATLAB | 5,738 | 157 | function [outFiles] = convertMNI2FSWithMask(inFile)
% Projects thresholded volumetric data into FreeSurfer fsaverage space.
%
% This function resolves issues with projecting thresholded volumetric data into
% surface space by using binary masks to account for voxels excluded during
% thresholding. It calculates a sur... |
d69ec47227f19901c683846ce5b400a4f8958b729347b44ea6f2d7ca2cc0ebd0 | MATLAB | 5,747 | 157 | %
% 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... |
cf3aaf5f59df70bf7c9fa712129fb50e652de700d4e8dfbb6acd81c1e607768b | MATLAB | 5,749 | 150 | clear
[file, path] = uigetfile('*.mat');%When the user clicks the load data button, a window should open to enable the user to select a file.
datafile = fullfile(path, file); %save path
load(datafile)
close all
clc
binsize = 0.1;
downsampling = 5;
nac_colores = {'c','k', 'm', 'r', 'g', 'y'};
dark_colors = {[0.3010 0.74... |
6094f0cbf7cadc14e63bcb2d041e60321eb5508b0a6210a83d18168817b9aa2f | MATLAB | 5,753 | 163 |
%{
----------------------------------------------------------------------------
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... |
c9d7f9c54829dafd86ab141b1f41cfa5e5ee5f07ae34cb154522e17a01e177d1 | MATLAB | 5,753 | 167 | % %%
% cd("I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\pupil_dilation\both_all_tables")
% all_ints_data_before = load("all_ints_data_before.mat");
% all_ints_data_before = all_ints_data_before.all_ints_data;
% all_ints_data_before.key = cellfun(@(x, y) [x(1:10) y], all_ints_data_before.file_name, all_ints... |
b89a0e48bb72fad40c3330d97a33fbdf762ea6913cc3090a0ee814e7290099fc | MATLAB | 5,764 | 232 | function st = newfft_table_init(st, varargin)
%function st = newfft_table_init(st, varargin)
%|
%| Initialize structure for d-dimension NUFFT using table-based interpolator,
%| This should be called only by newfft for its 'table0' or 'table1' mode!
%| Note: default oversample factor is 2^11 or 2^13
%|
%| in
%| st str... |
91de24c5acf46f885ef4fac816a95e3b7414dbfb6c1ab230e1562a018357287e | MATLAB | 5,766 | 151 | function append_pdfs(varargin)
%APPEND_PDFS Appends/concatenates multiple PDF files
%
% Example:
% append_pdfs(outputFilename, inputFilename1, inputFilename2, ...)
% append_pdfs(outputFilename, inputFilenames_list{:})
% append_pdfs(outputFilename, inputFilenames_cell_or_string_array)
% append_pdfs output.pdf in... |
e2a9067a82addea485983bf9cfbf361f0ed1b17f8efc9094a92025fc70e4448c | MATLAB | 5,772 | 143 | function [erd_area, ers_area, quant_erp] = erp_quantification(erp, fs, trigger_time, varargin)
%
% [erd_area, ers_area, quant_erp] = erp_quantification(erp, fs, trigger_time)
% [erd_area, ers_area, quant_erp] = erp_quantification(erp, fs, trigger_time, ref_per, cof_intv)
%
% ******************************************... |
2defab42fc090aea6d08941a29ae099ac2fa06b72c697ab65ac9b983d7b4533c | MATLAB | 5,773 | 167 | function cropImages(inFiles, fig)
% Removes the largest connected background region from images.
%
% This function processes a set of input images and crops them to remove
% the largest connected component of background pixels. It is designed
% to handle images with complex objects (e.g., brain maps) set against
% sing... |
7970d5876ca17b1618f98818766423c66f4ff106d32316794a1d3014534619e4 | MATLAB | 5,777 | 145 | function sRes = assignClusters(dRes, sRes, hCfg)
%ASSIGNCLUSTERS Given rho-delta information, assign spikes to clusters
sRes = computeCenters(dRes, sRes, hCfg);
sRes.spikeClusters = [];
% do initial assignment
hCfg.updateLog('assignClusters', sprintf('Assigning clusters (nClusters: %d)', numel(sRes... |
5b908c92d5831b24316ea6b39218d3a71ac59752bd9cddfee9c7dc95d615f108 | MATLAB | 5,780 | 146 | function [M, TF] = padcat(varargin)
% PADCAT - concatenate vectors with different lengths by padding with NaN
%
% M = PADCAT(V1, V2, V3, ..., VN) concatenates the vectors V1 through VN
% into one large matrix. All vectors should have the same orientation,
% that is, they are all row or column vectors. The vectors... |
d57b883e291c404e9e6c26bb85d1435fa2c083fb4dcdbed5bcd40a3e2a46aee1 | MATLAB | 5,781 | 182 | %%% Revision materials script (c) 2024 %%
%%% This additional script helps generate some of the results requested by
%%% reviewers that are included in the supplementary materials.
%% Classification results when regressing out the effects of confounding
%variables of age and gender
matter = 'WM'; %can change ... |
2f775342e071c9309965d8c2abd271fe83905a598ae044279ccca3b242303815 | MATLAB | 5,790 | 159 | %{
----------------------------------------------------------------------------
Analyzing behavioral data
At least for the correct rate
----------------------------------------------------------------------------
%}
function Figure1b_Dual_behave_analysis_block1_200706_plot5_precise2
close all
% data = a04_2... |
d3fc92cdb1cb5efbbdf5c06a0184f747fe44b781f1e566d1ccf66a63c2c7333c | MATLAB | 5,790 | 183 | function [data, fs] = read_samp(record)
% read WFDB .dat file without WFDB library support.
% see https://physionet.org/physiotools/wag/signal-5.htm for more reference
%
% input:
% record: WFDB data record name
%
% output:
% data: waveform data
% fs: sampling frequency
%
% Wri... |
fa16ea04cef8ac7b57b058446134d799f2803570d90a477f3e0112edd9ce3da5 | MATLAB | 5,790 | 156 | close all;
clear;
clc;
% parameters
subject = {'Dog_1', 'Dog_2', 'Dog_3', 'Dog_4', 'Dog_5', 'Patient_1', 'Patient_2'};
% subject = {'Patient_1', 'Patient_2'};
epochlen = 15; % epoch length in seconds
epochoverlap = 5; % overlap between epochs in seconds
sourcenum = 3;
x = [];
for m = 1:length(subject)
path = ['E:... |
e55726a679f4dca5e479a78a0985a9de63c5db239bec88f55b72ad4debfa7c1e | MATLAB | 5,795 | 165 | function fname_csv = abcd_check_eprime_sprdsh(fname,cols,fields,outdir,forceflag,verbose)
%function fname = abcd_check_eprime_sprdsh(fname,[cols],[fields],[outdir],[forceflag])
%
% Purpose: Reads an ASCII file containing an E-Prime spreadsheet.
% Extract contents while fixing encoding and format issues.
% ... |
622680b473d9de165947641e8f164d22948bc0b04c9a98991a925aa71426d699 | MATLAB | 5,802 | 170 | %% Graph two groups of traces
function [testStats pvals sigIdx sigP] = graphSetsOfAverageTracesNew(treatTraces, nullTraces, sortWindow, clims, test, span, binLengthStart, binLengthEnd, yLimits, behaviorName, treatment)
% treatTraces = allTracesTreat; %data to analyze
% nullTraces = allTracesNull; %data to analyze
%... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.