sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
c95f5aac799ad0c94dc0ba1a51dea11a8f2b32a4765bf9e563465ef0a427200a
MATLAB
16,676
499
% PLOTTING STARTS figure() % performance accuracy of each subject subplot(3,3,1) bar([1:t], Perf_Accuracy) axis([0 t+1 0 100]) yline(45); yline(70); %y = [TruePos(1) FalseNeg(1) FalsePos(1) Perf_Accuracy(1); TruePos(2) FalseNeg(2) FalsePos(2) Perf_Accuracy(2); TruePos(3) FalseNeg(3) FalsePos(3) Perf_Accuracy(...
ff1dbd8fb63e333e89095076d654b8dc2778a303fc607c9e2b1fbf3dda192d63
MATLAB
16,714
375
function [act, inp] = nk_VisModelsPrep(act, inp, parentstr) % ========================================================================= % function [act, inp] = nk_VisModelsPrep(act, inp, parentstr) % ========================================================================= % Wrapper function of the NM visualization mod...
bcb421bcfab8979aa8f8dd36fcfa7d8d5bac991b6604e45d26418add5df1801e
MATLAB
16,860
397
function all_resvect = PC_groups_f(plot_win,freqs,fr_names,PCdir,EventTypes,SubEventTypes,varargin) %PC_GROUPS Population phase and MRL distribution % PC_GROUPS (plot_win,freqs,fr_names,PCdir,EventTypes,SubEventTypes,...) % plots population phase histogram (rose diagram) derived from preferred % coupling phase...
10f0810095d7ccda6e6f306456407f8ed285bc380347a0ff2335946a54b81cd2
MATLAB
16,957
520
% ======================================================================== classdef behaviouralRecord < optickaCore %> @class behaviouralRecord %> @brief Create a GUI and update performance plots for a behavioural %> task %> %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ==============...
165b244ff1018c9924bb630041aa402343b08e5a5566c07bc28c8aaf2b705f5d
MATLAB
17,044
491
<<<<<<< HEAD function this = gifti_read(filename, this) % Low level reader of GIfTI 1.0 files % FORMAT this = read_gifti_file(filename, this) % filename - XML GIfTI filename % this - structure with fields 'metaData', 'label' and 'data'. %___________________________________________________________________...
de962202b3247727fb18015bfe93849d430dc0b8b3dc5272cf66c24a1628780c
MATLAB
17,060
410
% ======================================================================== %> @class MovieStimulusTest %> @brief Class-based unit tests for movieStimulus. %> %> Tests construction, property defaults, filePath resolution, selection %> indexing, circularMask, loop strategy, pixelFormat, blocking mode, %> special flags, s...
235089b82bda1d2c39d98aa3b80fb1f21fe49054bd45f95a8a3f43504a4a5cec
MATLAB
17,078
397
% ======================================================================== %> @class AprilTagStimulusTest %> @brief Class-based unit tests for aprilTagStimulus. %> %> Tests construction, property defaults, tag constants, binary matrix %> generation, patternMatrix handling, colour assignment, cellSize scaling, %> custom...
7a4267c24d3ad34db7c41880462036fa7ba5da9a599e7fb39979feaa75ae0f17
MATLAB
17,185
496
function EEG_LFP_ETA_PD(EventTypes) %EEG_LFP_ETA_PD Intraop EEG and LFP event-triggered averages (ETA) plotted aligned % EEG_LFP_ETA_PD draws ETAs of EEG and LFP patient-by-patient and % averaged across patients. % % Input parameter: % EVENTTYPES cell array of event labels % % Johanna Petra...
ae45acb92a5ca84945c6f7ef4681a224d2818115aedd91fd6e7771a71a08cee9
MATLAB
17,235
521
% ======================================================================== classdef behaviouralRecord < optickaCore %> @class behaviouralRecord %> @brief Create a GUI and update performance plots for a behavioural %> task %> %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ==============...
0788215ddf7a5d1e03423748513b24af226de3481782e82d5d3d324064fef815
MATLAB
17,364
408
% ======================================================================== %> @class TaskSequenceTest %> @brief Class-based unit tests for taskSequence. %> %> Tests block-based variable randomisation, block/trial factors, %> dependent properties, findRun, updateTask, resetRun, validate, %> and sequential (non-randomise...
ee3eab817c7dc5c3d1386c67f7247777c24e384df58ef5e27ab6f2d5f08e55a0
MATLAB
17,370
472
% ======================================================================== %> @brief checkerBoardStimulus -- using a GLSL shader to make the %> checkerboard %> %> See docs for more property details %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ==========================================...
714f3654d19a31d6bb64d389bb51d7967b86515c66bcd6158ff0c31b4877b505
MATLAB
17,375
388
% this demo code is part of Titta, a toolbox providing convenient access to % eye tracking functionality using Tobii eye trackers % % Titta can be found at https://github.com/dcnieho/Titta. Check there for % the latest version. % When using Titta, please cite the following paper: % % Niehorster, D.C., Andersson, R. & N...
bbe7681d451a91e1345dccb72f91c1ae9814f5ba8d4382495dfeb8650225aff6
MATLAB
17,392
375
%FIXATION TRAINING state configuration file % % This presents a fixation cross with a stimulus in a loop to train for % fixation. stims should contain 2 stimuli: stims{1} is a attention % grabber, stims{2} is the fixation cross. Adjust stimulus sizes and % eyetracker setting values over training to refine behaviour The...
a8a187a6ffbe4ad5fd7861846763c9eff891fe2caf57eba824ecdc53aa443789
MATLAB
17,445
428
% ======================================================================== %> @class StateNodeTest %> @brief Class-based unit tests for stateNode. %> %> Tests tree construction, addChild, ancestors, lcaWith, effectiveField, %> resolveLeaf, findByName, isAncestorOf, hasParentCycle, inheritFrom, %> setFromStruct, and the...
ed6295648411b70dbf1b5d4be8e432f3081acb8c5e10a1852c28e825def68736
MATLAB
17,497
407
% RFLOCALISER state configuration file. This protocol allows you to elicit % visual responses from a wide range of stimulus classes while a subject % maintains fixation. % % SEE keyboard mapping for the keyboard control keys to use. Basically the % arrow keys to change variable types and values, < and > to change stimu...
270fd23c62d8e4991d03ca2d3abc4636aead0e6b17ac484bb7b52824dda25f63
MATLAB
17,602
379
%FIXATION TRAINING state configuration file % % This presents a fixation cross with a stimulus in a loop to train for % fixation. stims should contain 2 stimuli: stims{1} is a attention % grabber, stims{2} is the fixation cross. Adjust stimulus sizes and % eyetracker setting values over training to refine behaviour The...
409c45dbec18953de221ec31e92969c4de2ef4d87f1326aebbae3644e785e63e
MATLAB
17,602
385
%component maps, dipoles and power spectra in a cluster %ver 2009/02 %% set parameters (initialize) try close(4001); end try close(4002); end try close(4003); end try close(4004); end try close(4009); end clear all; SL = '\'; FilePath = ''; if isunix mypath; FilePath = '~/liang/';...
f10c5dd2ba8e3d49442c8f267b1fb95d5ef829fa054509e1e59bfc0191969eaa
MATLAB
17,644
652
function varargout = MovieGUI(varargin) % MOVIEGUI MATLAB code for MovieGUI.fig % MOVIEGUI, by itself, creates a new MOVIEGUI or raises the existing % singleton*. % % H = MOVIEGUI returns the handle to a new MOVIEGUI or the handle to % the existing singleton*. % % MOVIEGUI('CALLBACK',hObject,ev...
a40a223393409aa6368cd497d62b34bb904f253571a749f20527dfdde551df6e
MATLAB
17,845
411
function [ act, NM, inp ] = nk_MLInterpreterPrep(NM, act, inp, parentstr) % ========================================================================= % FORMAT [act, inp] = nk_MLInterpreterPrep(act, inp, parentstr) % ========================================================================= % Runtime module of interpreta...
f3f9bbdd2d0af63b200cf2c28452c42a0fc31216727615d23d27aa9d59c547e7
MATLAB
17,909
499
% ======================================================================== %> @brief single grating stimulus, inherits from baseStimulus %> GRATINGSTIMULUS single grating stimulus, inherits from baseStimulus %> The basic properties are: %> sf = spatial frequency in degrees %> tf = temporal frequency in degs/s %> ...
4dba336792020e8df70c4beee53b0cffb8643fe71c6f14ce949ca739d727aae3
MATLAB
17,925
436
function [dcm, est, vis] = mripy_plot_DCM(dcm, est, vis) % Plot the general DCM results (A, B, C, etc.) % % dcm: Basic information % ---------------------- % The following are the only thing that you must specify for each plot: % % dcm.a: The 0/1 structure of connectivity % dcm.b: The 0/1 existence of modula...
2b83c9fe72e5629ea8d5870152203f6dcfd10f15167e4b00dcc58ec4b2be5ce8
MATLAB
17,963
498
function [results, center, Cn, PNR, save_avi] = greedyROI_endoscope(Y, K, options,debug_on, save_avi) %% a greedy method for detecting ROIs and initializing CNMF. in each iteration, % it searches the one with large (peak-median)/noise level and large local % correlation. It's the same with greedyROI_corr.m, but with so...
03021d4bf31d5b7df2eccea8c68759b44c17430ae84b32f502deec20aa374e2e
MATLAB
18,017
580
classdef viewer < handle % A viewer should be initialized with all of the data that is known properties parent_figure spec_ax spec_exp spec_fit spec_fit_2 electrode_titles hist_ax hist_line hist_val chisq_ax chisq_ax_txt chisq_vert_line tent_ax xyz_marker vol3d_data red_t...
26a00b8340f85e14ca393a92c7875991ec42e282a9e50cd8926819bfdfa2fbfe
MATLAB
18,017
391
% FIXATION TRAINING state configuration file % % This presents a fixation spot with a flashing disk in a loop to train for % fixation. There is a distractor that moves around and subject must ignore % it. Adjust eyetracker setting values over training to refine behaviour % % % The following class objects are already lo...
dd7b985dff46036da8193cb3aded7469fdcc31320efc0922c79ac8ad62b941b7
MATLAB
18,071
491
% ======================================================================== %> @class RunExperimentTest %> @brief Class-based unit tests for runExperiment. %> %> Tests construction, property defaults, set methods, and many public %> methods that do not require a PTB screen. CI-safe tests run without %> PTB; hardware-tag...
50b22d5a244caa9fa13122ce61d0ebcef4cd32790a743a0e7fbcf563a0a2719b
MATLAB
18,094
426
% FIGURE GROUND state configuration file, this gets loaded by opticka via % runExperiment class. See Jones et al., 2015 PNAS for the description of % this task % % State files control the logic of a behavioural task, switching between % states and executing functions on ENTER, WITHIN and on EXIT of states. In % additi...
366bbc98c2a77f742df6de23d74b8fa88929f58a50686d35e2fddc4f3085913b
MATLAB
18,201
553
function result = cvRpcr(x,y,kmax,rmsecv,h,k) %CVRPCR calculates the robust RMSECV (root mean squared error of cross-validation) curve % for RPCR or the robust RMSEP (root mean squared error of prediction) value in a fast way. % The R-RMSECV curve can be used to make a selection of the optimal number of % components...
46240e657698a5e6400825c733a738a2c770743aa75fc3f7d4b18079bc0225b9
MATLAB
18,253
509
%% mRVM1 % authors: Ioannis Psorakis psorakis@gmail.com, Theodoros Damoulas theo@dcs.gla.ac.uk % Copyright NCR, 2009 % % Use of this code is subject to the Terms and Conditions of the Research License Agreement, % agreed to when this code was downloaded, and a copy of which is available at % http://www.dcs....
dfb671a12967a6f4f4db842e65a7ffd0ed7b782df471ade87dd0eb2b3ff220fc
MATLAB
18,274
383
% AREA SUMMATION state configuration file (also used by other protocols that use a % fixation initiation then stimulus presentation with some variables changing % on each trial, this gets loaded by opticka via runExperiment class. % % The following class objects (easily named handle copies) are already % loaded and ...
0ef1a422ddf1158d2648ede3c380f9bef8288ea7140098572d86045e6a8535ff
MATLAB
18,390
418
function [ act, NM, inp ] = nk_OOCVPrep(NM, act, inp, parentstr) % ========================================================================= % FORMAT [act, inp] = nk_OOCVprep(act, inp, parentstr) % ========================================================================= % Runtime model of independent test data predic...
b1021ffc3039336e84f26987b45d43a361545d49d5aac56bad17c630ed74427a
MATLAB
18,473
466
function PA = nk_PermX(inp, strout, id, GridAct, batchflag) global SVM RFE SAV DR GRD MULTI RAND SCALE DISCRET SYMBOL COVAR TEST MODEFL % %%%%%%%%%%%%%%%%%%%%%%%%%%%%% INITIALIZATION %%%%%%%%%%%%%%%%%%%%%%%%%%%% nclass = inp.nclass; % # of binary comparisons label = inp.label; lx ...
483d273388a872781bb622f34d22a2f5bd9569fb3a0a35d07d4f8829bf205bbc
MATLAB
18,521
521
function [Out1, Out2, Out3, whiteningMatrix, mixedmean] = fastica(mixedsig, varargin) %FASTICA - Fast Independent Component Analysis % ADAPTED by Clara Vetter (add mixedmean as output) % FastICA for Matlab 7.x and 6.x % Version 2.5, October 19 2005 % Copyright (c) Hugo Gävert, Jarmo Hurri, Jaakko Särelä, and Aapo Hy...
22aea407d377223469acd18cc6e481121f1f547bcf17fd2d76ac4c3398aaa59b
MATLAB
18,530
312
function map = inferno_gray(n) % Returns the "inferno" colourmap. if nargin < 1 n = size(get(gcf,'Colormap'),1); end values = [ 0.498039215686275 0.498039215686275 0.498039215686275 0.490196078431373 0.490196078431373 0.490196078431373 0.482352941176471 0.482352941176471 0.482352941176471 ...
1bdcc6fb4c25e9abe860017c43e7fbb9e63a9aca6b2574e038f8cb46ed4199db
MATLAB
18,564
453
function [act, analdim, dat, showmodalvec, brief, indanal] = nk_SelectAnalysis(dat, newflag, ... titlestr, analind, modflag, complflag, showmodalvec, brief, stackmin, nondeterministic) % ========================================================================= % [act, analdim, dim, showmodalvec] = nk_SelectAnalysis...
8111c6a92540522993568d64064c459021f7b647cb666f204130f43a566ac185
MATLAB
18,585
600
%% Demo [Analytics vs Numeric] % % *****NB: Only the numeric function called is modified to include multiple costfun % options while we investigate the proper naming and reorganization of the % analytic functions***** % The goal of this demo is to apply eNDM to mouse data. % Uses numerical solutions for models using ...
9c7debdf464866d5baf516797fe2f37478b971da2b6a9ac8e7a484e7006668d7
MATLAB
18,604
383
%> COLOUR GRATING state configuration file (also used by other protocols that use a %> fixation initiation then stimulus presentation with some variables changing %> on each trial, this gets loaded by opticka via runExperiment class. %> %> The following class objects (easily named handle copies) are already %> loade...
f72fd4f1c82b6b6efb2f6b6db1533c999e3ea0bfb69855d65321d24bb7f9b96b
MATLAB
18,730
424
% DOUBLESTEP SACCADE task (TOUCH SCREEN VERSION) % Based on Thakkar et al., 2015 Brain & Cognition % % This paradigm should be more sensitive to online inhibition than % anti-saccade. % % In nostep trials (60%), after 500-1000ms of initial fixation, a saccade % target (target one) is flashed for 100ms in one of 8 equid...
931462a7aea4ee2a712864937eab4eecb9ac066438810e33f9aa332da0d35d6d
MATLAB
18,775
539
% ======================================================================== %> @class imageStimulus %> @brief Show images or directories full of images %> %> Class providing basic structure for image (texture) stimulus classes. %> You can control multiple aspects of the image presentation, and scale %> images to values ...
e6a8620b5b7e7027b368b6daf0e1434a339706ddf596160ee56041a0cc8cf211
MATLAB
18,934
493
classdef SplashScreen < hgsetget %SplashScreen create a splashscreen % % s = SplashScreen(title,imagefile) creates a splashscreen using % the specified image. The title is the name of the window as shown % in the task-bar. Use "delete(s)" to remove it. Note that images % must be in PNG,...
7ec9c871c98942a7640e9ad10260d4ac0c339e37fd46badafda71e716fccb4c5
MATLAB
19,102
485
% ========================================================================= % = CLASSIFICATION PLOTS = % ========================================================================= function handles = display_classplot(h, handles) axes(handles.axes1); cla; hold on switch ...
8736ca47e9dff75ae42027eaa46275d7208dfbff44a2533935d508027cc0cdf2
MATLAB
19,173
451
function [outSummaryPath, odyn] = SummarizeResults(destMatPath, sc) S0 = load(destMatPath); try VT = S0.fars.VT; catch VT = S0.VT; end samples = S0.samples; nC = numel(sc); nS = S0.fars.nSamples; % ---- Header fields (keep only info derivable or neutral wrt 'stats') --...
5b57d77b9d08047245dd874bc86979fbd49655e2668f2df9df9e6f87b2ed76eb
MATLAB
19,192
497
%% STEP1 load data clc; clear; close all; % 如果需要load不同患者的文件 % filepath = "H:\20240222\figures_k\Unit_info_SU_patients"; % filepath = "I:\930_project\paper_figure\waveform_table\Unit_info_SU\Unit_info_SU_patients\Unit_info_SU_patients_extend"; filepath ='D:\930_paper_plotting\Unit_info\Unit_info\Unit_info_SU_pat...
41e6cd3e6330b46193c8f1528d51963b12a5dea467be0674bddf689812055f50
MATLAB
19,226
667
function fasticag(mixedsig, InitialGuess) %FASTICAG - Fast Independent Component Analysis, the Graphical User Interface % % FASTICAG gives a graphical user interface for performing independent % component analysis by the FastICA package. No arguments are % necessary in the function call. % % Optional arguments can be g...
1f9cb15532cf10c7afd0b55dd10189a54d11ce3a4cc241849c8b45da4e217b80
MATLAB
19,386
447
function result = csimca(x,group,varargin); %CSIMCA performs the SIMCA method. This is a classification % method on a data matrix x with a known group structure. On each group a % robust PCA analysis is performed. Afterwards a classification % rule is developped to determine the assignment of new observations. % % R...
9d740ea7a174010d23b348eac815529b6d937a63714176e99b63afcf4b438f79
MATLAB
19,416
581
function gui_cb(action) % % This file is used by FASTICAG % This file holds the callbacks to the main window % @(#)$Id: gui_cb.m,v 1.5 2003/09/10 10:33:41 jarmo Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Global variables % Handle to the main figure global hf_FastICA_MAI...
05496157d5701a21b295bd3807c652eb25231e557376a2907931bc5ddf8f4c2c
MATLAB
19,419
509
<<<<<<< HEAD function save(this,filename,encoding) % Save GIfTI object in a GIfTI format file % FORMAT save(this,filename,encoding) % this - GIfTI object % filename - name of GIfTI file to be created [Default: 'untitled.gii'] % encoding - optional argument to specify encoding format, among % AS...
708671b801e2f1be3af5546c5dad89eda5eff745e41bb65cd5a02979c57236dd
MATLAB
19,454
626
function PC_bursting(EventTypes,rectype,plot_win) % PC_BURSTING Spike-phase coupling and bursting index % PC_BURSTING(event,colors,resdir,chanmean,PC_win) % -correlates spike-phase coupling measures with bursting index of % significantly coupled units and of responsive units % -separates uni...
93262dcc5c1231da9d4eb366fca6ac035013f0545cd51e761fbbe0739d184078
MATLAB
19,523
479
% Preprocessing for drowsiness (long-term and single trial) in BRC % by poem % recovered in 2008/6 % clear all; FilePath = ''; if isunix mypath; FilePath = '~/Drowsiness/'; SL = '/'; end DataFormat = '16'; SET = { % 's18_060120'; % 's18_060121'; % 's18_060228'; % 's22_060718A'; % ...
34ffbf2e635d54fa42c2fe61f62c25bb45d36c3614dc3a18363d84d105a58789
MATLAB
19,565
367
function [RANK, PX] = nk_Rank_config(RANK, PX, NM, varind, defaultsfl, parentstr) if ~exist('defaultsfl','var') || isempty(defaultsfl), defaultsfl = 0; end ranktype = 1; weightmethod = 1; label = NM.label; labeldesc = 'NM target label'; algostr = 'pearson'; act = ...
9b1b835fa1dc4e2aeb8fa6ee1a8efff821e9da7eaff7539a0b6326fd0e2e5693
MATLAB
19,690
499
function [center, Cn, PNR] = initComponents_parallel(obj, K, frame_range, save_avi, use_parallel, use_prev) %% initializing spatial/temporal components for calcium imaging data %% input: % K: scalar, maximum number of neurons % frame_range: 1 X 2 vector indicating the starting and ending frames % save_avi: save ...
9ac7167c20965c02ed4abb27dbfafb49415fa78d4627c670fd40365c02a07ade
MATLAB
19,724
500
function nm(varargin) % % NeuroMiner Startup and Main Interface Function % % ******************************************* % ****\ /**** % *****\ ~~~~~~~~~~~~~~~~~~~~~ /***** % ******\ N e u r o M i n e r /****** % *******\ ~~~~~~~~~~~~~~~~~~~~~ /******* % *******/ ...
977fe0d55ae030f32b6393f74a74b0fb3581b43ce8a3bfbcb6e3ddf9281a4bf3
MATLAB
19,768
574
% ======================================================================== %> @class imageStimulus %> @brief Show images or directories full of images %> %> Class providing basic structure for image (texture) stimulus classes. %> You can control multiple aspects of the image presentation, and scale %> images to values ...
a6ad8ff214385be8c24d6a6ee4019812d529c604ecfcb2ee98b1d615b84dd831
MATLAB
19,783
300
function ProcessedData = plotStatsInEachRegion(AnalysisRegions,InjuryIndicies,ProcessedData,plotProps,sw) %This function plots the firing count and interval histograms either by %analysis region or before vs. after treatment based on user preference %(instead of for the entire recording) %% Get histogram bins ...
b749292997a5f69bf65d6fd85543e9fbb8c55c37706dff8b49827fbd4f6a410c
MATLAB
19,793
464
function result=rpcr(x,y,varargin) %RPCR is a 'Robust Principal Components Regression' method based on ROBPCA. % It can be applied to both low and high-dimensional predictor variables x, % and to one or multiple response variables y. It is resistant to outliers % in the data. First, a robust principal components meth...
927c33b1cb454812405ab02d01505bc96eb6be2157936e508c302422ea122e75
MATLAB
19,815
446
% ======================================================================== %> @class ImageStimulusTest %> @brief Class-based unit tests for imageStimulus. %> %> Tests construction, property defaults, checkfilePath default image %> resolution, file path handling, selection indexing, contrast scaling, %> crop modes, and ...
6bbc6ddf7501da29a86a2ccafa8d9644f344fe9437f9f0f17cdff9babb6ed516
MATLAB
19,849
482
% PRO-SACCADE and ANTI-SACCADE Task (TOUCH SCREEN VERSION) % % This task supports both pro and anti saccades and uses 3 stimuli: % (1) pro-saccade target % (2) anti-saccade target and % (3) fixation cross. % % TOUCH VERSION: this protocol replaces the eyetracker (eT) with the % touchManager (tM). Touch windows are used...
7f2087968c76712e2554646c377d24a01e9a1e507d2eb76e1a1724bea655b0fa
MATLAB
19,881
417
function [act, analdim, p, GridAct, mapY, strout] = nk_PreprocessPrep( act, analdim, GridAct, p, parentstr) % ========================================================================= % FORMAT function [act, analdim, p, GridAct, mapY, strout] = ... % nk_PreprocessPrep( act, analdim, GridAct, p, parent...
5730fef1ee396b94f99aeaddd0a9ebc444ed3ab269c68cba7219d61ac5fd9d1c
MATLAB
19,958
532
% ======================================================================== %> @brief logGaborStimulus: orientation & SF band-pass limited filter %> %> If you use this in published research please cite "Horizontal information drives the %> behavioral signatures of face processing" Goffaux & Dakin (2010) Frontiers in Pe...
0ff4b1eb37765d43953b25e6a142bfd9fe370acd39a691d4606bdad046030949
MATLAB
20,020
528
% DR_loadcnt() - Load a Neuroscan continuous signal file. % % Usage: % >> cnt = loadcnt(file, varargin) % % Inputs: % filename - name of the file with extension % % Optional inputs: % 't1' - start at time t1, default 0 % 'sample1' - start at sample1, default 0, overrides t1 % 'lddur' - duration ...
9c8a520bb4c9dda55025618866638d2ff7373128f41d4620e46a175774e0027a
MATLAB
20,122
566
%% mRVM1 % authors: Ioannis Psorakis psorakis@gmail.com, Theodoros Damoulas % theo@dcs.gla.ac.uk % Copyright NCR, 2009 % % Use of this code is subject to the Terms and Conditions of the Research License Agreement, % agreed to when this code was downloaded, and a copy of which is available at % http://www.dc...
327ee8baf7cbf7d5c2382f58b9ec3a08aa48a285d4c938ae633b186d75a3b8d2
MATLAB
20,187
426
function [mappedA, mapping] = compute_mapping(A, type, no_dims, varargin) %COMPUTE_MAPPING Performs dimensionality reduction on a dataset A % % mappedA = compute_mapping(A, type) % mappedA = compute_mapping(A, type, no_dims) % mappedA = compute_mapping(A, type, no_dims, ...) % % Performs a technique for dimension...
f94b8716d7e5395d56f607d5fbb0aa6b763696d97a6fd7dfc7b12aad61b14bf7
MATLAB
20,239
589
function handles = plotSpread(varargin) %PLOTSPREAD plots distributions of points by spreading them around the y-axis % % SYNOPSIS: handles = plotSpread(data,binWidth,spreadFcn,xNames,showMM,xValues) % handles = plotSpread(ah,...) % % INPUT data: cell array of distributions or nDatapoints-by-mDistributions % ...
fe651c1df021be32934846b03fd98698937b7008965b76af0fdab63f2192eeaa
MATLAB
20,263
511
function varargout = nk_results(varargin) % NK_RESULTS MATLAB code for nk_results.fig % NK_RESULTS, by itself, creates a new NK_RESULTS or raises the existing % singleton*. % % H = NK_RESULTS returns the handle to a new NK_RESULTS or the handle to % the existing singleton*. % % NK_RESULTS('CALL...
abe4cc477b6ce7f9946260268f5c8bc0e55d4ba515083997eeea1b65e8ea2197
MATLAB
20,336
510
function [noise_data refscan_data image_data]=datapack_VE(twix_obj,varargin) noise_data=[]; refscan_data=[]; image_data=[]; %setting up defaults file_prot='meas.asc'; %default protocol file name file_raw='meas.out'; %defualt rawdata file name flag_debug=0; flag_debug_file=0; output_stem='meas'; flag_scan_mdh_o...
500557db6db4c2532f8bd863cb54e1712b0fe8f4b8b102366f74ff5c9b20763c
MATLAB
20,341
685
% ======================================================================== %> @brief receptive field mapper %> rfMapper is a mouse driven receptive field mapper, using various keyboard %> commands to change the stimulus and and ability to record where the mouse is %> (i.e. draw) in screen co-ordinates to save as a hand...
88cfc4d14e725dc6768fe366d97d05fd518b94225555eb0af1dbfb4dc9fe4dba
MATLAB
20,481
599
classdef timeLogger < optickaCore %> @brief Log frame timing and event annotations for a task run. %> %> The class stores per-frame timing values such as VBL, draw, flip, miss, %> and stimulus state, together with timestamped messages that can include %> time type metadata and optional HED annotations. The logged ...
22650aa1726d41008a89a725a867c301db4f942bef4160f153095d739a967d08
MATLAB
20,505
396
clear %% load file load('ProcessedData\OutputTable.mat'); load('ProcessedData\InputParameters.mat'); %% Pre-Processing % any manual trimming of the main table or adjustments % exmaple to drop to one animal or day % OutputTable = OutputTable(strcmp('LEC285598', OutputTable.Animal) == true,:); % OutputTable = Ou...
fea622719d524ac5d675029b28f55741881d7cb19a3bc9858e4b6dec55d028b9
MATLAB
20,546
457
% DOUBLESTEP SACCADE task, Thakkar et al., 2015 Brain & Cognition % % This paradigm should be more sensitive to online inhibition than % anti-saccade. % % In nostep trials (60%), after 500-1000ms of intial fixation, a saccade target % (target one) is flashed for 100ms in one of 8 equidistant positions. In % step trial...
630d0ab7ccd5a25f8fd0bd0a5ec212f9a30e3b023ab6e5d52f35829027836fcc
MATLAB
20,560
455
% DOUBLESTEP SACCADE task, Thakkar et al., 2015 Brain & Cognition % % This paradigm should be more sensitive to online inhibition than % anti-saccade. % % In nostep trials (60%), after 500-1000ms of intial fixation, a saccade target % (target one) is flashed for 100ms in one of 8 equidistant positions. In % step trial...
12c3059f358f071fab6951ec9afa89ae4585b84ecdd38e5a67ad3edaa31bd785
MATLAB
20,581
506
% ========================================================================= % cv = nk_MakeCrossFolds(label, RAND, ... % decomposeflag, modeflag, groups, groupnames, ... % oldcv, appendfl, auto_adjust) % =======================================================================...
369e0b78c59f3311f8613c50c31188a65dbeaaaadfa0d16792c1388394b011b2
MATLAB
20,641
376
% ========================================================================== function opt = nk_matLearn_getopts_config(opt, act, algo, param, framework) if ~exist('param','var'), param = []; end switch act case {'get_learners','get_sublearners'} opt.desc = sprintf('Select %s algorithm fro...
3dd95f027907c085950398d5ca611eab60581caaacf3036966798c0a967b2d80
MATLAB
20,697
487
function result=cda(x,group,varargin) %CDA performs linear and quadratic classical discriminant analysis % on the data matrix x with known group structure. % % Required input arguments: % x : training data set (matrix of size n by p). % group : column vector containing the group numbers of the traini...
9aee57fab225ff15a2d9eb5cfea40194f06b7d29fbc912daba067250227ef4d3
MATLAB
20,705
591
% ======================================================================== %> @brief barStimulus single bar stimulus, inherits from baseStimulus %> %> Copyright ©2014-2024 Ian Max Andolina — released: LGPL3, see LICENCE.md % ======================================================================== classdef barStimulus <...
fc019cdc72aed60ea23cf86f69fb6f0dd781e80d15ef064f26bef690caadb2bb
MATLAB
20,919
459
function [ act, NM, inp ] = nk_OOCVPrep(NM, act, inp, parentstr) % ========================================================================= % FORMAT [act, inp] = nk_OOCVprep(act, inp, parentstr) % ========================================================================= % Runtime model of independent test data predic...
fb09838bb15bbaf18d40cc7a5f1f1e9c45e1671e89f80780155f0dc6aa06f353
MATLAB
20,958
487
% DELAYED MATCH TO SAMPLE (DMS): The subject fixates a central cross, % then a sample image appears. After a delay period (maintaining % fixation only), a choice array of images appears at peripheral locations. % The subject must saccade to the image matching the sample to receive % a reward. Distractors are guarded by...
c57a2b0bcd53a8bd8c4cb64c1df3dc7e86a5293e51dba0a6badf3f4e32e840c4
MATLAB
20,971
534
function Hash = DataHash(Data, varargin) % DATAHASH - Checksum for Matlab array of any type % This function creates a hash value for an input of any type. The type and % dimensions of the input are considered as default, such that UINT8([0,0]) and % UINT16(0) have different hash values. Nested STRUCTs and CELLs are par...
4e961c16147630113b527ffd097e046be7b5d83ae288ebfffda85debf30a0638
MATLAB
20,989
635
% ======================================================================== %> @class JzmqConnectionTest %> @brief Class-based unit tests for jzmqConnection (ØMQ via JeroMQ). %> %> Tests construction/validation, endpoint generation, socket lifecycle %> (bind/connect types, double-open guard, context ownership on close),...
129821016f4506fe5332dab38620c2f5d5e934804b9b2d53c47690ebbbba47dc
MATLAB
21,014
688
function choice = menuN(mtitle, options, Opt) %% MENUN A modern rewrite of menuN using uifigure and uigridlayout % % Syntax: % choice = MENUN(mtitle, options) % choice = MENUN(mtitle, options, Opt) % % Input: % mtitle - [string OR cell with 2 elements] - Menu window title and message % - {'Menu title','M...
f0cce34b181a265b3dbb9f7d0f96c1cbb62c228fcd5bd886d4a56d255f1b9bb7
MATLAB
21,123
411
clear %% load file load('OutputTable.mat'); load('InputParameters.mat'); load('Behavior_TraceTable.mat'); %% Pre-Processing % any manual trimming of the main table or adjustments % exmaple to drop to one animal or day % OutputTable = OutputTable(strcmp('NEC273332', OutputTable.Animal) ~= true,:); % OutputTable...
d1846a27b76fe4680315a7c5b92a37f2603c5a41a36e163688af937345b698ed
MATLAB
21,196
409
clear %% load files load('OutputTable.mat'); load('InputParameters.mat'); %% Pre-Processing % any manual trimming of the main table or adjustments % exmaple to drop to one animal or day % OutputTable = OutputTable(strcmp('LEC285598', OutputTable.Animal) == true,:); % OutputTable = OutputTable(OutputTable.Day ==...
db0d55c54d390d0e3a0bfa3546b425508cdaa0ef369f6d27c8e460753d2fe28d
MATLAB
21,315
441
%========================================================================== % [IN, OUT] = FoldPerm(IN, OUT, strout, fRFE, fFull, fKX, LoopParam) %========================================================================== % MAIN NM TRAINING MODULE % FoldPerm manages the logic of model training and optimization at the %...
1f3c3b4e36d69c3da154485f6c934613400058e26f5a6464189918b5b8ba10c9
MATLAB
21,321
581
function rc = eyelinkCustomCallback(callArgs, msg) % eyelinkCustomCallback implementes the EyeLink Core Graphics part % of the EyeLink API. This "Core Graphics" part of our API is responsible % for handling the times when the API and Host PC takes control of the eye % tracking procedures. This includes the functionalit...
6908cdb24066caa1537aaa6188a62888387c6f40fc4468118970680540fc89db
MATLAB
21,348
426
function varargout = palm_help(varargin) % Shows a help text. Call palm_help('logo') to show just the logo. % _____________________________________ % Anderson M. Winkler % FMRIB / Univ. of Oxford % Mar/2014 % http://brainder.org % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % PALM -- Permut...
83c8622376e98673360a3dbd09963a621c0cf55902cbe4894036b8e8babdfe61
MATLAB
21,423
452
%> BACK-PROPAGATION -- fast full-screen receptive field mapping for many %> channels. %================================================================== %------------------------General Settings-------------------------- % These settings are make changing the behaviour of the protocol easier. tS % is just a struct(),...
1cb5498fa0ca8320704fa032bb2652e66f3653f3aba3d90c3890b71754462658
MATLAB
21,493
516
% Preprocessing for drowsiness (long-term and single trial) in BRC % by poem % ver 200809 clear all; FilePath = ''; if isunix mypath; % FilePath = '~/Drowsiness/'; FilePath = '~/liang/'; HeadFilePath = '/home/eeglab5.03/eeglab5.03/plugins/dipfit2.0/standard_BESA/'; %.4 SL = '/'; end hdmfile = [HeadFilePath ...
dcd91a0f4684cc7ec2c250f50f11817541880e43b07be484873583df8908bd61
MATLAB
21,551
473
function data = TDT2mat(tank, block, varargin) %TDT2MAT TDT tank data extraction. % data = TDT2mat(TANK, BLOCK), where TANK and BLOCK are strings, retrieve % all data from specified block in struct format. % % data.epocs contains all epoc store data (onsets, offsets, values) % data.snips contains all...
53621ff867e691801f3039f5fd7ab9bb6ae8b27594e19c782a5346ef975ec62f
MATLAB
21,575
519
function result=rsimpls(x,y,varargin) %RSIMPLS is a 'Robust method for Partial Least Squares Regression based on the % SIMPLS algorithm'. It can be applied to both low and high-dimensional predictor variables x % and to one or multiple response variables y. It is resistant to outliers in the data. % The RSIMPLS algori...
8d8e8b2faa0ad429e045a26da5b00e95817fbe862eb5e9c271791626b02785be
MATLAB
21,605
440
%========================================================================= %-----------------------------General Settings---------------------------- % These settings are make changing the behaviour of the protocol easier. tS % is just a struct(), so you can add your own switches or values here and % use them lower dow...
dd73057f10be5db1303e99b91548b22744325b18b2ce6da75c2841cfde2eb963
MATLAB
21,612
440
%========================================================================= %-----------------------------General Settings---------------------------- % These settings are make changing the behaviour of the protocol easier. tS % is just a struct(), so you can add your own switches or values here and % use them lower dow...
5fd83d858ecbfe4f8ddff3ff82a2a025413fe5343af2835b549d3a3a4e4c19b7
MATLAB
21,630
445
%========================================================================= % This task presents a face vs. object stimulus pairs randomly placed left % or right of fixation. The subject must initiate fixation, then the % fixation window encompasses most of the screen to allow free viewing of % either object or face but...
17b6a61d879ef678801a1329923ade9c1b6a2de004771b59601acfbe5c4f5380
MATLAB
21,788
596
close all; clc; clearvars; %% CAP analysis for concurrent fMRI and fluorescence data % %% Paths scriptDir = fileparts(mfilename('fullpath')); if isempty(scriptDir) scriptDir = pwd; end fmriFolder = fullfile(scriptDir, 'data', 'fMRI', 'cleaned'); flFolder = fullfile(scriptDir, 'data', 'FL', 'cleaned', '10Hz');...
1d151e6e47c53435d3e130f7f407417d2baec193db80c9ecdf3fc0ad5233da9f
MATLAB
21,815
504
function outputs = stdNDM_mouse(varargin) % Parameters to fit % param(1) = seed rescale factor % param(2) = alpha % param(3) = beta % param(4) = s % Define defaults and set inputs study_ = 'IbaHippInj'; costfun_ = 'LinR'; solvetype_ = 'analytic'; volcorrect_ = 0; exclseed_costfun_ = 0; excltpts_costfun_ = []; normtyp...
1dcab45e7f39c7662a2347f36b755572ac4af3ea335b9c8c283a577c5383daff
MATLAB
21,894
549
% ======================================================================== %> @class stateMachineHSM %> @brief hierarchical state machine (HSM) with parent/child nesting. %> %> stateMachineHSM extends stateMachine to support hierarchical (nested) %> states. Each state may declare a `parent` field (a state name). A stat...
1e0912e4cd1274872f71f1dca2dde50a6419870ae2e8cfdfe36e98b84e0a7996
MATLAB
21,947
604
% ======================================================================== %> @brief colour grating stimulus, inherits from baseStimulus %> COLOURGRATINGSTIMULUS colour grating stimulus, inherits from baseStimulus %> The basic properties are: %> type = 'sinusoid' or 'square', if square you should set sigma which %>...
4691854b1dbe6cadafc32f7a35a0530aeebfe8a36711b32cf64530f096073ea6
MATLAB
21,983
605
% ======================================================================== %> @brief colour grating stimulus, inherits from baseStimulus %> COLOURGRATINGSTIMULUS colour grating stimulus, inherits from baseStimulus %> The basic properties are: %> type = 'sinusoid' or 'square', if square you should set sigma which %>...
a23556ed02e1f3a633590fad25018ddf4cbbf6cd8c9802188ef59308196f6ab0
MATLAB
21,993
471
% DOUBLESTEP SACCADE task, Thakkar et al., 2015 Brain & Cognition % In nostep trials (60%), after 500-1000ms intial fixation, a saccade target % (target one) is flashed for 100ms in one of 8 equidistant positions. In % step trials (40%) after taget one flashes after a delay (target step % delay, TSD) a second target (...
3e62623439380187d6d0f0095a6d0eab9eb3e8c779aa5a9f36b2c7443b9b598d
MATLAB
22,007
592
% timefreq2004() - compute time/frequency decomposition of data trials. % % Usage: % >> [tf, freqs, times] = timefreq(data, srate); % >> [tf, freqs, times, itcvals] = timefreq(data, srate, 'key1', 'val1', ... % 'key2', 'val2' ...) % % Inputs: % data = [float array] ...
d292b37d14f17e235d03b02498083139ff78988c1089bbf25e250178d7fdfbfc
MATLAB
22,051
309
function handles = load_GDdims(handles, Params, Label, GDdims) handles.MLparams = []; handles.grid = []; % Add binary-classification data to handles if isfield( GDdims,'Model') handles.MLparams = GDdims.Model; elseif isfield( GDdims,'MLparams' ) handles.MLparams = GDdims.MLparams; else handles.MLparams.Nu...
0f12d7f96c4c5b21b1b60d974517331442b0b421c79ab06f406c2918eee7df08
MATLAB
22,082
613
% ======================================================================== %> @brief polar checkerboard stimulus, inherits from baseStimulus %> POLARBOARDSTIMULUS inherits from baseStimulus %> The basic properties are: %> type = '', 'randdrift', 'spiraldrift', 'sine' %> colour = first grating colour %> colour2 =...
2fb112206cdf9fa0c8ab45588b454d3f5ef28d759035382ccb5b2f5584c073db
MATLAB
22,084
613
% ======================================================================== %> @brief polar checkerboard stimulus, inherits from baseStimulus %> POLARBOARDSTIMULUS inherits from baseStimulus %> The basic properties are: %> type = '', 'randdrift', 'spiraldrift', 'sine' %> colour = first grating colour %> colour2 =...