sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
0baa0252ebe267d544b61e4dca861de6f42c6010374db9a255d799b2ebb30c16 | MATLAB | 3,363 | 93 | function Cycles = detect_cycles(ChannelBroadband, ChannelNarrowband)
% detects all cycles in the channel, returned as a table. A cycle goes
% from positive to positive peak, and includes 1 negative peak.
%
% Part of Matcycle 2022, by Sophia Snipes.
try
%%
[RisingEdgeZeroCrossings, FallingEdgeZeroCrossings] = ...
... |
78a15e792d93bc4c50c6f1369009b764f746c76353cc748310662988e2c981ea | MATLAB | 3,364 | 85 | clear
close all;
clc
per_subject = 1;
outputfileame = 'Submission50.csv';
outfid = fopen(outputfileame, 'w');
fprintf(outfid,'clip,preictal\n');
% load data
R1 = importdata('E:\Sameni\Projects\Seizure\SourceCodes\Probabilistic\SourcesWithResultsBackup\testFreqDomainEnergyIncreaseRate01.txt');
R2 = importdata('E:\Same... |
bb92bd7c6adb9efc8f08c3ae97a4eb5c368ecb630cfaba7fc2d7095d716ebf55 | MATLAB | 3,367 | 96 | %--------------------------------------------------- %
% window_length: length of the epoch
% data_set: raw data
% filter_data: binarized data
% index_1:start time frame index
% index_2:end time frame index
% e.g. window_length of the epoch is 160 frames, index_1 =1, index_2=150
% means to calculate the WNMI usi... |
442899d7bbb2b65d90b5600b41582772952f7ec388edcafa9a9ae01d992875b9 | MATLAB | 3,369 | 88 | function [colorMapInterp] = customColorMapInterp(colorMap, colorBins)
% customColorMapInterp Generates a custom interpolated colormap.
%
% This function interpolates between the colors in an input colormap to
% create a customized colormap with a specified number of bins. The interpolation
% ensures smooth transition... |
215b1c8fd69b67cc0c0f10ce0e16f651f0a5a76264daeebd186eb4b476b00dbe | MATLAB | 3,371 | 89 | % for the measured latency (CompLat) +-x (here 50) (intervalMs) measures an
% average for each subject on data of a given type
% latency comes from: peak_latency_grandmean_p3
clear all
%------------------------------------
eegdir = 'D:\BORI\bedrest\RENDEZETT\A) Bedrest_EEG\ALLERP\'
subjects = {'A_'; 'B_';'... |
02dd4f0868c435b97f18392ae99c9f9f5b64516ca5fa24f2d4cd2508cb92f328 | MATLAB | 3,376 | 122 | function metrics = calc_PSTHmetrics(psth, zpsth, binMidPoints, baselineFR, zThresh, minRespEnd)
%% initialise metric fields
metrics.responsive = nan;
metrics.excited = nan;
metrics.suppressed = nan;
metrics.onsetLatency = nan;
metrics.offsetLatency = nan;
metrics.peakLatency = nan;
metrics.peakSign = nan;
metrics.pe... |
3e4c7a7a3f5a208373144604debf53fa744ed78e772383b840fe0d1ddcdccd67 | MATLAB | 3,377 | 120 | % this script performs a check for the presence of 'BLACK PIXELS' in the structural images
clearvars
close all
addpath(genpath('/storage/stella/MATLAB_toolboxes/'));
addpath('/storage/stella/Analysis/matlab_scripts/');
cd('/storage/stella/Analysis/DTI_FreeWaterFraction_Feb2022');
HCsubj = dir('HC0*');
HCsubj(2:3) = ... |
fbccbffbf90aad35e9a9d1597a7c1187a6dd088de43127dbf829f3b7c4078626 | MATLAB | 3,380 | 92 | % Fractions of trial outcomes
% Load data
load('E:Data_array\AllTrials_10bin_Smooth\data_array.mat')
% Setting
save_path = 'E:\CM_Behavior_Analysis\Behavioral_performance';
recSites = {'left S1', 'left S2', 'left wM2','left ALM'};
% Brain area selection
u = data_all(ismember(data_all.recSite, recSites),:);
... |
05213ca3e105562d150af6efad1ad69771fd2adbf1947256cfcf7f13099cd239 | MATLAB | 3,383 | 136 | % baseline wander removal based on sparsity assumption of the BW in the
% frequency domain;
% Reza Sameni, Copyright 2006
%
clear;
close all;
clc;
%load patient165_s0323lre; data = data(1:10000,6)';
load FOETAL_ECG.dat; data = FOETAL_ECG(1:end,5)';clear FOETAL_ECG;
%plot(data);grid;
fs = 500;
N = length(data);
%w = 2... |
85d4ba2e4c2e6639e0fb24844f2ff72dc51cfd91eabd829b43a0b222da0cd977 | MATLAB | 3,385 | 98 | function out = GrappaReco3D_arb(sig,kernel,ws,stepSize,startPos)
% function out = GrappaReco3D_arb(sig,kernel,ws,stepSize,startPos)
%
% Daniel Gallichan, December 2012. Small modification to code from
% bernd.jung@uniklinik-freiburg.de to allow arbitrary GRAPPA kernel
% and multiple 'startPos' (i.e. the corner of the f... |
892729c60874d644f006daa310ebca7b12cc1da0cd550ddca5ae078ee8700f14 | MATLAB | 3,385 | 107 | function [stri1,stri0,stri_more]=hbf_SharedTriangleSides(input)
%HBF_SHAREDTRIANGLESIDES finds the connections between sides of triangles.
%
% function [stri1,stri0,stri_more]=SHAREDTRIANGLESIDES(mesh)
% function [stri1,stri0,stri_more]=SHAREDTRIANGLESIDES(elements)
% mesh: triangle mesh, hbf struct
% elements: ... |
e0d3e7a550c46f13ae28949a2fa3f41f959187379ac0ed578a9f6e6dfe959bb7 | MATLAB | 3,387 | 100 | % Authors: Simon Wadle & Tatjana Schmitt, 2019-2023
% this function takes the output from 'tono_analysis_2P_ANOVA_awake.m' and
% calculates FRAs of each neuron and sorts it according to genotypes
clearvars
% meta analysis
red_cell_idx = false; % true if double labelling, false if only single chann... |
404a7def65e284cf12b275b97208f66b26cf563a9eb7752f1f4b6a3573c30c43 | MATLAB | 3,391 | 103 | function [b,idx,outliers] = deleteoutliers(a,alpha,rep);
% [B, IDX, OUTLIERS] = DELETEOUTLIERS(A, ALPHA, REP)
%
% For input vector A, returns a vector B with outliers (at the significance
% level alpha) removed. Also, optional output argument idx returns the
% indices in A of outlier values. Optional output argument o... |
62acbf312a0f93883436c33c3dd282a7335a003a31fec00c47477e511a79b1bc | MATLAB | 3,392 | 90 | function [dF,baseline] = baselineFP(FP,interpType,fitType,basePrc,winSize,winOv,Fs)
%baselinePhotometry - Baseline adjust photometry signal to get dF/F
%
% [dF_F,varargout] = baselineFP(FP,interpType,fitType,basePrc,winSize,winOv,Fs)
%
% Description: This code will baseline adjust the photometry signal using
... |
8877d409acf641d27eda1c984b6e77d6696ee35d61de0fe2234405808e3efdb3 | MATLAB | 3,392 | 97 | %--------------------------------------------------------------------------
function [cs,index] = sortNat(c,mode)
%sort_nat: Natural order sort of cell array of strings.
% usage: [S,INDEX] = sort_nat(C)
%
% where,
% C is a cell array (vector) of strings to be sorted.
% S is C, sorted in n... |
cdb953793c08f82e8a90f5e3be55c01e2f51d6855c5e1dcda25dbfcdc5e47ac3 | MATLAB | 3,392 | 81 | function [data] = processDual(data,params)
%Process Dual Color Photometry
%
% [data] = processDual(data,params)
%
% Description: This function is designed to process dual-color or dual-fiber
% photometry experiments. These experiments require demodulation, and
% this code will find the acquired reference... |
67e72f85cca010d19ad9b0510a93b232a0f0ca302340d1158ac5de80521fa791 | MATLAB | 3,394 | 99 | function Set_Reconstructions_Menu(P)
H = gobjects(1,28);
H_Raw_Image = uimenu(P.GUI_Handles.Menus(2),'Label','Raw Image');
H(1) = uimenu(H_Raw_Image,'Label','Raw Image - Grayscale','Checked','on');
H(2) = uimenu(H_Raw_Image,'Label','Raw Image - RGB');
H(3) = uimenu(P.GUI_Handles.Menus(2),'Label','Segmented... |
979461b23013c2ac499a55c012fb4c623f01824bfb17d5a12e2b10676f7d0367 | MATLAB | 3,396 | 72 | clear
clc
[file, path] = uigetfile('all_magnitude_vetor.mat','MultiSelect','off');%When the user clicks the load psetion button, a window should open to enable the user to select a file.
cd(path)
load(file)
%% exclude inf
mv = all_magnitude_vector.magnitude_vector;
[x, y, z] = findND(mv == inf);
all_magnitude_vector.... |
bc76022db22c284ef7d81c81fdbbdecbd1fd88e5fa5e00312e92a93c50fc7d74 | MATLAB | 3,396 | 88 | function [p,T,zeta] = get_T(stat,idx,par)
% GET_T Test statistic for modularization.
% [P,T,ZETA,DF] = GET_T(STAT,IDX,PAR) for moment ratio matrix and covariance matrix in STAT (obtained from GET_B),
% concise index sets IDX (obtained from GET_IDX) and correction par.METHOD returns
%
% P p... |
8a7f940390f5564e8822cfa9bf539da10114496d48e84baff2ddb3ef036da083 | MATLAB | 3,399 | 99 | function Set_Reconstructions_Menu(P)
H = gobjects(1,28);
H_Raw_Image = uimenu(P.GUI_Handles.Menus(2),'Label','Raw Image');
H(1) = uimenu(H_Raw_Image,'Label','Raw Image - Grayscale','Checked','on');
H(2) = uimenu(H_Raw_Image,'Label','Raw Image - RGB');
H(3) = uimenu(P.GUI_Handles.Menus(2),'Label','Segmented... |
deeeff26ad78d32b45daa79145539ef53c9115d25f48c57da6bc377f74a92bb0 | MATLAB | 3,400 | 79 | %MakeIncompleteLetterSet
%
%formerly MakeFragLetterSloan.m
%code to generate incomplete letters, similar to the VOSP 'incomplete letters test'
%here using Sloan letters, loaded from image files
%specify image size, PropComp (proportion letter intact = 1/fragmentation) and checksize under image parameters below
%
%code ... |
8d9ff2bcdc93f789af691766b2f209e450ee139177d4c69203ee16a517ac2d06 | MATLAB | 3,401 | 111 | classdef DeprecationTest < matlab.unittest.TestCase
%DEPRECATIONTESTS Test that deprecated commands are indeed deprecated
methods (Test)
function compileKsort(testCase)
hJRC = jrc('compile-ksort');
testCase.assertMatches(hJRC.invocationType(), '^info$');
end
fun... |
79a598d5bd94a69964297dae1707f803d7ccebda2cd0c7879b95383fe3c8a677 | MATLAB | 3,402 | 148 | function h=ellipse(ra,rb,ang,x0,y0,C,Nb)
% Ellipse adds ellipses to the current plot
%
% ELLIPSE(ra,rb,ang,x0,y0) adds an ellipse with semimajor axis of ra,
% a semimajor axis of radius rb, a semimajor axis of ang, centered at
% the point x0,y0.
%
% The length of ra, rb, and ang should be the same.
% If ra is a vector... |
e2f3d9af056ba2b2abc487d59f92109e5262f5222bb6ccb39b093d2530ba0374 | MATLAB | 3,403 | 102 | function R = spmup_autocorrelation(varargin)
% this function computes efficiently the autocorrelation of all in mask
% voxels of time series (fMRI) data.
%
% FORMAT R = spmup(timeseries,mask)
%
% INPUT timeseries can be:
% - a structure array containing image volume information (see spm_vol)
% - a 2D mat... |
fe73dd18598454ded998ef39e47800a609355c4a846704a908e99edc5ecb44e4 | MATLAB | 3,403 | 86 | function [ mapsAligned, tforms ] = alignCellMaps(p, maps )
%% get tforms of coarse pre-alignment, if there exists one
% has to be manually generated. this only makes sense if the automatic
% alignment fails due to large differences in the original cell maps
for sub = 1:p.nSubjects
thisSub =... |
a9ad7abf7a733255f225b6be13e4213573cb617ad053aad796197e7f721a508d | MATLAB | 3,410 | 83 | function entropy_res = entropy_analysis(app)
%entropy_analysis Summary of this function goes here
% Detailed explanation goes here
channel_idx = find(strcmp(app.popup_entropy_signal.Value,app.popup_signal_spect.Items));
[data,ts,name, unit] = current_signal(app, channel_idx);
data(:,2) = ts(1):ts(1):ts(2);
tmp =fi... |
a768f299cbc0575644a95ad9987367e55c04d5f70948315f738f02640809851f | MATLAB | 3,412 | 88 | function [WF] = getWFprop(WF, varargin)
%Computation of waveform properties
%
% Description: This function will compute values for various waveform
% properties (temporal, shape) based on coordinates for waveform features
% determined by pre-processing with processWF.
%
% [WF] = getWFprop(WF, varargin)
%
... |
60a56bf51e058d9e15855dadc3f302afd9f522f9de3dec20b91cc5e5f5016460 | MATLAB | 3,415 | 98 | %% Use old terminate condition to get the new initial condition for NW simulation
% If Neuron Num not identical, then merge or create new ones
% If Delay Mats not identical, also adjust.
function [RefTimeE, VE, SpE, GE_ampa_R, GE_nmda_R, GE_gaba_R, GE_ampa_D, GE_nmda_D, GE_gaba_D,...
RefTimeI, VI, SpI, GI_am... |
e0aedc1b2e74a323ebad25c34414996e2bfecc01d92e2b2d14880c801796288e | MATLAB | 3,419 | 77 | function WF = loadCluWF(clusters,datFF,nChan,Fs,varargin)
%LoadWF - Load waveforms
%
% WF = loadWF(clusters,datFF,nChan,Fs);
% WF = loadWF(clusters,datFF,nChan,Fs,params);
%
% Description: This code utilizes organized cluster data (with max channel
% information) to pull the mean waveforms of all the spi... |
062f8ab7b52998ccfdcf306d0d54200c38041917fbf8ad6e395c6f312ea65a89 | MATLAB | 3,421 | 83 | %% Example code for running the AV node model
%% Create a MEX-file
% The MEX file is generated from the C++ file that Matlab can use
% Uncomment for Mac
% mex -setup C
% mex('AV_Node_model.cpp', '-compatibleArrayDims');
% Uncomment for Windows
% mex AV_Node_model.cpp -largeArrayDims
%%
clear all;
close all;
clc;
%%... |
56eb8856cb7db4a5a888514ad2b0517e4e34862015d114e5edaa08dfd3b627c5 | MATLAB | 3,422 | 72 | function [data_out, data_out_smoothed] = conditional_median_filter(data_in, wlen, threshold, fc)
% CONDITIONAL_MEDIAN_FILTER Applies a conditional median filter to the input data
%
% [data_out, data_out_smoothed] = CONDITIONAL_MEDIAN_FILTER(data_in, wlen, threshold, fc)
% performs a conditional median filter on the... |
462c7776d4bf72dc4e10dbb9841ebe957936a287ac6a90fa5978ce1ee9022677 | MATLAB | 3,423 | 149 | function h=ellipse(ra,rb,ang,x0,y0,C,Nb)
% Ellipse adds ellipses to the current plot
%
% ELLIPSE(ra,rb,ang,x0,y0) adds an ellipse with semimajor axis of ra,
% a semimajor axis of radius rb, a semimajor axis of ang, centered at
% the point x0,y0.
%
% The length of ra, rb, and ang should be the same.
% If ra is a vector... |
1b5b59d6a6073c581e06fed3154227f5efe3f398aa8e6cab5782e8503e675aeb | MATLAB | 3,427 | 98 | % Yunfan Li, March 2017
% Sampling for graphical horseshoe
function [omega_save,Sigma_save, lambda_sq_save,tau_sq_save, xi_save, Nu_save] = GHS_hmm(S,Omega, Sigma, Lambda_sq, tau_sq, Nu, xi, n, tau_0)
% GHS MCMC sampler using data-augmented
% block (column-wise) Gibbs sampler
% Input:
% S = Y'*Y : sample covarianc... |
90ed7099714bee0043c86b0ac976c62269f60acf69f29252819c76c7ee4f25b1 | MATLAB | 3,427 | 89 | %
% Test program for generating synthetic multi-channel ECGs with additive
% colored noise
%
% Dependencies: The synthetic ECG generator and noise generator package of
% the Open Source ECG Toolbox
%
% Open Source ECG Toolbox, version 1.0, November 2006
% Released under the GNU General Public License
% Copyr... |
405662caa95847ad04b4170d9dff851f85bbdbb8cc2347d9a6f6393295b2232c | MATLAB | 3,428 | 95 | function [New_Cxy,Rc] = Find_Vertex_Center(Im_BW,Cxy,Vr,Circles_X,Circles_Y,Pxy,Im_Rows,Im_Cols,Min_Center_Radius)
Plot1 = 0;
Plot2 = 0;
Plot3 = 0;
Mr = max(Vr);
if(Plot1 || Plot2)
Centers_Scan_Res = 0.3;
% Centers_Scan_Res = 0.5;
end
Pxy = Pxy + [Cxy(1) ; Cxy(2)]; % Translate the matrix of potential... |
544de75cd8f63a3e88a7d3cb57b0376e817ea74b4c928174f17181fcc0d62b85 | MATLAB | 3,428 | 97 | function fetalHR = FetalHeartRateParams(fetalRPeakTimes, fHRbaselineWinLen, fetalBradycardiaTh, fetalTachycardiaTh)
%
% FetalHeartRateParams(fetalRPeakTimes, Fs, fHRbaselineWinLen)
%
% An implementation of the fetal heart rate parameters as defined in:
% Macones, George A., et al. "The 2008 National Institute of Child ... |
e0508823e5a7f1db0cf285964a9a56013e48490af5b7f9302d8f904e445a0a70 | MATLAB | 3,432 | 111 | function celldat = mmil_parsecells(celldat,rows,cols)
%function celldat = mmil_parsecells(celldat,rows,cols)
%
% Purpose: parse cell matrix of numbers and strings
% e.g., the output of mmil_readtext
%
% Required Input:
% celldat: cell matrix of unknown types
%
% Optional Input:
% rows: vector of row numbers to be... |
2c10559c9a7ee5d51788bdd4f1199a9cdf47ffc3b960aa159d2aa068e225dd0d | MATLAB | 3,436 | 113 | close all;
clear;
clc;
resultfname = 'testProcessSeizureEEG_EnergyDistributions02.txt';
% parameters
subject = {'Dog_1', 'Dog_2', 'Dog_3', 'Dog_4', 'Dog_5', 'Patient_1', 'Patient_2'};
ffs = 150; % resample rate
f0 = 60; % powerline frequency Hz
Q = 30; % notch filter Q-factor
wlens = [1.0 3.0 10.0]; % energy window le... |
60b4ccb8117be1a29cf1c20b293338e175cf3a9545291a23cdfcdad053750343 | MATLAB | 3,438 | 101 | function [Matrix, Things] = assemble_matrix_from_table(Trials, TrialIndexes, Column, ...
Aggregator, Participants, Sessions, SessionGroups, CheckEyes)
% Trials is a table. Trial Indexes is 1s and 0s indicating which trials to
% use. Column is the label of the column on which to do the Aggregator
% operation. Sessio... |
fe854c4984641cdc08e41d2e3e2e0f227528ce92e72e18cb384848178b1e0c9f | MATLAB | 3,438 | 113 | %% Load in BSOiD-generated CSV file
file = uigetfile('.csv');
data = readmatrix(file);
data = data(1:144001,2);
%% Extract BSOiD-generated cluster labels
behaviours = zeros(12000,12);
behaviours(:,1) = data(1:12000);
behaviours(:,2) = data(12001:24000);
behaviours(:,3) = data(24001:36000);
behaviours(:,4) =... |
4a474cfcade2d43d45541eb414fe2c61d34731f0109e56018af3091c500f1884 | MATLAB | 3,439 | 98 | %--------------------------------------------------------------------------
%RETROICORplus v2.3 (previously RETROICOR; v1.0-v1.1)
%
%RETROICORplus creates physiological noise regressors for fRMI data.
%
%usage:
%RETROICORplus(matFilename,RETROICORbegremscans,RETROICORendremscans, outputdir)
%
%matFilename: name of the ... |
da943719bfcef29759b1183b7475624b5a7bab99fb8f2ef9f62a7c1d65c98563 | MATLAB | 3,440 | 98 | % - decode avoid trials between T1 and T2 in subspace
% - do DR into one subspace with overall concat
% - do spd and av removal analysis
% - do subspace decomp
% - then do task decoding with removal analysis code
clear
p = params_2DAA;
fpath = fullfile(p.processed_data_dir,'allData.mat');
load(fpath,'evs','tis','bvs','... |
5befa6be5a22dc6026644e15120a743dfd3e4f899e54f1c362f481890e6c99b9 | MATLAB | 3,454 | 93 | function [h_PT_model50, h_PT_model10, h_PT_model90,...
h_met_model50, h_met_model10, h_met_model90] = ...
plot_PT_met_model(...
AX,...
temps_PT,...
temps_met,...
pops_PT,...
pops_met,...
resection_time,...
min_size,...
max_size,...
max_time,...
flag_plot_met_distrib,...... |
0c12bfc1b45650b4b4de5e344ec7ebc99f8d932a5fc9c333334e6faa2128e75b | MATLAB | 3,459 | 93 | function [h_PT_model50, h_PT_model10, h_PT_model90,...
h_met_model50, h_met_model10, h_met_model90] = ...
plot_PT_met_model_ther(...
AX,...
temps_PT,...
temps_met,...
pops_PT,...
pops_met,...
resection_time,...
min_size,...
max_size,...
max_time,...
flag_plot_met_distri... |
edce6a05e85ffeb98b6aa269604c0cc03a55db407fb3ee88dd669ae527176197 | MATLAB | 3,459 | 83 | function [ av_trials, err_trials, av_trials_iti, err_trials_iti, av_trials_dr, err_trials_dr, trans_data_dr,tone_idx ] = ...
organize_trials_ae_iti(p, av_trials_all,err_trials_all,trans_data_all,trans_data_err_all,q,trial_idx_ses,sessions,trans_data_all_dr,tone_idx)
%% collect A/E data
av_trials_cat ... |
4de8db7473cf68d54ea839344734cc46f27aef31a48822bf142961447468beb2 | MATLAB | 3,460 | 96 | % - decode avoid trials between T1 and T2 in subspace
% - do DR into one subspace with overall concat
% - do spd and av removal analysis
% - do subspace decomp
% - then do task decoding with removal analysis code
clear
p = params_2DAA;
fpath = fullfile(p.processed_data_dir,'allData.mat');
load(fpath,'evs','tis','bvs','... |
532b1a7d477bd6f0382b266aabd9fb1c8fcb1c228df5e7fe9357fd20f8f1fdbc | MATLAB | 3,462 | 113 | function ROI_data = spmup_roiextraction(varargin)
% routine to extract data for an arbitrary number of ROI and from an
% arbitrary number of images - the routine follows the pattern of spm_voi
%
% FORMAT spmup_roiextraction
% spmup_roiextraction(ROI,Images,VarName)
%
% INPUT if empty the user is prompted
% ... |
a1f1696a39956533d15950a68f16d715a77e44c734488fd1b1721dd9241ba3d0 | MATLAB | 3,462 | 98 | % Compute ROC(k) and Confusion Matrix fro several N model predictions
%
% Input
% Ymany: N model predictions size: observations x models
% Y: Ground truth with K classes
% Output
% ROC: ROC{1}=[TPR;FPR] vectors fo N models
% METRICS:Cell kx1 Structure with the following fields:
% True Positive ... |
d369e6b2bc68261bdb7cedfc5f433ae44db98d951ddf5eff48c3d489ca42bd81 | MATLAB | 3,463 | 95 | clc;clear all;close all;
%%%% this code copied from https://github.com/SarahMorgan/Morphometric_Similarity_SZ/blob/master/Gene_analyses.md
Tvalue=csvread('whole brain regions' gamlssTvalues.csv');
gene_data=csvread('brain regions * gene expression.csv',1,1);
y=Tvalue(1:1:767);
x=gene_data.data;
x(768:1:end,:)=[... |
7d654e99a821528f1f39db379504d883cd57bead033fbb8982e61ebd8f61b98c | MATLAB | 3,465 | 90 | %% Load Datasetes ******************************************************
Dirpwd=pwd;
slashesindx=find(Dirpwd=='\');
Load_Default_Directories;
CurrentPathOK=[Dirpwd(1:slashesindx(end)),FolderNameDataset]; % FinderSpiker Root Folder
%% Raster Activity Minimal Constraint:
[FileName,PathName] = uigetfile('*.csv','Raster ... |
f99e99be5dff2a5b3a1c1597b6392ec3e4da43417a37dc491038228cafa95c7c | MATLAB | 3,466 | 133 | close all
clear all
%% collect data
% set the seed, so that other can reproduce the figures in the paper
rng(123)
% set up simulation
trials = 5; % how many realizations of the dynamics to look at
noise_amplitude = 1e-3; % amplitude of the white noise added to the forcing
% allocate memory
x = zeros(trials,100);
w =... |
72c887fae5ee060317bc68cd24b331244ae2e6950dcc8cfd4f86ad740bd0c799 | MATLAB | 3,467 | 125 | function [cTrace]=mnl_AdjustTraceLocations(Trace,Data,scale)
%This function is designed to check the location of the tracing as
%occaisonally the point locations from the neurolucida detections my not be
%accurate. So we search the nearby area to check that the point is along
%the brightest point along the y axis (rows... |
402f2a771dfdabdc21aaab1d754baa2c2a35d0f76c12a25d5a86d7e6212dc4b6 | MATLAB | 3,470 | 98 | function sig = drift_reject(raw_sig, L1, varargin)
%
% sig = drift_reject(raw_sig, L1)
% sig = drift_reject(raw_sig, L1, L2, approach)
%
% *************************************************************************
% * Drift (Baseline Wander) Cancellation from Biological Recordings *
% ***************************... |
9fa3e38255c21ee3c99701f5f80a7b168c2b81314b3203f8f76e2307fc1f595a | MATLAB | 3,475 | 68 | clear all
eegdir_orig = 'D:\Bori\BEDREST\RENDEZETT\Bedrest_PreEEG\EEGLocs\';
eegdir_new = 'D:\Bori\BEDREST\RENDEZETT\Bedrest_PreEEG\EEGFilter\';
eegl_dir = 'D:\Bori\eeglab12_0_1_0b'; %eeglab toolbox directory
%HDBR first campaign datasets
subject_sets = {'A_1','A_2','A_3','A_4','A_5','A_6','A_7','A_8','A_9',
... |
2b7834c48eccf2df8eed5875b0b46ee102ad9750129e5867caa593b44b3853c4 | MATLAB | 3,480 | 102 | function [t,p,CI]= two_ttest(gp1,gp2,type,aphav,graphout)
% 2 samples t-tests between grp1 and gp2 for different data structure type
% FORMAT [t,p,CI]= 2ttest(gp1,gp2,type)
% INPUT: gp1 and gp2 are two column vectors or matrices of data
% data can be of different sizes, use NaN for matrices
% ... |
7bc5deffcdaec5cc49add58be5ed42c57364df60caacbdade3ec8392253f7717 | MATLAB | 3,480 | 79 | function Y = DGradient(X, Dim, Spacing, Method) %#ok<STOUT,INUSD>
% Gradient along a dimension
% Y = DGradient(X, Dim, Spacing, Method)
% INPUT:
% X: Real DOUBLE array.
% Spacing: Scalar or vector of the length SIZE(X, Dim).
% A scalar value is the distance between all points, while a vector
% cont... |
d55e1da67421bbe38127f62701a66fda2d531ddc9130333503fdfe150cfb8c2b | MATLAB | 3,480 | 101 | %% response statistics per erea
cd('I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\response statistics per erea')
%%
T = importdata("C57_ALL_CELLS.mat");
%%
T.main_structure = cellfun(@(x) x{1}(1:2),T.region_acronym,UniformOutput=false);
erias = ["AC", "PL", "IL", "DP", "TT"];
T(~(contains(T.main_stru... |
23b075c9bf4fc2bbc7246f6c32b9aadf163740edfe142e32770a794f479c65df | MATLAB | 3,481 | 124 | function select_bases_fast(session, channel, unit)
% Select bases
%
% Parameters
% ----------
% - session: scalar
% Session number with format: yymmdd
% - channel: scalar
% Channel number
% p: probability of success/spike
alpha = 0.01; % significanse level
... |
cd00b7a7469a3b96b5babe130b80754b2fda22f29c4fe3ce087ba4695c64f972 | MATLAB | 3,481 | 109 | function [C,Im_Label] = Apply_CNN_Im2Im(My_CNN, Im)
% This function gets a trained neural My_CNNwork and a grayscale image and produces a matrix of probabilities.
% Each pixel in the output matrix contains the probability of the corresponding pixel in the grayscale image of being
% a neuron pixel or a non-neuron ... |
d1c14eace8bbeef09501cef5da6d41d30c975e6d065cf4e5b5bdfb3a8c84686e | MATLAB | 3,485 | 88 | %
% Test program for synthetic noise generation.
%
% Dependencies: The baseline wander toolbox of the Open Source ECG Toolbox
% and the sample noises
%
% Open Source ECG Toolbox, version 1.0, November 2006
% Released under the GNU General Public License
% Copyright (C) 2006 Reza Sameni
% Sharif University of ... |
84204d6e8197b025c0932ba29c1e1ee28de233c1c00615e4c03a0703a8803826 | MATLAB | 3,486 | 99 | function [spMat_src, spMat_targ] = GrappaCalib3D_arb_idx(acsDims,kernel)
%
%
% Daniel Gallichan: modification of Bernd Jung's code for GRAPPA - to
% specify manually the kernel
%
% - 5/2/14 - changed the definition of lambda so that it is relative to
% norm of the ACS data
%
% - 11/3/16 - change default when no regular... |
c2f9361c4a10e01c8a82c699e3155ff2cbf8674ed7b3478bc917e8d6b06b265a | MATLAB | 3,489 | 98 | function outliers = spmup_comp_robust_outliers(time_series,type)
% Computes robust ouliers of a time series using S-outliers or Carling's k
%
% FORMAT outliers = spmup_comp_robust_outliers(time_series,type)
%
% INPUTS - time_series are the time courses as row vectors
% - type is 'S-outliers' (default) or 'Carl... |
b79428da51eb78fb093627160389d12682a1d371255c9f6d3f9fc06ea6022889 | MATLAB | 3,490 | 85 | function stm = amp_seq_to_stm(amplitude_sequence)
% amp_seq_to_stm - Generates a state transition matrix (STM) from amplitude
% fluctuations of a time-series. Useful for detecting periodic QRS amplitude
% fluctuations or T-wave Alternans (TWA) from ECG data.
%
% Usage:
% stm = amp_seq_to_stm(amplitude_sequence)... |
df2767260dd44a559493da88beaec7212dc9f51d5be1022add4bb8241e6b744d | MATLAB | 3,490 | 93 | %% Make Data set of Statistics of Network Features
%% 0. Load MAT File
fprintf('\n>Read node parameters from .mat file created with Get_Gephi_Data\n')
fprintf('to compute numerical statistics for condition:\n mean\n median\n mode\n variance\n kurtosis\n skewness\n')
fprintf('It considers Nodes with Degree>0 in C_i or p... |
c0fad2cdcf2219e153450f0be7a6a07ee39bd6d4886fcb79a16ae7e7d83b03ef | MATLAB | 3,492 | 94 | function frac_dim = boxcount(coordmat, maxstep, plotflag)
% frac_dim = boxcount(coordmat, maxstep, plotflag)
% calculates the fractal dimension of a set in the 2D plane
% using the box counting method.
%
% INPUT: coordmat coordinates of the set points
% maxstep maximum step number for the boxcounting ... |
a78ec18d9b1f151fe1792c92583e1e15daff61c3b7805ca7832a3dde596a7e11 | MATLAB | 3,494 | 163 | function [c,imap,xm,ym] = dspQMap(map,ChanPos,varargin)
% dspCMap - Display topographic scalp maps
% ----------------------------------------
% Copyright 2009-2011 Thomas Koenig
% distributed under the terms of the GNU AFFERO General Public License
%
% Usage: dspCMap(map,ChanPos,CStep)
%
% map is the 1xN voltage map to... |
cd5788df2c9e5a22ff130c26525f553b1b273850bce3671b0240a39cfe128ff4 | MATLAB | 3,494 | 98 | function [Sig2NoisePeak,NoisePercentiles,SignalPercentiles]=mnl_EvaluateCumulativeSignal2Noise5(Noise,Signal,ChanNum)
%mnl_EvaluateCumulativeSignal2Noise is designed to evaluate where the
%difference is between two different distributions of different sample
%sizes. It then plots three graphs to visualise the differenc... |
0f244c485ebc79234a46ebb173a40a8f3ddd7d4d07e32fcffd7d766e2d325389 | MATLAB | 3,495 | 148 | clear all
close all
sigma=0.5;
Veq=-76.72;
Vth=-39.51;
Vr=-41.70;
tau=11.85;
R=118.5;
C=0.098;
tau_Ref=1;
P=10;
taus=20;
epsilon=0.01;
Areward=0.9;
Apostpre=1;
Aprepost=-1;
N_pres=80;
dt=0.1;
ncoeffs=10;
Coeffs=linspace(0.1,6,ncoeffs);
Successes=zeros(ncoeffs,N_pres);
Coeffs=20;
wmax=0.5;
PLOTS=1;
for coco=1:n... |
d30bacd12680c580196f023fbf2d070c8c8e67c46faac5a866f85572c21a7320 | MATLAB | 3,498 | 110 | clear
p = params_2DAA;
fpath = fullfile(p.processed_data_dir,'allData.mat');
load(fpath,'evs','tis','bvs','traces')
[cols,alpha] = chooseColors;
speed_control = 0;
iti_control = 0;
%%
[av_trials_all,err_trials_all,trans_data_all,trans_data_err_all,err_trials_full_all] = prepare_data_task_subspaces(p, traces, evs, bvs, ... |
e17bf2d94abaf1a1267fe224f728f2a9ba6374951748ced46da7e3162159d39b | MATLAB | 3,498 | 125 | function controlfilename = createLCmodel_control_laserNAA(metabname,l1,l2,l3,preproc_dir)
basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/First/basis_LASER_TE=65_CENIR.BASIS';
%basis_set_file_path = '/home/romain/data/spectro/Basis_set/Gosia/NAA_090814.BASIS';
do_water_scaling=1;
[pathstr,filename ... |
462460c14521a61e14dfbf38ef5029a735914d2c63b68bffa4947efcc4fe61a9 | MATLAB | 3,499 | 126 | % Copyright (c) 2008-2026 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
%
% Covered Software is provided under this License on an "as is"
%... |
00d597b7ef498e4ed0000e7ee04731252935c2edf43dcecbd87d3c1e1053c214 | MATLAB | 3,503 | 116 | %
% Test program for ECG Kalman notch filtering
%
% Dependencies: The baseline wander toolbox 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
% Modified June 201... |
e074cbfc31e68747fa89c06f268f7ff8ed7d17c894e69ee8b8b9ec317335f6f1 | MATLAB | 3,506 | 112 | 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'))
% Download data from https://doi.org/10.5061/dryad.070jc and specify the
% root directory of the Natural Speech dataset:
datas... |
c7cc730b44464c175da5a78a99cbfaf6fa8567b74ce5a3f9df006e12be266c4e | MATLAB | 3,510 | 86 | % Copyright 2024 Eelke Spaak, Donders Institute.
% See https://github.com/Spaak/rift-phase-and-visibility for readme/license.
% Belongs with:
% Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension
% to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscie... |
f61d350465a75b876daa84c3e0e2ddab75c31cf9dc66484a168c55aeb480ecb3 | MATLAB | 3,513 | 83 | %% PROMPT
clear variables
% DESIGN
if strcmpi(answer{4},'n')
% Default values for the GUI below
to_display = [{'B';'Group';'OH_OH';'PBO_OH'} cell(4,3)];
% Select folders on which to apply analyses
ScreenSize=get(0,'ScreenSize');
f = figure('Position', [ScreenSize(3)/2-500/2 ScreenSize(4)/2-500/2 ... |
ae0df5d1a102f76d41ebe726eedfe7c29a84c51a3291ae4cf3fca05b3857a917 | MATLAB | 3,515 | 82 | % Authors : Tatjana Schmitt & Simon Wadle 2019-2023
function [BF, FM, stimulus_responses, mean_activity] = calculate_BF_random_order(tone_order_str, stimulus_responses_meanact, reps, least_nr)
%% calculates the BF for each pixel from the stimulus_responses_meanact matrix
narginchk(4,4)
%set parameter
tone_or... |
02b883929cbedc806422dccdd3f155a13067f14f0dfbf0a9345ca649a725d562 | MATLAB | 3,523 | 95 | function derived_burst_signals(app)
%DERIVED_CARDIAC_SIGNALS interpolates the hb_res.dt_instantaneous
% Detailed explanation goes here
%new
normalize_bursts(app)
%new
tmp = nan(1,length(app.data));
idx=0;
for i = 1: length(app.data)
tmp(i) = app.data(i).tic_multipl;
if strcmp (app.data(i).name,'BURST INTE... |
e14a9dddf7d48fce67368aaeb4490f3263c797bafa6a0d00b4b2dfa793766d51 | MATLAB | 3,524 | 102 | 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,'ae_decoding_weight_analysis');
saveData = 1;
saveFigs = 1;
n_rep = 80; % 160s
n_dc_r... |
3e4c0c054436bfd63e8e2fcbec9be6f9aecb2179b109af795d5602fe4fecb04c | MATLAB | 3,525 | 81 | function Data = Analyze_Vertex_Morphology(Data,Im_branchpoints)
Plot1 = 0;
Scale_Factor = Data.Info.Experiment(1).Scale_Factor;
Rect_Length = Data.Parameters.Auto_Tracing_Parameters(1).Vertex_Angles_Scan_Rect_Length; % Scaled and given in pixels.
% assignin('base','Data',Data);
% assignin('base','Im_branchpoin... |
9547b8fde430c28a5d41b47f1df76b31a3c7996c3f34579d4d00aa4509e06aa0 | MATLAB | 3,527 | 122 | function Im_Sensor = MCA_Sensor(Im_Origin)
B = 500;%B^2
delta_x = 36;%x0
Im_1 = zeros(72,64);
Im_2 = zeros(72,64);
Im_3 = zeros(72,64);
Im_4 = zeros(72,64);
Im_5 = zeros(72,64);
Im_6 = zeros(72,64);
Im = double(Im_Origin);
for i=1:72
for j=1:64
Im_1(i,j) = ... |
b24bfd616f2d07dcb709f1747150a8e185947ebfdccf0d6bc90a2a4f7be25068 | MATLAB | 3,531 | 68 | for i = 0:30
%% Parameters for computation
t_factor = 3600; % Time factor for graphs.
time = 4*t_factor/t_factor; % Time of simulation depending on t_factor.
sampling_rate = 10*t_factor; % number of samples per time factor units.
time_array = linspace(0, time, time * sampling_rate + 1);
... |
917106a5109b4f895c540fe5238e749469c236ac3b0cc8c738ee2505ba9eff3b | MATLAB | 3,532 | 168 | function ob = fatrix2_block_sum(blocks)
%| ob = fatrix2_block_sum(blocks)
%| called for ob1 + ob2 + ...
% find at least one fatrix2 in the collection
ib = [];
for ii=1:numel(blocks)
if isa(blocks{ii}, 'fatrix2')
ib = ii;
break
end
end
if isempty(ib), fail 'no fatrix2? bug', end
bb = blocks{ib}; % reference bloc... |
3fc5b2dcb0835105ea2aa2ee1d2ad9b8dfcc84c9b6694859d6c32241462a1bce | MATLAB | 3,534 | 88 |
function [P_observ_cond_to_state,P_observ_cond_to_state_comp] = gmm_pdf_fast( P_all , mu_all , sigma_all , observations_time_series , state_numbers , dimension_numbers_index , num_gmm_component )
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%this function work for diogonal covariance matrices
%... |
dfbbe91103b4489d403f5aba3304ec5b9c0b554fdef6bd2eb9c43574c08c8ee7 | MATLAB | 3,536 | 135 | %compute T2 from c result structure
metab_list = { 'Glu','Ins','sIns','sNAA','mNAA','GSHd','sNAA_NAAG','Glu_Gln','PCho_GPC','CrCH3_PCrCH3','CrCH2_PCrCH2','sNAA_mNAA'};
figdir='/home/romain/images5/spectro7T/7T_MRS/T2_fit_figure';
figdir='/home/romain/images5/spectro7T/7T_MRS/LCmodel/BG_spw2000/T2';
figdir='/home/roma... |
5bac3af95f61bc37607ac68accce31bf86e7d5653cce73afc31b9807e472a6a5 | MATLAB | 3,538 | 117 | function Bursts = remove_overlapping_bursts(Bursts, MinCyclesPerBurst)
% identifies bursts with overlap, keeps the largest intact, and chops the
% smaller ones to be outside the large one, until there are no left. Then
% remove all the bursts that are now too small.
% Part of Matcycle 2022, by Sophia Snipes.
% TODO: o... |
e2f1f0f526fe92867881c80715f6f4ccd54d173344e447291df5e75ecdbfb136 | MATLAB | 3,539 | 90 | %% msRun2018
% Version 1.0 GE
% Updated version of the msRun script originally proposed by Daniel B
% Aharoni to analyse miniscope 1p calcium imaging data.
% This version is build on top of the original package to maximize compatibility.
% It includes NormCorre for image registration, CNMF-E for source extraction,
% an... |
3b40d4e1680d8b388ae8010e39a89ae8f499e190a4ec07f2ef205cd6f018eb84 | MATLAB | 3,543 | 126 | function [gbound,obound,outputdata] = fcn_get_bounds(A,gammarange,omegarange,samplesPerStage,nstage,keep,couplingtype)
% %%
% gammarange = [-3,3];
% omegarange = [-10,50];
% samplesPerStage = 2500;
% nstage = 5;
% keep = 100;
%%
% load cellA
% A = A(1:4);
%%
outputdata.samplesPerStage = samplesPerStage;
outputdata.nsta... |
09bad869633d5d581dff0941f9acb4e5b4d337941d96d8bf989d702ae4af855a | MATLAB | 3,544 | 101 | % Function that analyze if the two main branches of the
% cluster analysis (using hierarchichal clustering)
% have other cluster that helps to classfify better
% the neural ensembles
% Input
% Rclust: Thresholded Raster to Analyze
% SimMethod: Simmilarity Method: 'hamming'
% Ouput
% frame_ensembles Labeled Fra... |
2bbc1e6120ac1a86218e4fda183a3380a9602f0fe0703d852f9f8bb71b6b8f5d | MATLAB | 3,550 | 60 |
%{
----------------------------------------------------------------------------
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... |
9dfc8efca4a6aaef36a9833109daeb983ac99fb6a2c11a64ebe15635c08be10c | MATLAB | 3,550 | 69 | function [RTouchAll,LTouchAll]=TouchExtract(PegTouchCell)
global SliderTouch OneTurnTime RefPeriod RpegMedian LpegMedian RLpegMedian RLpegName DrName fig_touchR fig_touchL fig_touchR_TM fig_touchL_TM fig_TMpegs...
PtouchHistoCell_R PtouchHistoCell_L WaterOn_percent RLPegTouchAll RPegTouchAll LPegTouchAll Figure... |
ae3ca8c07717e6251dda034a21c60944d632dd2c2dcbcc99f7961cb25e229eff | MATLAB | 3,550 | 122 | function [p, varargout] = GausFit(t, x, p0, lb, ub, varargin)
%
% Fits a sum of Gaussian functions to the data.
%
% Usage:
% [p, varargout] = GausFit(t, x, p0, lb, ub)
% [p, varargout] = GausFit(t, x, p0, lb, ub, options)
% [p, varargout] = GausFit(t, x, p0, lb, ub, PrMu, PrCov, PstVar)
% [p, varargout] = GausF... |
f9634ba03fc8364b160365cf1bad12e36622d4d099bdb8fa34a3fad85265c1cb | MATLAB | 3,552 | 104 | % Function to accumulate Tables Generated in Gephi
% of each Experiment for different Conditions
% Input
% N Conditions: by GUI
% Load experiment manually from different folder: one by one
%
% Output varbales @ mat Files
% File .mat with all the Network features per Experiment
%% Setup
% Initial:
clear; clos... |
19591b70b35629a077b3698de360478f8168a22e2b545795fa00e201e35dd5ff | MATLAB | 3,553 | 156 | function [AAAt_ECGpeak222 AAAt_BPfoot222 AAAt_footIndex222]=riallinea_BP_ECG_v04(AAAt_ECGpeak,AAAt_BPfoot,AAAt_footIndex)
% figure
AAAt_ECGpeak1=unique(AAAt_ECGpeak);
AAAt_BPfoot1=unique(AAAt_BPfoot);
AAAt_footIndex1=unique(AAAt_footIndex);
if AAAt_BPfoot1(1)>AAAt_ECGpeak1(2)
AAAt_ECGpeak1(1)=[];
end
imin3=diff(AA... |
936d7074ea43946b239f992fd62601f9145e2b1134148f51c82b3ea1e8cf1afc | MATLAB | 3,558 | 109 | function MSNcount20200108
global dpath3
cd(dpath3)
dpath=[dpath3,'\'];
path=[dpath,'CellCell'];
MSNsum=0;
Rtcount=0;
Ltcount=0;
RtLtcount=0;
Touchcount=0;
Woncount=0;
Woffcount=0;
WonWoffcount=0;
Doncount=0;
WoDoncount=0;
tDoncount=0;
Wotcount=0;
tWoDoncount=0;
modBgracount=0;
mod98count=... |
e2768e738b4b91bb3b81b75cc412d38807e39c2ae0d03b80bc10517b7ea65dc2 | MATLAB | 3,558 | 109 | % 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,... |
4a4b50c1b4cc4f0ae3194b82ab0871bbfc2520ffcb19bd1175abc099e1ddbaac | MATLAB | 3,562 | 68 | %-----------------------------------------------------------------------
% Job PART 2
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
%%
matlabbatch{1}.spm.tools.dartel.warp.images = {
{
XXX_... |
cdac67d4cbbe03ce7e0c8c6bccf56b0d8edeefb65f553a0e803d22bc4fb70acf | MATLAB | 3,563 | 86 | 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,'removal_analysis_one_subspace');
saveData = 1;
saveFigs = 1;
n_rep = 80;
n_dc_rep = ... |
02d40661af5a317c0ef11627c662d88c083f3d6bf2ed2658d7ee71c2bb42b6f9 | MATLAB | 3,564 | 103 | function avg_psth_PV2(cellids,responsespec,resdir,spike)
%AVG_PSTH_PV2 Average normalized peri-event time histograms.
% AVG_PSTH_PV2(CELLIDS1,CELLIDS2,RESPONSESPEC, RESDIR) calculates
% normalized average PSTHs aligned to RESPONSESPEC (cue, reward or
% punishment) for CELLIDS1 and CELLIDS2, respectively. Re... |
33339ee038850e3defeafe272238deb6393bc97a7b90c184e678a2e08c83a57b | MATLAB | 3,566 | 110 | function data = nut_filter3(data,filtclass,filttype,filtorder,lofreq,hifreq,fs,baseline)
% Used to filter time series -- should replace nut_filter eventually
% TODO: need to adjust parameters in nut_activation_viewer & nut_timef_viewer
%
% nut_filter2(data,filtclass,filttype,filtorder,lofreq,hifreq,fs,baseline)
%... |
4227bb5a7481818791595d3a1e0c18ac7ca2c4997b43acdff44839383d37fe20 | MATLAB | 3,567 | 102 | %Visualization code
% Shinjini Kundu (c) 2018
function results = VisualizePLDA(FINAL_FEATS, labels,k,I0,A_mean)
nPLDA= 2;
alpha = 1;
type = 'brain';
if min(labels)~=1
labels = 1-min(labels)+ labels;
end
[M,N,K] = size(I0);
[Vec, ~] = PLDA(FINAL_FEATS', labels, alpha, nPLDA);
PLDAprojected = F... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.