sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
e00bc1dbf1c5fa9e8bb00b24cdaa5a57f205edb8631f9870554c47b628cb4c4e | MATLAB | 46,669 | 903 | %% Confocal_ConfocalAnalysis_Population
% This script pools the data across all animals for both social phenotypes
% and imaging depths. Divided into certain stimulus combinations, it plots
% the respective activity time courses with corresponding swarm/violin
% plots, the Bliss interaction score analysis results, a... |
896e9ba63bb017dce5ffb65b85459f9356d406fcc9156f91858ed0448f20bc01 | MATLAB | 46,984 | 932 | function [output] = Preproc_HCPData_PostMinPreproc_TaskRest_FIR(SUBJECTLIST)
% This function runs preprocessing and GLM analysis, after the HCP minimal preproccessing pipeline has been run.
% It is designed to parcellate a dataset into a set of regions, which are then preprocessed.
%
% Preprocessing steps included:
% ... |
1098dceebce1a56e3f2e0d270dd78a11319a02a8f3dbcdd2bcff7691b1358c41 | MATLAB | 46,991 | 1,307 | function varargout = DimReduce(varargin)
% DimReduce
%
% Future work:
% - Change the handles.alg number. It's confusing when LDA is included or
% not included. (right now, LDA alg==4, and GPFA alg==5) with noLDA flag
% - Allow modular functions to be added. Need to make sure added
% functions conform to ... |
a5b8d35675bf615ec6dde5db882fed5b798f955375fa9020c48566b343882883 | MATLAB | 48,919 | 1,183 | function [varargout] = patchOverlay(brainFig, allData, underlays, hemi, varargin)
% patchOverlay Patches scalar data onto an existing brain surface.
%
% This function overlays scalar data (e.g., curvature, activation values) onto
% an existing brain surface visualization. It supports overlaying data on the
% left and/o... |
a7b7f899709ab5f22b713fdc54c10deb3c9a8495a6dcd948edb200093b621332 | MATLAB | 49,130 | 1,204 | function timingReport = reconstructSiemensSPACEvolume(twix_obj,reconPars)
% function timingReport = reconstructSiemensSPACEvolume(twix_obj,reconPars)
%
%
% -- July 2026, gallichand@cardiff.ac.uk -> major overhaul for v1.0.0dev
% see retroMocoBoxVersion.m for more info
retroMocoBoxVersion = reconPars.retroMocoBoxV... |
9c9eb84a53d87ae5c33c2fe6aa78b6d80f922591193ec5fd6f53e0e90f75e7e8 | MATLAB | 49,300 | 1,066 | function SessionSpikeAll20180625
clear all;
close all;
global FigureSave ShowFig
cd('C:\Users\B133_2\Desktop\CheetahWRLV');
FigureSave=1;
ShowFig=1;
H=ls;
disp('H=');
disp(H);
for n=1:length(H(:,1))
TrimStr1=strtrim(H(n,:));
if ~strcmp(TrimStr1,'.') && ~strcmp(TrimStr1,'..')
cd(['... |
8bf834a423640c5e634da578c843f4b5ea0252404858da1d3d32935e9c99ccb2 | MATLAB | 49,986 | 849 | function Repeat_Repeat20220316
global RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 pegpatternum ...
LtPositiveFiringRate RtPositiveFiringRate LtPositiveFiringRateP1 RtPositiveFiringRateP1 LtStep4FiringRate RtStep4FiringRate Spikeposition Windowinterval ...
LtStep3FiringRa... |
96be5a21893d91ebe620179e1df4537c9be1131283dbbc1b31b97a0b9a436290 | MATLAB | 50,781 | 1,176 | %% License information
% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
% This program is distributed in the hope that it will ... |
2f49e010ddb3b7ad2daca92e8b13939bb99d7ed4d1e41c9a88bd4857516aa794 | MATLAB | 51,259 | 1,529 | classdef HRV
%Heart Rate Variability
%Continuous measurement for long and short term RR Intervals. All available
%methods uses matrix operations as far as possible, to obtain local HRV
%measures for long sequences of RR intervals. Missing values will be
%accepted.
%
% Available HRV methods:
% SDSD - Compute sta... |
9703854584fd3266b8e35d10d70958799d5900661bd824f1191a981f7ef02e67 | MATLAB | 51,673 | 981 | function LtPeakTouch
global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 W123rate TouchCount pegpatternum ...
LtTouchCount LtSpike_TouchRate LtSpikeFR_Bin LtTouchCount1 LtTouchCount2 LtTouchCount3 LtTouchCount4 LtSpike1FR_Bin LtSpike2FR_Bin LtS... |
f6946b503a17cf349bff81cb7e62b3c8d24858608bed2af78912fea6fafeca04 | MATLAB | 52,187 | 1,086 | function SessionSpikeAll20180628
clear all;
close all;
global FigureSave ShowFig
CoreDir='C:\Users\B133_2\Desktop\CheetahWRLV20180729';
cd(CoreDir);
FigureSave=1;
ShowFig=1;
H=ls;
disp('H=');
disp(H);
for n=1:length(H(:,1))
TrimStr1=strtrim(H(n,:));
if ~strcmp(TrimStr1,'.') && ~strcmp(T... |
4fe23def5e26021767263c0e41ba598183d2d80805b4310d06b9dc9c368a4c22 | MATLAB | 52,386 | 1,092 | function SessionSpikeAll20180628
% clear all;
close all;
global FigureSave ShowFig
CoreDir='C:\Users\C238\Desktop\CheetahWRLV20180729';
cd(CoreDir);
FigureSave=1;
ShowFig=1;
H=ls;
disp('H=');
disp(H);
for n=1:length(H(:,1))
TrimStr1=strtrim(H(n,:));
if ~strcmp(TrimStr1,'.') && ~strcmp(T... |
2666beebe403785a8133d1fb6f67e08c070cd6bb50aec293b44a028a5c9a11df | MATLAB | 52,393 | 1,091 | function SessionSpikeAllhiro20200122
% clear all;
close all;
global FigureSave ShowFig
CoreDir='C:\Users\C238\Desktop\CheetahWRLV20180729Part1';
cd(CoreDir);
FigureSave=1;
ShowFig=1;
H=ls;
disp('H=');
disp(H);
for n=1:length(H(:,1))
TrimStr1=strtrim(H(n,:));
if ~strcmp(TrimStr1,'.') && ~s... |
c4ccae32fa6d92297ed346f27e7b9ae3a0646e915beb814fcfb8a4c88369f2f7 | MATLAB | 52,672 | 895 | function [ OUT ] = MEG_SR_Beam_LBPD( S )
% Function to run the several steps required for source reconstruction
% using a beamforming algorithm.
% The algorithms used here are based on work of other brilliant people and
% I do not want to take any credit for that. This function was created simply
% to handle several s... |
9016ed45bf3d69eab122f02529b9598655e0cd7a9c1e74b2f50d6704001fbb0f | MATLAB | 53,010 | 873 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/sub-20146/ses-3/anat/sub-20146_ses-3_run-1_... |
02255bf7af7cf8262f34fb5168aa9a48047c717d916f1bf93c3067f0349eddb5 | MATLAB | 53,362 | 1,144 | % Author: Jan Hirtz - 2023
% based on concepts published in Beathellier et al. (2012): Discrete Neocortical Dynamics Predict Behavioral Categorization of Sounds. Neuron 76: 435–449
% allows for multiple sound cartegories to be stacked for analysis
% performs analysis of up to two experimental days to allow for... |
4300c68e2548eec226cf31088937745bb80a6aa8fb052490a5796e6c7f4070b3 | MATLAB | 53,537 | 1,319 | function varargout = wave_clus(varargin)
% WAVE_CLUS M-file for wave_clus.fig
% WAVE_CLUS, by itself, creates a new WAVE_CLUS or raises the existing
% singleton*.
%
% H = WAVE_CLUS returns the handle to a new WAVE_CLUS or the handle to
% the existing singleton*.
%
% WAVE_CLUS('Property','Value'... |
a07fa151b264ffcf1f4bcc00b64c81ae7038a878a803c6dcb5134a2a1cbc95a8 | MATLAB | 53,628 | 1,318 | function varargout = wave_clus(varargin)
% WAVE_CLUS M-file for wave_clus.fig
% WAVE_CLUS, by itself, creates a new WAVE_CLUS or raises the existing
% singleton*.
%
% H = WAVE_CLUS returns the handle to a new WAVE_CLUS or the handle to
% the existing singleton*.
%
% WAVE_CLUS('Property','Value'... |
922551cabcc774042a3b42f170e0f2e343348ea07b5d93cdcc41cd7be9894174 | MATLAB | 53,959 | 1,082 | % Author: Jan Hirtz - 2023
% based on concepts published in Beathellier et al. (2012): Discrete Neocortical Dynamics Predict Behavioral Categorization of Sounds. Neuron 76: 435–449
% allows for multiple sound cartegories to be stacked for analysis
% excluded reps with animal running
% but only sound, not cel... |
90778196ca8d77c3294a7faed82b22e1c03f4474e54089fa90a3ae034f8eed30 | MATLAB | 54,035 | 1,217 | function timingReport = reconstructSiemensVolumeTCL(twix_obj,reconPars)
% function timingReport = reconstructSiemensVolumeTCL(twix_obj,reconPars)
%
% Called by reconstructSiemensMP2RAGEwithTCL.m to reconstruct a
% specific 'average' or 'repetition'.
%
% July 2018, gallichand@cardiff.ac.uk
retroMocoBoxVersion = reconP... |
3eab6306920da5dcdeb84795d3763690bf58224d687e07afcb3cf8699bd0daa4 | MATLAB | 54,469 | 1,272 | %% Modified Sept 2013 -> Added variable 'inOffset' that adds to the input data effectively shifting
%% the curve. This variable is not saved in the experiment files to avoid running
%% into version problems. It is however saved in the config file. The shifting
%% ... |
e5633356ddcae7ba7c75adb99b496704667091f5df67c6efb698c722711ff6db | MATLAB | 54,509 | 1,761 | %% CBI inputs
Iinj_CBI2 = 2.5*1.5;
Iinj_CBI3 = 2.5*1.5;
Iinj_CBI4 = 0;
%% Exteroceptive inputs
lipsmech = 1;
lipschem = 1;
graspermech = 0;
%% activation function
V_max = 130/3; % mV
V_min = 5; % mV
thetarinf = 43.5; % mV
sigmarinf = 2.5; % mV
%% CBI2
% capacitance of CBI2
Cm_CBI2 = 0.01; % uF
% leaky conducta... |
f35070a40ddf5db01e16c67a321b5aa85759593c2f68dfc7fd4ff79a2ca1db13 | MATLAB | 55,493 | 1,019 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/NeuroIMAGE_4020830_1/anat_1/NIfTI/re... |
f9ed8f40745285a36dc8b4ddc06841e28a4754013cdcbdfccef6f35e0304c7a2 | MATLAB | 55,812 | 1,371 | classdef imtool3D < handle
%This is a image slice viewer with built in scroll, contrast, zoom and
%ROI tools.
%
% Use this class to place a self-contained image viewing panel within
% a GUI (or any figure). Similar to imtool but with slice scrolling.
% Only designed to view grayscale (inte... |
aad6f31389a1ccf5595dcd4bab38667defc3d1a81d7ad3eafd00387c628ceba8 | MATLAB | 55,943 | 1,227 | % this script calculates the average value of Free Water fraction in
% selected WM tracts and brain tissues in the pool of HC and MS pts
% and the correlations bw FWF and clinical and neurobehav scores
clearvars
close all
addpath(genpath('/storage/stella/MATLAB_toolboxes/'));
addpath('/storage/stella/Analysis/matlab_sc... |
5f139a5606ccea04ece00d421caa88993685027786eef1e9ab6ac24210b8a288 | MATLAB | 56,003 | 1,180 | function SessionSpikeAll20190510
% clear all;
close all;
global FigureSave ShowFig RinterindexArrayBgra LinterindexArrayBgra RinterindexArrayCx LinterindexArrayCx dpath3
CoreDir='C:\Users\C238\Desktop\CheetahWRLV20180729Part3';
cd(CoreDir);
FigureSave=1;
ShowFig=1;
H=ls;
disp('H=');
disp(H);
for ... |
88089e30a51dfdd127acca7499588e03bde587dfe6e6989be44159de5c485e15 | MATLAB | 56,141 | 1,228 | % this script calculates the average value of Free Water fraction in
% selected WM tracts and brain tissues in the pool of HC and MS pts
% and the correlations bw FWF and clinical and neurobehav scores
clearvars
close all
addpath(genpath('/storage/stella/MATLAB_toolboxes/'));
addpath('/storage/stella/Analysis/matlab_sc... |
d060a8e043ff37688dac4e9121e5883779e788bd622ea9b875046aa98e701149 | MATLAB | 56,274 | 1,278 | %% ConfocalAnalysis_OdorSpace
% This script applies a deeper analysis of the population data extracted by
% ConfocalAnalysis_Population. The three major aspects are (i) the
% clustering of odor response vectors, (ii) the clustering of odor response
% motifs, (iii) and an analysis of how informative the dynamics of moti... |
82667d538de12c1f49f5de9c325068d5d2d68007d40121308af1503b7ad2f915 | MATLAB | 57,862 | 1,261 | function [imageData, alpha] = export_fig(varargin)
%EXPORT_FIG Exports figures in a publication-quality format
%
% Examples:
% imageData = export_fig
% [imageData, alpha] = export_fig
% export_fig filename
% export_fig filename -format1 -format2
% export_fig ... -nocrop
% export_fig ... -c[<val>,<val>,<val... |
1171e116dec39ec616c936beb12dbc5768ca94176f153bccce7553884e0c8bda | MATLAB | 58,544 | 1,100 | function touch_lick_phase
global FigureSave ShowFig dpath3 Both_modnum_L Both_modnum_R All_modnum SignificantNeuron_L SignificantNeuron_R SignificantNeuron_3d
CoreDir='C:\Users\C238\CheetahWRLV20220213';
cd(CoreDir);
FigureSave=0;
ShowFig=0;
% Drink_modnum = 0;
% Touch_modnum = 0;
Both_modnum_L = 0;
Both... |
33f4f9cffbff741583f2ac3edc853322dd8fade0c99345b144d67bec10569c5e | MATLAB | 59,144 | 1,193 | function SessionSpikeAll20190712
%%% For striatum analysis
close all;
global FigureSave ShowFig RinterindexArrayBgra LinterindexArrayBgra RinterindexArrayCx LinterindexArrayCx dpath3...
MaxA1Rt_count MaxZR_count MaxA2Lt_count MaxZL_count MaxADon_count MaxZ_count ZFreq_Int_dist ZFreq_Ph_dist ZFreq_Int_dist_All... |
ce022cc4fb44bb8e5f24392cf8f3e4cb999bebca0baf1904ec5ebd12cac2a3e4 | MATLAB | 60,383 | 1,100 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/ONRC_28699_1/anat_5/NIfTI-1/anat.nii... |
6a7dd86cea92b2999765c30202042f6f9f5da5923447b0636096b23152744c29 | MATLAB | 61,046 | 1,248 | function SessionSpikeAll20230425
%%% For cortex analysis
% clear all;
close all;
global FigureSave ShowFig RinterindexArrayBgra LinterindexArrayBgra RinterindexArrayCx LinterindexArrayCx dpath3...
MaxA1Rt_count MaxZR_count MaxA2Lt_count MaxZL_count MaxADon_count MaxZ_count ZFreq_Int_dist ZFreq_Ph_dist ZFreq_... |
c40a54749f8da0c87e6079e814eaca6c335dc6859507440738e7b841dfc67e2d | MATLAB | 61,962 | 1,550 | function [dat] = ft_read_data(filename, varargin)
% FT_READ_DATA reads electrophysiological data from a variety of EEG, MEG and LFP
% files and represents it in a common data-independent format. The supported formats
% are listed in the accompanying FT_READ_HEADER function.
%
% Use as
% dat = ft_read_data(filename, ... |
76eb252ba144725aff2fa6f4c64fc0037e1a5fe4547a1b1d7f8fb770f9415466 | MATLAB | 62,070 | 1,311 |
classdef SubFcn
properties
end
methods(Static)
function xyShifts = dftregister(fft_template, fft_frames, maxShift)
% Register frames using Kuglin and Hines phase correlation method
%
% function xyShifts = dftregister(fft_template, fft_frames, maxShift)
... |
ac940d49a69c5885733532d3dee6a100bee94c29d6bacd384e3ff4f441a53287 | MATLAB | 63,555 | 1,046 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/sub-10001/ses-1/anat/sub-10001_ses-1_run-1_... |
379c3f5e8c140f81d53afe5a8990ef21815dd4f4e4c95d59ab86408e65633bf0 | MATLAB | 64,402 | 1,057 | %%Prerequest
%1.neural index data generated from
%'evaluate_valenced_selectivity_byBAKS.m' and 'evaluate_cue_selectivity_byBAKS.m'
%make sure the save order
%'Neuron_index'>'valence'>'wsq'(session)>'IC'(brain region) is correct
%2.spike data and behavioral data (make sure the part name (end-16:end-4) of
%spike da... |
def91c96096128133d1753d316514c1bb5bafd2d5a6f2de61b74c23191928239 | MATLAB | 65,555 | 1,324 | % compute width etc. for single cluster EPSP
datarange = 64:69;%1:length(data);
%%
for i = datarange
if isempty(data(i).EPSP_singleclust)
continue
end
data(i).amp_single = [];
data(i).halfwidth_single = [];
data(i).maxdv_single = [];
data(i).area_single = [];
data(i).risetime_single... |
cf6c8d757ff7bd4bf73217c38ab76a76952722d2d9691b24a0493060ca2480c0 | MATLAB | 66,464 | 816 | function [output] = Preproc_HCPData_PostMinPreproc_TaskRest_BasisHRFModel(SUBJECTLIST)
% This function runs preprocessing and GLM analysis, after the HCP minimal preproccessing pipeline has been run.
% It is designed to parcellate a dataset into a set of regions, which are then preprocessed.
%
% Preprocessing steps in... |
b38f947a758b8f363172cbdbb572b7f3821f1d0554139f6dd58075ae95093c0a | MATLAB | 67,750 | 1,977 | function varargout = DataHigh_engine(varargin)
% Usage: DataHigh_engine(D, ...)
%
% INPUT:
%
% D: struct 1 x numTrials
% data [neurons/latent variables x data points]
% type ['traj', 'state'] (optional field for DimReduce)
% condition [condition identifier in String format] (optional)
% epochStarts... |
a4af618b540464bec20586e138b9b535449a99508746da8373e5d839760e0e16 | MATLAB | 68,739 | 1,497 | function [type] = ft_filetype(filename, desired, varargin)
% FT_FILETYPE determines the filetype of many EEG/MEG/MRI data files by
% looking at the name, extension and optionally (part of) its contents.
% It tries to determine the global type of file (which usually
% corresponds to the manufacturer, the recording syst... |
da67b5629cee1e4c6e1897915217dc0d6bc3c11a3f5e68771ca734430ae2d15f | MATLAB | 71,008 | 1,320 | function [peaks, peak_indexes, peak_indexes_consensus, qrs_likelihood] = peak_det_likelihood(data, fs, varargin)
% function [peaks, peak_indexes, qrs_likelihood] = peak_det_likelihood(data, fs)
% A probabilistic R-peak detector based on local peak setection and
% refinement using multiple methods
%
% NOTE: Under develo... |
fcdb96a8687e6a18b2741ebb32a3a19335cd14d04c96214eb9b632b1df13e428 | MATLAB | 72,078 | 1,195 | % Cardiac model ToR-ORd
% Copyright (C) 2019 Jakub Tomek. Contact: jakub.tomek.mff@gmail.com
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the Licens... |
d14652b17705d1302fc778893adda5f16a3e291b1b4c461fb30b9b30e6be2ba8 | MATLAB | 72,541 | 1,729 | function data = TDTbin2mat(BLOCK_PATH, varargin)
%TDTBIN2MAT TDT tank data extraction.
% data = TDTbin2mat(BLOCK_PATH), where BLOCK_PATH is a string, retrieves
% all data from specified block directory in struct format. This reads
% the binary tank data and requires no Windows-based software.
%
% data.e... |
86efe81beac3038e26a871fef0d3551868a065fc0b680db9f8419b0589917a09 | MATLAB | 76,280 | 1,898 | function viewer_end_state = wave_viewer(y,varargin)
% function [viewer_end_state] = wave_viewer(y, [options...])
% if output arg viewer_end_state is provided, wave_viewer() will start blocked, otherwise command prompt is returned
% signal processing options (with default values shown):
% 'fs', 11025, ...
% 'ms_fram... |
690bfadfd19c68debe1dfcf45aee2978e3670184ca61bbd1c4afd0e98e9ed0de | MATLAB | 77,727 | 1,654 | function timingReport = reconstructSiemensMPRAGEvolume(twix_obj,reconPars)
% function timingReport = reconstructSiemensMPRAGEvolume(twix_obj,reconPars)
%
% Called by reconstructSiemensMP2RAGEwithFatNavs.m to reconstruct a
% specific 'average' or 'repetition'.
%
%
% -- July 2026, gallichand@cardiff.ac.uk -> major overh... |
fd5866d8087888f8b7e6eef1889e416e63b7db7a73aa532485a40faef72195c1 | MATLAB | 81,564 | 2,149 | %% description
% function [theText, rawN, x] = nhist(cellValues, 'parameter', value, ...)
%
% NHIST(x); works just like hist(x) but the resulting plot looks nice.
%
% t = NHIST(Y) bins the elements of Y into equally spaced containers
% and returns a string with information about the distributions.
% ... |
afe34f33159d47ce7acec6361276c91b8e21fec3b281f4b65279d9dcaa0cb267 | MATLAB | 81,768 | 1,664 | function scrollHandles = scrollplot(varargin)
%SCROLLPLOT add scroll sub-window to the supplied plot handle
%
% scrollplot adds a scroll sub-window to any supplied plot handle(s).
% The user may specify initial view window parameters or use defaults.
% Dragging the side-bars or central patch modifies the respecti... |
87464451e6a7a267aa390dbfeb7d18cc3f9de2e49ab9ba9afd6e031b5a803e89 | MATLAB | 81,887 | 2,107 | clearvars
addpath ./Violinplot-Matlab-master/
addpath .\BrainPlots
badtrl = 0
if badtrl
results_dir = '.\Figs_badtrl\';
load TFS_RESULTS_BETA_badtrl.mat
load AEC_RESULTS_badtrl.mat
load HMM_RESULTS_badtrl.mat
load('Evoked_traces_badtrl.mat',"grp_mean_evoked*index","grp_mean_evoked*pinky","g... |
22d93f6f59554e93cf532b2643dcfb20ad35a4c29b637fab27b58b13699c6dc6 | MATLAB | 82,040 | 2,154 | %% description
% function [theText, rawN, x] = nhist(cellValues, 'parameter', value, ...)
%
% NHIST(x); works just like hist(x) but the resulting plot looks nice.
%
% t = NHIST(Y) bins the elements of Y into equally spaced containers
% and returns a string with information about the distributions.
% ... |
2fb9f96e79658ee6b90542997013a21cce3812a202311dcf6cef492a85fd8156 | MATLAB | 82,048 | 2,154 | %% description
% function [theText, rawN, x] = nhist(cellValues, 'parameter', value, ...)
%
% NHIST(x); works just like hist(x) but the resulting plot looks nice.
%
% t = NHIST(Y) bins the elements of Y into equally spaced containers
% and returns a string with information about the distributions.
% ... |
8cd0570e68346ef262d2df60cfb372df17888209c2a1b09cd9066fa9db436b4e | MATLAB | 83,184 | 1,453 | % To be run after Cluster_analysis_pipeline_over_days code, performs additional
% analyses and statistics
%intended to be used one one group of animals, that is compared between two
%days
% Field 0 is not the combination of all FOVs in different subfields, but in
% case no subfield parcelation was selected
... |
f0ac9ef8602d0a6146d18ceec65b000b81b77e38ce500105094465cc00b387c2 | MATLAB | 84,729 | 1,423 | function [refpts_10_5, refpts_10_5_txt] = DOTHUB_getTen5points(surf,refpts)
%
% USAGE:
%
% [refpts_10_5 refpts_10_5_txt] = get_10_5_pts(surf,refpts)
%
% INPUTS:
%
% surf - Array of vertices of the head surface.
%
% refpts - A set of 5 landmark points in the order: Nz, Iz, Ar, Al, Cz
% whe... |
964500b30fbd746304229df2f58223e73ccfd7c5d522a6874bc69b5f17de4119 | MATLAB | 86,801 | 1,474 | % To be run after Cluster_analysis_pipeline code, performs additional
% analyses and statistics
% Field 0 is not the combination of all FOVs in different subfields, but in
% case no subfield parcelation was selected
clearvars;
animals_in_group_1 = {'animal_1','animal_2','...'};
animals_in_group_2 = {'ani... |
18ffe794d42b6a4ce8e0776f5a6107c736709b35616f0255c2bf18c7b29daab9 | MATLAB | 87,234 | 2,274 | %----------------------------------------------------------------
%HERA: Heart Rate Analysis v0.07 beta April 2020
%
%(c) 2008-2020 Erno Hermans & Thijs vd Laar
%----------------------------------------------------------------
%v0.02: fixed check for wavelet manager
% fixed use of nanmean (statistics toolbox): r... |
cff7a9c4cc71c001e38fb858b0a9a75a8c518c597a3e7159d7cef5b071b89ec0 | MATLAB | 88,421 | 3,044 | % Estrazione di variabili e funzioni dal DataMatrix globale
clear all
clc
load tipo.mat
% dc = questdlg ('Do you create the datamatrix?');
%
% if dc == 'No'
%
% %helpdlg ('Create the datamatrix going on Plot Variables --> Datamatrix Creation')
% creation;
%
% else
% datace;
olddir = pwd; %così ... |
bfb8aeae9a44c6fe2a771aef6b1bf5c892379e3efc3a81cacf6b063ff16213ad | MATLAB | 88,775 | 1,706 | function [fk,fsc,fscmx,maxVars,alpha,lam,scores,oid,ctr,mdl,ep,empMaxVars,thresh,numFalsePos,allScores] = stabSel(X,y,varargin)
%
% Identify a stable set of features in your data using the framework of
% stability selection.
%
% Call: [fk,fsc,fscmx,maxVars,alpha,lam,scores,oid,ctr,mdl,ep,empMaxVars] =
% stabSel(X... |
57d33f09a30822a377c5ea405925e6a8ae4ee6d26a4d69aa8780ee5f09b46fb3 | MATLAB | 88,906 | 1,700 | function [fk,fsc,fscmx,maxVars,alpha,lam,scores,oid,ctr,mdl,ep,empMaxVars,thresh,numFalsePos,allScores] = stabSel(X,y,varargin)
%
% Identify a stable set of features in your data using the framework of
% stability selection.
%
% Call: [fk,fsc,fscmx,maxVars,alpha,lam,scores,oid,ctr,mdl,ep,empMaxVars] =
% stabSel(X... |
97515fcd0d2ee8240dda535308b59698e6b165bff1f8e2fe2676d52810133402 | MATLAB | 88,958 | 1,715 | function Repeat3touch
global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 Spike_TouchRate TouchCount pegpatternum RLRcount LRLcount Spike Spike_Bin SpikeFR_Bin
%SpikeArrayÅLPegTouchAllARpegTouchallðACµ½NXRIO
%SpikeArray... |
ea02f7041c1e098278afb606eb38b9fc7736d58c5c51cef431289bb3f30c98dd | MATLAB | 88,993 | 2,164 | function [event] = ft_read_event(filename, varargin)
% FT_READ_EVENT reads all events from an EEG/MEG dataset and returns
% them in a well defined structure. It is a wrapper around different
% EEG/MEG file importers, directly supported formats are CTF, Neuromag,
% EEP, BrainVision, Neuroscan, Neuralynx and Nervus/Nico... |
b114e0ffb33b0504fbff5da7d36a7acceccf80c57c3d80def72e93c20cd9cf0a | MATLAB | 89,111 | 2,898 | function varargout = Ragu(varargin)
%Display of explained variance is sometimes funny
% Ragu M-file for Ragu.fig
% Ragu, by itself, creates a new Ragu or raises the existing
% singleton*.
%
% H = Ragu returns the handle to a new Ragu or the handle to
% the existing singleton*.
%
% Ragu('CALL... |
bdd06f662ef546f4405caa23336a3fa22374a4370717f262f2d71dbd102c869c | MATLAB | 91,607 | 2,182 | % gui_erp() - Open a GUI for visualzing ERP butterfly plots and
% topographies. ERP t-scores, standard error and global field
% power (Lehmann & Skrandies, 1980) can also be visualized. Hold
% mouse cursor over GUI controls for an explanation of what they
% do. Click... |
a25e990f510b12e5a3c2407ec2e65e513e368796262a4444e0471a60e65a5f64 | MATLAB | 92,958 | 2,204 | % gui_erp() - Open a GUI for visualzing ERP butterfly plots and
% topographies. ERP t-scores, standard error and global field
% power (Lehmann & Skrandies, 1980) can also be visualized. Hold
% mouse cursor over GUI controls for an explanation of what they
% do. Click... |
b586919db3677ef14024a84de42e1d0a6ef0a6ba9abe94701adb924cd9bf9fb4 | MATLAB | 94,894 | 2,469 | function viewer_end_state = wave_viewer(y,varargin)
%WAVEVIEWER Acoustic analysis viewer.
% [VIEWER_END_STATE] = WAVEVIEWER(Y, [options...]) If the output argument
% VIEWER_END_STATE is provided, wave_viewer() will start blocked, otherwise command prompt is returned
yes_profile = 0;
if yes_profile, profile on; en... |
c3bd9a39afeab1b0d30072e6e88981866d865cef60b5518f03d63daf3a7ee8bd | MATLAB | 96,874 | 1,879 | function [subject,options] = spmup_BIDS_preprocess(subject, options)
% routine to preprocess BIDS fMRI data following 'options'
% Preprocessing is intented FOR ONE TASK AND ONE SESSION (but multiple runs ok)
% Note that even if EPI-norm is used (because eg no fieldmaps), anat is expected
% to run the segmentation and ... |
20af9a77b335bbeff3259d20acc665eec5854e8d97df697dfd7236758668a1b6 | MATLAB | 101,797 | 2,604 |
function [positions, EXITFLAG] = fiducial_det_lsim(data, ecg_rpeaks_index, fs, varargin)
% ECG fiducial points detector based on LSIM approach
% [positions, EXITFLAG] = fiducial_det_lsim(data, ecg_rpeaks_index, fs, varargin)
%
% Inputs:
% data: Vector of input ECG data
% ecg_rpeaks_index: R-peak index... |
0ec2394aff42a9081ef04b5bc224d1f71ca15b6e6c6a44ad319b96fef67c75d6 | MATLAB | 104,063 | 2,046 | function [imageData, alpha] = export_fig(varargin) %#ok<*STRCL1>
%EXPORT_FIG Exports figures in a publication-quality format
%
% Examples:
% imageData = export_fig
% [imageData, alpha] = export_fig
% export_fig filename
% export_fig filename -format1 -format2
% export_fig ... -nocrop
% export_fig ... -c[<v... |
f62a7fadc89beb3c4578351d7366f5843634fb9b77a580610399be163c169010 | MATLAB | 105,116 | 2,685 | function [hdr] = ft_read_header(filename, varargin)
% FT_READ_HEADER reads header information from a variety of EEG, MEG and LFP
% files and represents the header information in a common data-independent
% format. The supported formats are listed below.
%
% Use as
% hdr = ft_read_header(filename, ...)
%
% Additional... |
aa9c6cff6b25ec8a79df610098056db83e3dfc61cd63c97feca55664cdc577ca | MATLAB | 113,604 | 1,898 | classdef FourCageDecision_SubFcn
properties
end
methods(Static)
function currFile = GetRawData(currFile, SET, IterVar)
% Get data
currFile.Trajectory = readtable([SET.BasePath, SET.Phase{IterVar(1)}, '\', SET.Conditions.cages{IterVar(2)}, '\', currFile.Basename, '_tr... |
c40db8d148189fa9e3cdd0f6d030841bd2b1f88125e1373f4a92e349f7e4c1cf | MATLAB | 113,863 | 2,805 | function Display_Plot(P, Data, Label)
% This function is used to display different plots for quantitative analysis of the data.
for pp=1:numel(P.Data)
if(isempty(P.Data(pp).Points) || isempty(P.Data(pp).Segments) || isempty(P.Data(pp).Vertices) || isempty(P.Data(pp).Axes))
warndlg('Some projects have not bee... |
0392a89a1c07ee628a139fb23542701c52b61a833a6774ef80b3767dbfbcbf0f | MATLAB | 114,662 | 2,785 | function Display_Plot(P,Data,Label)
% This function is used to display different plots for quantitative analysis of the data.
for pp=1:numel(P.Data)
if(isempty(P.Data(pp).Points) || isempty(P.Data(pp).Segments) || isempty(P.Data(pp).Vertices) || isempty(P.Data(pp).Axes))
warndlg('Some projects have not been ... |
eb2d84d162cc5906e11bba1ef1a166ccf8478c22f40cda565d238e464aacd989 | MATLAB | 118,221 | 1,322 | %% RdLight_analysis_combined
% Choose and load the appropriate files for analysis
clear all;
[FPfiles,FPpath] = uigetfile('*.mat','Select FP Files to Analyze','MultiSelect','On');
if isempty(FPfiles)
fprintf('No Photometry File Selected!\n');
else
% If any photometry (.mat) files are selected, then proceed t... |
84092f81d9a5a242ebd299150bd2fad19c996166742846e94c07bd5372537ee1 | MATLAB | 124,800 | 2,998 |
function [positions, EXITFLAG] = ecg_delineate_lsim(data, fs, ecg_rpeaks_index, varargin)
% ECG_DELINEATE_LSIM ECG fiducial points detector based on the LSIM energy approach
%
% [positions, EXITFLAG] = ecg_delineate_lsim(data, fs)
% [positions, EXITFLAG] = ecg_delineate_lsim(data, fs, ecg_rpeaks_index)
% [posi... |
ed60724edb7c461ee784a8f7d73dff26002c68e04f854b4df3ac1097bfab722d | MATLAB | 126,121 | 2,007 | classdef EAG_SubFcn
%FourCageDecision_SubFcn Cointains subfunctions for cage analysis.
% Detailed explanation goes here ...
% Version:
% 17-Mar-2021 (R2020a) Yannick Günzel
properties
end
methods(Static)
function cm_data=ColMapMagma(m)
cm = [[ 1.46159096e-03, 4.6612... |
bed4167b09f595d2a09e5e9c0bff8ecc3f8b3d85a226e5f448c4429eab47410b | MATLAB | 127,356 | 3,045 |
function [positions, EXITFLAG] = ecg_delineate_lsim_long(data, fs, ecg_rpeaks_index, varargin)
% ECG_DELINEATE_LSIM_LONG ECG fiducial points detector based on the LSIM energy approach
%
% [positions, EXITFLAG] = ecg_delineate_lsim_long(data, fs)
% [positions, EXITFLAG] = ecg_delineate_lsim_long(data, fs, ecg_rpe... |
d26aa4117fcf46414d734360702d3e53e31ad6569a3bccca526c921ac5dda6a4 | MATLAB | 132,184 | 3,164 |
function [positions, EXITFLAG] = fiducial_det_lsim(data, ecg_rpeaks_index, fs, varargin)
% ECG fiducial points detector based on LSIM approach
% [positions, EXITFLAG] = fiducial_det_lsim(data, ecg_rpeaks_index, fs, varargin)
%
% Inputs:
% data: Vector of input ECG data
% ecg_rpeaks_index: R-pe... |
778a08bb2d2a2e48e83d342e1aa086f0a6e977c160599230f60f33daba35ecf4 | MATLAB | 137,204 | 2,779 | %% PAPER "Spatiotemporal whole-brain dynamics of auditory patterns recognition" - LEONARDO BONETTI
%BEFORE PROCEEDING, PLEASE NOTE:
%#1
%the pre-proessing steps and some of the first analyses are reported to
%ensure full disclosure, however the raw (and in some cases the pre-processed) data is not provided because o... |
3bbdfdc9da3e3a398fd0882b5c445dcd8ea1b3e05c5b6468b6a0310372fd2e2a | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINVN9D4XZKE/ses-baselineYear... |
55f8d112a3435b2c09428dc9897a25ecae9a4657053f817735f9ac9bd1776876 | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINV34RL3DRG/ses-baselineYear... |
598d53141d2b3f394c933da971f43d287860c7acc1d512ee7d8d8d32591b100d | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINVFXBFWCR0/ses-baselineYear... |
5cec3f3658bf6d1115dddd1cdd6332a41b498a84493e7a828991ac6e839d3fc2 | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINVWNGXWEL5/ses-baselineYear... |
6c5c2ae8a34d88d212a575e1c3af412153d6525935480b1d8ed295b3f0c45ef2 | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINVK2MTFMLM/ses-baselineYear... |
9ab4504f17f08bf0d00744a711c6e34d3b67feb749b17552e972b7c2cc32b875 | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINVTEZ4278H/ses-baselineYear... |
9f61383636537752c51d9cbfe319d1d517c5a326c841adcf8f295395b7a1f228 | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINV9F4G1M9E/ses-baselineYear... |
ab23674370b1d2f55ab8741afef58819205b17c01afb894a31fa1c2ba07c4d26 | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINV68V7T6T1/ses-baselineYear... |
ee43f8fae5c04d4d13e41c193ec6ea7d5d17ff04405ecfa25173446380401529 | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINV003RTV85/ses-baselineYear... |
f2b9a968f0bb4edede169d236ee356973eda94c00e25215e0f1750efa444b767 | MATLAB | 138,438 | 1,169 | %-----------------------------------------------------------------------
% Job PART2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.spatial.preproc.channel.vols = {
'/data/images/sub-NDARINVCNW0CYU4/ses-baselineYear... |
c4103d493da24c182aa3c266e9074922749f80ba958489a8774e0b2df4de425c | MATLAB | 141,368 | 4,902 | % VIEW_NII: Create or update a 3-View (Front, Top, Side) of the
% brain data that is specified by nii structure
%
% Usage: status = view_nii([h], nii, [option]) or
% status = view_nii(h, [option])
%
% Where, h is the figure on which the 3-View will be plotted;
% nii is the brain data in NIFTI format;
% option is... |
1ab04dea26d1c8fd954f2216b6f9d130ad472be60d9f48b17cba4235125808eb | MATLAB | 142,118 | 4,976 | function varargout = NEMO_O(varargin)
% NEMO_O M-file for NEMO_O.fig
% NEMO_O, by itself, creates a new NEMO_O or raises the existing
% singleton*.
%
% H = NEMO_O returns the handle to a new NEMO_O or the handle to
% the existing singleton*.
%
% NEMO_O('CALLBACK',hObject,eventData,handles,...) ... |
fcf251600365dd597a781ed61e4c0d2a688f1108d96acc649cb58f88fcccf89a | MATLAB | 163,020 | 3,101 | %%
%% SYSTEMATIC VARIATION OF AUDITORY SEQUENCES (AUDITORY PATTERN RECOGNITION 2020) - LEONARDO BONETTI
%%
%% *** START UP FUNCTIONS.. (LBPD_startup_D) ***
%starting up some functions for LBPD toolbox.
%starting up some of the functions that I wrote for the following analysis
pathl = '/projects/MINDLAB2017_MEG-Lea... |
ba4a71dcc6466f10148a216381b5436eec14fce8c5e90ece7cc1e48b7f35a083 | MATLAB | 167,460 | 3,239 | %%
%% SPATIOTEMPORAL BRAIN HIERARCHIES OF AUDITORY MEMORY RECOGNITION AND PREDICTIVE CODING (DATA COLLECTION CODE: AUDITORY PATTERN RECOGNITION 2020) - LEONARDO BONETTI
%%
%% NATURE COMMUNICATIONS - REVISION I
%%
%% *** START UP FUNCTIONS.. (LBPD_startup_D) ***
%starting up some functions for LBPD toolbox.
%star... |
250e3f64f8a4655f4426875ec1fb027b2df6fe3bb3de9fc96ff9c8fec0e07d8f | MATLAB | 170,128 | 2,904 | classdef Widefield_SubFcn
properties
end
methods(Static)
function cm_data=ColMapMagma(m)
cm = [[ 1.46159096e-03, 4.66127766e-04, 1.38655200e-02],
[ 2.25764007e-03, 1.29495431e-03, 1.83311461e-02],
[ 3.27943222e-03, 2.30452991e-03, 2.37083... |
1465df76bbdfec308f79057eb443d8083f124323c8e87a10967259c3008d68ea | MATLAB | 178,302 | 3,065 | classdef Confocal_SubFcn
properties
end
methods(Static)
function cm_data=ColMapMagma(m)
cm = [[ 1.46159096e-03, 4.66127766e-04, 1.38655200e-02],
[ 2.25764007e-03, 1.29495431e-03, 1.83311461e-02],
[ 3.27943222e-03, 2.30452991e-03, 2.370832... |
5f5210d08bc0e3e9ba44409fa446123862a17053bac5af1b6b967f0d63cfab46 | MATLAB | 194,164 | 4,247 | function varargout = WheelAnalyzer(varargin)
% WHEELANALYZER M-file for WheelAnalyzer.fig
% WHEELANALYZER, by itself, creates a new WHEELANALYZER or raises the existing
% singleton*.
%
% H = WHEELANALYZER returns the handle to a new WHEELANALYZER or the handle to
% the existing singleton*.
%
... |
943b1d94c4c8148fad220c1cf05e210c0414c0b46d6f21c1479828f44d5e69db | MATLAB | 198,722 | 4,312 | function varargout = WheelAnalyzer24ch(varargin)
% WHEELANALYZER M-file for WheelAnalyzer.fig
% WHEELANALYZER, by itself, creates a new WHEELANALYZER or raises the existing
% singleton*.
%
% H = WHEELANALYZER returns the handle to a new WHEELANALYZER or the handle to
% the existing singleton*.... |
06fa7eafc6e2b95f1758946b881564c47023ec98707741d6ee397695448d8824 | MATLAB | 200,000 | 1,619 | %-----------------------------------------------------------------------
% Job PART 2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.tools.dartel.warp.images = {
{
'/da... |
3af91ded5f8a4286910a7db6522753ca7821b66e752a9b12de7eda3874a249d5 | MATLAB | 200,000 | 3,296 | %-----------------------------------------------------------------------
% Job PART 2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.tools.dartel.warp.images = {
{
'/da... |
4fdaa637b7561f0676a530c4c63a7beb8db7d6d914a5b342f4aaddc0d4f7a89a | MATLAB | 200,000 | 3,353 | %-----------------------------------------------------------------------
% Job PART 2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.tools.dartel.warp.images = {
{
'/da... |
8088c0ebb2b7bfa2921328295645ffa8e1818dafd85f7e2fdfaad3e6d88ef8af | MATLAB | 200,000 | 3,698 | %%
%% SPATIOTEMPORAL BRAIN HIERARCHIES OF AUDITORY MEMORY RECOGNITION AND PREDICTIVE CODING (DATA COLLECTION: AUDITORY PATTERN RECOGNITION 2020) - LEONARDO BONETTI - NATURE COMMUNICATIONS
% Aarhus University, University of Oxford, University of Bologna, Massachusetts Institute of Technology (MIT)
%%
%%
% The code ... |
b30e1b899565aa86bcc41224b82f662202bec6b20c14c1e4232972b515efa73f | MATLAB | 200,000 | 2,924 | %-----------------------------------------------------------------------
% Job PART 2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.tools.dartel.mni_norm.template = {'/data/sub-10001/ses-1/anat/Template_6.nii'};
%... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.