sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
4e2465abee330c1b60407d10433f49a78e39100b9658800a1c2992434cdf345c
MATLAB
12,599
305
% ======================================================================== %> @class FixationCrossStimulusTest %> @brief Class-based unit tests for fixationCrossStimulus. %> %> Tests construction, property defaults, type list validation, colour %> handling, alpha2, lineWidth, showDisk, flash/pulse modes, colour2 %> pro...
380628e5e3e4ef4c5e8a0187d1efff2acc0999d55fda0e8f7a8a9419e2a9a4c2
MATLAB
12,736
308
function [fd,subjects] = calcFD(subjects,subjectpath,options) % Calculate the fractal dimensionality of a 3D structure. % Designed to work with intermediate files from FreeSurfer analysis pipeline % (ribbon.mgz, aparc.a2009s+aseg.mgz, and others). % Also can use other mgz volume as input (e.g., see 'benchmark folder'...
62073ac66cd6f45d26a553db3d5734173196e18963b0bef55a859048306d1428
MATLAB
12,795
244
% only epochrej using eeglab function eeglab_only_rejection (subject) path_file = 'E:\\Srijita\\Data Files\\Behavior Pilots\\2-back\\Unfamiliar-constant (new analysis, Jan 22)\\EEG Analysis\\'; path_save = 'E:\\Srijita\\Data Files\\Behavior Pilots\\2-back\\Unfamiliar-constant (new analysis, Jan 22)\\EEG Analysis...
b6c18cb427706bbfa3021e98def254e52154f824881bdc4c94f94dcf4855e319
MATLAB
12,796
290
% Comparing power between 2 of the followings: baseline, whole epoch, and after dev_on [single subject] % ver 200901 by poem %% set parameters (initialize) clear all; SL = '\'; FilePath = ''; if isunix mypath; FilePath = '~/liang/RS/'; %directory SL = '/'; end DR_PBase_setup; %datasets PLOT_SET = { ...
31a501f0d71b28d68b32dc3350ebc269c7633d074a10bcb3f4b830caef68cc09
MATLAB
12,813
400
% ======================================================================== %> @brief apparentMotionStimulus, inherits from baseStimulus %> %> apparentMotionStimulus is a simple apparent motion stimulus, comprising %> of a bar which flashes on and off across a series of spatial positions. %> %> Copyright ©2014-2022 Ian ...
390c779b4bf1068399e08d4c92e3088d5e1f507369a627e140cfb87dffe8012c
MATLAB
12,826
269
% Define the directories and files clear all setup_paths; eye_data_dir = DATA_ROOT; neural_data_file = 'Mars_TOJ_timestamp.xlsx'; % Get the list of eye movement data files eye_data_files = dir(fullfile(eye_data_dir, 'Mars_TOJ_eyedata_marker_per_block_matched_list*_r*_b*.csv')); %% Define the parameters for t...
e112f53a5e8017d0f845ea1a386039cb76c865875b41b2a1167bd8855f450889
MATLAB
12,827
406
%Code from https://www.mathworks.com/matlabcentral/fileexchange/30733-hatchfill % Neil Tandon. Hatchfill (https://www.mathworks.com/matlabcentral/fileexchange/30733-hatchfill), MATLAB Central File Exchange. function H = hatchfill(A,STYL,ANGLE,SPACING,FACECOL) %% HATCHFILL Hatching and speckling of patch objects ...
e70d266ad0010fc50aca439a9ee2f95456a789408671fa18ed952adb831a7513
MATLAB
12,863
278
%% Demonstration of a command-driven setup of an Opticka MOC Experiment. % Opticka is an object-oriented framework plus optional GUI for the % Psychophysics toolbox, allowing randomised interleaved presentation of % parameter-varying stimuli specified in experimenter-relevant values. It % is designed to work on Linux, ...
35525fff049caeb8f90e83454c703383260e58fd165896864ab3d04d51011981
MATLAB
12,890
295
<<<<<<< HEAD function this = subsasgn(this, subs, A) % Subscript assignment for GIfTI objects %__________________________________________________________________________ % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging % Guillaume Flandin % $Id: subsasgn.m 6513 2015-08-05 17:52:13Z guillaume $ swit...
6dbe324624f1ced1957e932e1a21009dfef046dd2c2afbe844cf2ddffe670444
MATLAB
12,900
466
function varargout = boundedline(varargin) %BOUNDEDLINE Plot a line with shaded error/confidence bounds % % [hl, hp] = boundedline(x, y, b) % [hl, hp] = boundedline(x, y, b, linespec) % [hl, hp] = boundedline(x1, y1, b1, linespec1, x2, y2, b2, linespec2) % [hl, hp] = boundedline(..., 'alpha') % [hl, hp] = boundedline(...
0a9a5f35cb3b8202acdbfcb090d9355085b5caf2a55c51dbf8012222c1ec9f11
MATLAB
12,910
315
% ======================================================================== %> @class PolarBoardStimulusTest %> @brief Class-based unit tests for polarBoardStimulus. %> %> Tests construction, property defaults, type list, custom properties, %> sf/sf2 spatial frequency, colour/colour2, contrast, mask, phase, %> direction...
0fec66f04c2720c7854af4736fd4029bec446e08eed00355b0adf0f21c4a1998
MATLAB
12,931
292
function M_final = apply_shifts(Y,shifts,options,td1,td2,td3,col_shift) % apply shifts using fft/cubic or linear interpolation % INPUTS % Y: Input data, can be already loaded in memory as a 3D % tensor, a memory mapped file, or a pointer to a tiff stack % shifts: calculated ...
b79f2a2af55dd47ccd23078cba31e60914a123f488d1e5e9c90698e3d78ae74a
MATLAB
12,942
279
%% Demonstration of a command-driven setup of an Opticka MOC Experiment. % Opticka is an object-oriented framework plus optional GUI for the % Psychophysics toolbox, allowing randomised interleaved presentation of % parameter-varying stimuli specified in experimenter-relevant values. It % is designed to work on Linux, ...
e1b706703043d008216f890fc02b0cf61043446102c7e2189af8f46f5c491881
MATLAB
12,942
376
% ======================================================================== %> @class dotlineStimulus %> @brief Show lines made of dots %> %> Class providing basic structure for dotline (texture) stimulus classes. %> You can control multiple aspects of the image presentation, and scale %> images to values in degrees, ro...
9287142b2aff381542bb2deb8fbe56d47c88f85c186e29c2b52401807bf4f2e9
MATLAB
12,963
391
function varargout = ccal(varargin) % CCAL M-file for ccal.fig % CCAL, by itself, creates a new CCAL or raises the existing % singleton*. % % H = CCAL returns the handle to a new CCAL or the handle to % the existing singleton*. % % CCAL('CALLBACK',hObject,eventData,handles,...) calls the local ...
9225e4fd746ed8be7be663b876a8c03f8cbd60aafc7c66fb23af8eeaa986e055
MATLAB
12,993
537
function binocularStimulation(in) % Version 1.13 movieRecord = false; if ~exist('in','var') in.stereoMode = 8; in.distance = 57.3; in.ppcm = 36; in.bg = [0 0 0]; in.left = [0.8 0 0]; in.right = [0 0.3 1]; in.type = 'checkerboard'; in.sf = 0.1; in.tf = 0; in.flash = 0; in.anglemod = 0.2; in.sfmod = 0; in....
b528110e3b02eb454bcdfda449461a5f6ab652fc7779af7dd30755afc2c029c5
MATLAB
12,998
408
function [x, infos] = nenmf(V, rank, in_options) % Nesterov's accelerated non-negative matrix factorization (NeNMF). % The problem of interest is defined as % % min || V - WH ||_F^2 + r(H), % where % {V, W, H} > 0 and r(H) is a regularizer. % % % Given a non-negative matrix V,...
6c4aefe069e625f4dbc1f5112fdc66b48e28fabfeaf9179c034e97c3900afd78
MATLAB
12,999
412
function [sY, IN] = nk_PerfStandardizeObj(Y, IN) % ========================================================================= % FORMAT function [sY, IN] = nk_PerfStandardizeObj(Y, IN) % ========================================================================= % Standardisation of matrix Y using different types of estima...
d1eac7eb7dda7a3497fe657b25f042e7a5f702dc99c12b7a67b8a2d8240e14a0
MATLAB
13,023
400
% ======================================================================== %> @brief apparentMotionStimulus, inherits from baseStimulus %> %> apparentMotionStimulus is a simple apparent motion stimulus, comprising %> of a bar which flashes on and off across a series of spatial positions. %> %> Copyright ©2014-2022 Ian ...
3212b29938db3a28085721f2ccaa9c1dfbc26505a22cdaac59a773e10bae5d8a
MATLAB
13,048
330
function [ mW, mP, mR, mSR, mC, W, mPA ] = nk_VisXWeight(inp, MD, Y, L, varind, P, F, VI, decompfl, memprob, procfl, Fadd) % ========================================================================= % [mW, mP, mR, mSR, mC, W, mPA ] = nk_VisXWeight(inp, MD, Y, L, varind, ... % P,...
b6226b13036e7fba5999f2eb4b25d9d819d471b3c544070164e2f88b2f72bc73
MATLAB
13,072
346
function [X, istop, itn] = lsqr2( A, B, damp, itnlim, atol, btol, show) % This function is provided at % http://www.stanford.edu/group/SOL/software/lsqr.html % I have made small modifications -- Deng Cai, April/2006 % % % function [X, istop, itn] = lsqr2( A, B, damp, itnlim, atol, btol, show) % % [ x, istop, ...
8097680c0508099f8ea2fb3fbc6c795dbdb79734fed21542fe4948523af06f97
MATLAB
13,096
294
% Comparing power between 2 of the followings: baseline, whole epoch, and after dev_on [single subject] % ver 200903 by poem %% set parameters (initialize) clear all; SL = '\'; FilePath = ''; if isunix mypath; FilePath = '~/liang/RS/'; %directory SL = '/'; end DR_PBase_setup; %datasets PLOT_SET = { ...
e514391f8a00748e43939249d3052b5f0248f8253e921bd2f1f6edbfc89704fe
MATLAB
13,126
441
function gui_adv(x, y) % % This file is needed by FASTICAG % This is the advanced options -dialog % @(#)$Id: gui_adv.m,v 1.4 2004/07/27 13:09:26 jarmo Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Global variables % Handle to the window global hf_FastICA_AdvOpt; % Handles...
796367a4682e7af6e052afe36732849c411a3428f24014ae3bb1ffb302a46dfb
MATLAB
13,153
328
function [c, s, options] = deconvolveCa(y, varargin) %% infer the most likely discretized spike train underlying an fluorescence trace %% Solves mutliple formulation of the problem % 1) FOOPSI, % mininize_{c,s} 1/2 * norm(y-c,2)^2 + lambda * norm(s,1) % subject to c>=0, s>=0, s=Gc % 2) constrained FOOPSI...
09886a78dbb436e8c4a4564608af1abcb184ce30df13a48a85ec8f6b4b19b6ce
MATLAB
13,185
318
% ======================================================================== %> @class DotlineStimulusTest %> @brief Class-based unit tests for dotlineStimulus. %> %> Tests construction, property defaults, type/interpMethod lists, %> itemSize, itemDistance, phase, direction, forceOrthogonal, useEven, %> colour2, contrast...
74e381919ce4112886cb4757e6e18197bfda58dd202cc424228539c3021d8a01
MATLAB
13,197
351
% For any classifier code below, there's no error as i'm pulling a set % group of cells each time. Final output of the values as is are in an % array called day_pct for each chunk; reformated into "viewer" to make % copy/paste easier. clear load('ProcessedData\tables_compiled.mat'); %% calculate sparsness for ...
7c6695f309298279e9f7b3d4359f9657e2d9f3256803196e35cbdf7671cb78e1
MATLAB
13,259
397
function icaplot(mode, varargin); %ICAPLOT - plot signals in various ways % % ICAPLOT is mainly for plottinf and comparing the mixed signals and % separated ica-signals. % % ICAPLOT has many different modes. The first parameter of the function % defines the mode. Other parameters and their order depends on the % mode. ...
4ea80666345e7006012eff83f79d2cd695c8484b6aedcb3d83b183ebdea2ffa5
MATLAB
13,269
336
classdef SpcCutter < MClust.Cutter % % Select clusters from those generated by KKwik % % Version control: ADR-2013-12-12 properties figHandle_AvgWV = []; figHandle_ISI = []; whoHasFocus = []; whoHasComparison = []; rootCluster = []; C = []; ...
aa02ff9d77f2c8fd3cb0798c91c6895dbd20b5cc544a364149489ab78692026f
MATLAB
13,447
404
%% FUNCTION MultiSource_LogisticR % Incompletet Multi-Source Learning with Logistic Loss (optimization) % This function is not intended to directly called by users. % See the Logistic_iMSF function. % %% OBJECTIVE % see manual. % %% INPUT % A_Set: {n * d} * t - input. The cell array of data. Each cell should ...
9840d28df0a8dc9c29afffc725957c09194f36c9c9ccb6ba91d3072b80e7e69b
MATLAB
13,477
348
function mediansplitBI_PSTHs(EventTypes,partition,parttags,group,patgr) %MEDIANSPLITBI_PSTHS Peri-event time histogram (PSTH) of units separated by median bursting index % MEDIANSPLITBI_PSTHS(EventTypes,partition,parttags) % generates average PSTH plots (with standard error) for low- and % high burstin...
d8e2dabd721b3778e7d2e5133bd3658abed5f213a6c619d621285f1622359cd3
MATLAB
13,524
395
% ======================================================================== %> @brief draw fixation cross from Thaler L, Schütz AC, %> Goodale MA, & Gegenfurtner KR (2013) "What is the best fixation target: %> The effect of target shape on stability of fixational eye movements." %> Vision research 76, 31-42 <http://...
889fcf296063a907a1fb2e1d4c390e69b1f37e86e325394a431972b0a5d6c793
MATLAB
13,548
395
% ======================================================================== %> @brief draw fixation cross from Thaler L, Schütz AC, %> Goodale MA, & Gegenfurtner KR (2013) "What is the best fixation target: %> The effect of target shape on stability of fixational eye movements." %> Vision research 76, 31-42 <http://...
766256461cb6593eadbb303e25f6bead8d59fd020265fd1f9ef210b65f27bb53
MATLAB
13,677
381
function [ Res, IN ] = nk_SimulateML(IN, axes) % ========================================================================= % FORMAT function [ R, P ] = nk_SimulateML(IN) % ========================================================================= % This function is part of the NeuroMiner machine learning library. % It ...
0d5228a299e649bd83d380c364a857e87d50be3a885929246d76fa309680c1f3
MATLAB
13,695
430
function result=rapca(data,varargin); %RAPCA is a 'Reflection-based Algorithm for Principal Components Analysis'. % It is resistant to outliers in the data. The robust loadings are computed % using projection-pursuit techniques and reflections. % Therefore RAPCA can be applied to both low and high-dimensional data s...
835a3dc5868cad25bc38aaa5d9a820c7edf758158ea6f4cac2430bd7fe5ae631
MATLAB
13,732
362
function [GD, MD, DISP] = nk_GridSearchHelper(GD, MD, DISP, i, nclass, ngroups, CV1PerfData, CV2PerfData, models) global VERBOSE MULTI CV BATCH SVM MODEFL W2AVAIL RAND MULTILABEL RFE SAV %%%%%% TRANSFER RESULTS TO GD : if SAV.savemodel && (exist('models','var') && ~isempty(models)) MD{i} = models; end %% CV1 te...
ae82881bb0d87cc16554f91cb531f2b67b9a2f3cb42d31f8b5107bd24f7b7bf3
MATLAB
13,757
377
%% IT Neuron Archetype Analysis - Main Script % This script consolidates ParTI fitting and 3D visualization for % cross-species IT neuron archetype analysis (Figure 2G-I, K, O-P, S3A-B) % % Prerequisites: % - ParTI toolbox: https://github.com/AlonLabWIS/ParTI (put this on the path) % - CSV exports from R notebook:...
26c301454a718e0cd8dfe3110b39496e189599200e0694d7d8b7b51ca2b96c75
MATLAB
13,789
268
function map = magma(n) % Returns the "magma" colourmap. if nargin < 1 n = size(get(gcf,'Colormap'),1); end values = [ 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.37083291e-02 4.51230222e-03 3.49037666e-03 ...
30af4e51d61d3ad1af76d7068ef5378305b158f9ceb6bb241aaa9229cf7353a3
MATLAB
13,791
268
function map = plasma(n) % Returns the "plasma" colourmap. if nargin < 1 n = size(get(gcf,'Colormap'),1); end values = [ 5.03832136e-02 2.98028976e-02 5.27974883e-01 6.35363639e-02 2.84259729e-02 5.33123681e-01 7.53531234e-02 2.72063728e-02 5.38007001e-01 8.62217979e-02 2.61253206e-0...
1ef9b999c2198110896d8f493afb529900c29ae646ba5e2b1442d30999166e51
MATLAB
13,793
268
function map = inferno(n) % Returns the "inferno" colourmap. if nargin < 1 n = size(get(gcf,'Colormap'),1); end values = [ 1.46159096e-03 4.66127766e-04 1.38655200e-02 2.26726368e-03 1.26992553e-03 1.85703520e-02 3.29899092e-03 2.24934863e-03 2.42390508e-02 4.54690615e-03 3.39180156e...
7eedb6f2f361765a2e4e5d4488a20dc851150a69624975e2c0893fde7414a321
MATLAB
13,793
597
function [U,S,V] = randpca(A,k,raw,its,l) %PCA Principal component analysis % % % [U,S,V] = PCA(A) constructs a nearly optimal rank-6 approximation % USV' to C(A), where C(A) refers to A after centering its % columns, using 2 normalized power iterations, with block % size 6+2=8, ...
4734f15dae0b9f63cdaa68b4887016c303d488863c15095730dd69525e3ce784
MATLAB
13,794
372
function [act, datacontainer, inp ] = nk_ManageDataContainers(act, inp, datacontainer, parentstr) nk_PrintLogo if inp.oocvmode containerstr = 'OOCV '; else containerstr = 'Training/CV '; end % check whether an alternative label was used in one of the locked analyses if inp.oocvmode && datacontainer.labels_kno...
f87a04ce2c7eb3e948232b32e41b491e1bfaf4d78145baf8ca2c7675c7c19aaa
MATLAB
13,882
274
% Comparing power between 2 of the followings: baseline, whole epoch, and after dev_on %This version: 200903 by poem %% set parameters (initialize) clear all; SL = '\'; FilePath = ''; if isunix mypath; FilePath = '~/liang/RS/'; %directory SL = '/'; end DR_PBase_setup; %load setup file MN = 'motion...
cb5831c2778914a62fd934b8276710802e7c1abbf30d437ec62fc48083441ed0
MATLAB
14,038
438
function ButtonName=MFquestdlg(Pos,Question,Title,Btn1,Btn2,Btn3,Default) % MFQUESTDLG Question dialog box. % ----------------------------------------------------------------------- % --------------------- Modified Function Help ---------------------- % �MFquestdlg� is a simple modification of �questdlg� which enabl...
26692364a422e083e3ae6459d8e80562f74165ec92459b94de930270e95a6fc2
MATLAB
14,061
273
% ======================================================================== %> @class HSMOption2Test %> @brief Class-based unit tests for stateMachineTree (Option 2: node tree). %> %> Converted from the legacy function-based hsmOption2Test.m to use %> MATLAB's matlab.unittest.TestCase framework. Each original TEST secti...
fbec9626fce8c77b690bc963320f5efe574ac041f14c8128956a171a1e2ca320
MATLAB
14,194
367
% ========================================================================= % = CLASSIFICATION PLOTS = % ========================================================================= function handles = display_classplot_oocv(h, handles) % Prepare axes warning off axes(handl...
de6a16a0da5890a74223513a1843356f9f1a33cd2d2458aa0d669c4e674ffd60
MATLAB
14,200
354
%DOT COLOUR state configuration file, this gets loaded by opticka via runExperiment class % The following class objects (easily named handle copies) are already % loaded and available to use. Each class has methods useful for running the task: % % me = runExperiment object % s = screenManager % aM = audioManager...
662ddf09f40ba093ac9b583603b5417f447f02855427fab080b56f81c8be2c5c
MATLAB
14,252
396
function [noise_data refscan_data image_data]=datapack_VB(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...
a74927d32b6b8634db120cf9ed9b5d49edd5248fd0b9b3c5706fa02d5fa0ac24
MATLAB
14,372
472
function [data, timestamps, info] = load_open_ephys_data(filename) % % [data, timestamps, info] = load_open_ephys_data(filename) % % Loads continuous, event, or spike data files into Matlab. % % Inputs: % % filename: path to file % % % Outputs: % % data: either an array continuous samples (in microvol...
493b579b64a64d69d323a01077710f2d4a38f5048dc90b8ac42d2f5aae98c732
MATLAB
14,382
328
% VEPTest protocol. DOESN'T use the eyetracker, runs a polar grating with % different direction and contrast, present a fixation cross to guide the % subject's eye's to be stable. % fixed times for the state machine (see below) fixTime = 0.5; stimTime = 2; ISITime = 1.9; %=============================================...
513c8da1b0f3a196914df990788da260b89c035c7a06bfc3cd923771f4b3c57b
MATLAB
14,483
453
% ====================================================================== %> @brief Display++ Communication Class %> %> %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ====================================================================== classdef plusplusManager < optickaCore propert...
ec87146ee782d4a3ece2c5b4623f803025d323715f50376e3e2d49c4866c5ea9
MATLAB
14,505
324
% ======================================================================== %> @class PolarGratingStimulusTest %> @brief Class-based unit tests for polarGratingStimulus. %> %> Tests construction, property defaults, type list validation, custom %> properties, colour2/baseColour handling, spiral/arc parameters, and %> pha...
a1478a944c338851adb2a0218fc91099df982e1a83f8e23713097d86d888c2ff
MATLAB
14,512
285
%% generate new tables compiled with behavior values included clear load('InputParameters.mat'); load('PreProcessed.mat'); load('Behavior_TraceTable.mat'); % expected frame count; used to weed out missing trials at one point max_frames = (inputValue.trialTrace_Pre*60 + inputValue.trialTrace_Post*60); % other pre-loop ...
86146988da28b5ba8b5ef79bb7aff2aa507d13476c2cb4ae9c4915cd6bed51d9
MATLAB
14,533
558
function tree(objectorder,heights) %TREE creates a tree in which the leaves represent % objects. The vertical coordinate of the junction % of two branches is the dissimilarity between the % corresponding clusters (maximal 30 objects allowed). % % The algorithm is fully described in: % Kaufman, L. and Rousseeu...
342aca26d4ad2381bdf5ab26fab1c9d7d3ea6cb3e0e932f638ebee2ee02e65d5
MATLAB
14,540
224
function gui_help(which_help) % % Used by FASTICAG % All the help texts and title used by GUI are stored here. % Make changes here. % Also displays the helpwindow with the selected text % @(#)$Id: gui_help.m,v 1.6 2005/10/19 13:05:34 jarmo Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
91ef182c7a3c894991caf31fd1b21eb072f0a254759cc5ad21de20bb428da812
MATLAB
14,645
288
%% generate new tables compiled based on behavior cutoff for motion clear load('InputParameters.mat'); load('Behavior_TraceTable.mat'); load('PreProcessed.mat'); % expected frame count; used to weed out missing trials at one point max_frames = (inputValue.trialTrace_Pre*60 + inputValue.trialTrace_Post*60); % other pre...
577683e14fe3d211aeda986f8c80f954fe931596a533702b876444ef79fc5896
MATLAB
14,687
420
%> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ======================================================================== %> @brief single grating stimulus, inherits from baseStimulus %> GRATINGSTIMULUS single grating stimulus, inherits from baseStimulus %> The current properties are: ...
685fc726b43b210e794476a622a053ee452e82f3d2ade4f1805285deb8997db8
MATLAB
14,706
483
function result = cvRsimpls(x,y,kmax,rmsecv,h,k) %CVRIMPLS calculates the robust RMSECV (root mean squared error of cross-validation) curve % for RSIMPLS 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 % com...
ab857a2c897379e3d44d076ee967e274d1517608d8c669139c9d64f3eba56230
MATLAB
14,725
391
function spik_phas_extraction(sess2analyse,win,freqs, fr_names,PCdir,EventTypes,SubEventTypes,varargin) %SPIK_PHAS_EXTRACTION Phase values associated with spiking % SPIK_PHAS_EXTRACTION(sess2analyse,win, freqs, fr_names,PCdir,EventTypes,SubEventTypes,...) % -Extracts phase values associated with spiking activity ...
f2d3d1cbaf9c6df9d88ec7b95b8b9491e5bca10a29f47b755651b7bb82b02ec6
MATLAB
14,790
422
% ======================================================================== %> @class aprilTagStimulus %> @brief Texture-backed binary checkerboard / AprilTag-style stimulus. %> %> This stimulus builds a binary MATLAB array either from a user-defined %> `patternMatrix` or by randomly generating 0/1 values for `rows` x %...
bdf15773af6f038cfeb767fd1a3089e7bd4bde7af57e8440853fdd7cea2de59f
MATLAB
14,795
381
function Res = nk_ImReliefVisCVGrid(TempDir, CV, FEATSEL) if ~exist('TempDir','var') || isempty(TempDir) RootDir = spm_select(1,'dir','Select IMRelief root directory'); if isempty(RootDir), reutrn; end end [niy, njy] = size(CV.TrainInd); [nix, njx] = size(CV.cvin{1,1}.TrainInd); switch FEATSEL.BINMOD case...
eb46e050851b35921f206b8840cb5e82c324ea699fec24b92ebfb71c9a4fc00b
MATLAB
14,846
413
function [Z, ccaEigen, ccaDetails] = cca(X, Y, EDGES, OPTS) % % Function [Z, CCAEIGEN, CCADETAILS] = CCA(X, Y, EDGES, OPTS) computes a low % dimensional embedding Z in R^d that maximally preserves angles among input % data X that lives in R^D, with the algorithm Conformal Component Analysis. % % The embedding Z is co...
8a2f7d0ecf92fa7a851bda94bbdae1d0f785e849ba13850ffd14eeb2228e6ad1
MATLAB
14,901
336
% FNIRS protocol. DOESN'T use the eyetracker, runs a polar grating with % different conditions, but we do present a fixation cross to guide the % subject's eye's stable. % % me = runExperiment object ('self' in OOP terminology) % s = screenManager object % aM = audioManager object % stims = our list of stimuli (m...
c75a16543bf2073c299144856ff1767fcc55b797fdc54ff6f06e5f202966767c
MATLAB
14,912
360
function Task_SSRT %TASK_SSRT Stop signal reaction time task for Parkinson patients %%%%% AIMS %%%%% % The task uses a buttonbox which has 3 buttons, a monitor, a % lightsensor, and a trigger output. The participant has to press two % buttons in the same order as it is presented in the cue. After the % keypre...
899a3987dc59d092b94349636a660303e3b4146258619b05a0845831e0fbe2dd
MATLAB
15,021
338
% FIXATION ONLY state configuration file, this gets loaded by opticka via % runExperiment class % % This task only contains a fixation cross, by default it uses % stims.stimulusTable (see below) to randomise the position of the timulus % on each trial. This randomisation is dynamic, and not saved in any data % stream;...
9bdcbbd5087de8d9516b57a15ba934401470fd4368c791a1da213de7b1f8ad5c
MATLAB
15,031
338
% FIXATION ONLY state configuration file, this gets loaded by opticka via % runExperiment class % % This task only contains a fixation cross, by default it uses % stims.stimulusTable (see below) to randomise the position of the timulus % on each trial. This randomisation is dynamic, and not saved in any data % stream;...
728e776b2a357b85d9a6496e936f2379f386aeee599236370ed80a88e066fe4e
MATLAB
15,057
427
clear load('ProcessedData\tables_compiled.mat'); %% classifier code; runs on increasingly larger random subsets of cells % % reorg main table if needed % re_org = vertcat(tables_compiled{:}); % tables_compiled = cell(1,1); % tables_compiled{1,1} = re_org; tic % run within days by iter; params for number of...
efcc3788315bb43bdf8e97011478a940bc2dd01198d510503c0eb27f21a157ef
MATLAB
15,110
406
function out = ABA_CTRL_batch(data_path,varargin) % inputs p = inputParser; p.addRequired('data_path',@(x) exist(x,'dir')); p.addParameter('upload',[],@(x) exist(x,'dir')); p.addParameter('run',true,@(x) islogical(x) || isnumeric(x)); p.addParameter('include',{},@(x) ischar(x) || iscellstr(x)); p.addParameter('overwrit...
376dfcb80f6e62a49e7be774a9c707c1f7fd62d29101b31080c09bbfd1131448
MATLAB
15,151
448
% ======================================================================== %> @brief Arduino Manager > Connects and manages arduino communication. By %> default it connects using arduinoIOPort (much faster than the MATLAB %> serial port interface) and the adio.ino arduino sketch (the legacy %> arduino interface by Math...
55e27638ed9161254552bcc5fef568aa995059c832fa04e063fdd43f9e43d757
MATLAB
15,155
437
% ======================================================================== %> @brief procedural disc stimulus, inherits from baseStimulus %> DISCSTIMULUS procedural disc stimulus, inherits from baseStimulus %> %> See CreateProceduralSmoothedDisc for the stimulus details %> %> Copyright ©2014-2022 Ian Max Andolina — rel...
0e60827e5db97951b7d0b6a27e83fe4a8fa1b675e31688652cb9a81fe88c3ee8
MATLAB
15,202
595
<<<<<<< HEAD function [vol, M, mr_parms, volsz] = load_mgh(fname,slices,frames,headeronly) % [vol, M, mr_parms, volsz] = load_mgh(fname,<slices>,<frames>,<headeronly>) % % fname - path of the mgh file % % slices - list of one-based slice numbers to load. All % slices are loaded if slices is not specified, or ...
5c3cc681da608dac018ede3d96657523c1223bd97db547873b5ee62fc3604150
MATLAB
15,236
440
% ======================================================================== %> @brief procedural disc stimulus, inherits from baseStimulus %> DISCSTIMULUS procedural disc stimulus, inherits from baseStimulus %> %> See CreateProceduralSmoothedDisc for the stimulus details %> %> Copyright ©2014-2022 Ian Max Andolina — rel...
a666bda04776ca24f3852d6f61bcf012b97375795644322d3b47ff97017ef10f
MATLAB
15,281
480
classdef audioManager < optickaCore % AUDIOMANAGER Connects and manages audio playback, set as global aM from runExperiment.runTask() properties %> device ID as returned from PsychAudio device = [] fileName char = '' numChannels double = 2 frequency double = 44100 lowLatency logical = true latencyLe...
f83ddac1f1bd6d5fab21293413449ca0b131934524d7f742d6526cd77702245e
MATLAB
15,312
446
function [imData,sizx,sizy]=smod_bigread2(varargin) %reads tiff files in Matlab bigger than 4GB, allows reading from sframe to sframe+num2read-1 frames of the tiff - in other words, you can read page 200-300 without rading in from page 1. %based on a partial solution posted on Matlab Central (http://www.mathworks.com/m...
3373757b6f7acf2fd2735d1ec4352f64743da3e77a962a8f7f50c1d2612c8488
MATLAB
15,387
277
%power spectra cross subjects (just plotting, no computation) %merge dipole and spectra (for slide) %run after DR_PlotClustPBase and DR_PlotClustCompPowerDipole %mostly base on RS_powbase %This version: 200903 by poem %% set parameters (initialize) clear all; SL = '\'; FilePath = ''; if isunix mypath; ...
4f41334ffeccc50cd9f5771888b85e2658010fc9e8a9b958371a59ed7176ca65
MATLAB
15,430
368
%DOT COLOUR state configuration file, this gets loaded by opticka via runExperiment class % The following class objects (easily named handle copies) are already % loaded and available to use. Each class has methods useful for running the task: % % me = runExperiment object % s = screenManager % aM = audioManager...
d24cfd70e61d551f07a6afb4587af57accd05dfbb745a8f648e4461241cbb4f8
MATLAB
15,449
404
function SubSets = nk_CreateSubSets(Y) global CV RAND RFE MULTI MODEFL MULTILABEL VERBOSE PREPROC STACKING if VERBOSE && RFE.Filter.flag, fprintf('\n\nCreate feature subsets'); end [nperms, nfolds, nvar] = size(Y.Tr); % Do we have a multi-label situation? if MULTILABEL.flag if isfield(MULTILABEL,'sel') n...
d8d261be5dcbaaac7aab3fab84575418f94adc94c60e0325239d547d87bcb6d9
MATLAB
15,449
416
function condSequence = carryoverCounterbalance(numConds,cbOrder,reps,omitSelfAdjacencies) % %When using this function/code in academic research, please cite: %Brooks, J.L. (2012). Counterbalancing for serial order carryover effects in %experimental condition orders. Psychological Methods. % %Creates a serial-o...
6be6e9e481ead76dde38d75e1a1d864e23d723a6da3c424ac84ed0a4fa8d2569
MATLAB
15,450
422
function obj = subsasgn(obj,subs,varargin) % Subscript assignment % See subsref for meaning of fields. %__________________________________________________________________________ % Copyright (C) 2005-2017 Wellcome Trust Centre for Neuroimaging % % $Id: subsasgn.m 7147 2017-08-03 14:07:01Z spm $ switch subs(1).type c...
33606f81e94722bd598f1e4329dc388c5316c5276d35d5baa57ec40a4a33edba
MATLAB
15,516
269
function MBM = mbm_main(MBM) % mbm_main is the main function of MBM toolbox which performs MBM analysis % %% Input: % MBM - Structure % MBM.maps - Structure containing maps. Input fields are: % MBM.maps.anatListFile - Character vector. % ...
5bb6ea761f1b3f1fa58d8feb568d6aba701ece9c5d341a7f7c28277604566540
MATLAB
15,560
428
function [ Res, IN ] = nk_SimulateML3(IN, axes) % ========================================================================= % FORMAT function [ R, P ] = nk_SimulateML(IN) % ========================================================================= % This function is part of the NeuroMiner machine learning library. % It...
b0d7722b860e0430605a868e3e8ca319d24072565b6ddbb1d18f97a394c70c38
MATLAB
15,586
433
% ======================================================================== %> @brief target inducer stimulus, inherits from baseStimulus %> %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ======================================================================== classdef targetInducerStimu...
577899d14e77cf3f318bd385b825f76bdba4c6ee2595968962b2715473886fae
MATLAB
15,588
192
function [RawData, AnalysisRegions, Correlograms, InjuryIndicies, ProcessedData, RecordingMetrics, plotProps] = analyzeRecordingPlxFile(plxFileName,sw,plotProps); %This function initialized output folders and sequentially calls the %functions to process and label the data, then generate and classify %correlograms, t...
ec1591fc2e56c9302b131b358c7633c886e904f44ed83238811c0cd65319590e
MATLAB
15,819
329
function handles = display_tablegenerator(handles) if ~isfield(handles,'PerfTabWin') WinTag = 'PerfTabWin'; h = findobj('Tag',WinTag); if isempty(h) handles = init_fig(handles, WinTag); else handles.PerfTab.Win = h; end end h = handles.PerfTab.Win ; set(0,'CurrentFigure',h) functio...
4195d09c9473419a89ff11fb3fea1c0cb500352dfa989c281147a51ada94c2c5
MATLAB
15,831
325
%{ ---------------------------------------------------------------------------- This file is part of the Sanworks ArCOM repository Copyright (C) 2016 Sanworks LLC, Sound Beach, New York, USA ---------------------------------------------------------------------------- This program is free software: you can re...
c47c78ea3e258e46d7d52585db8f1e74f56a2c8e977bcff7a1f3ee1d68761f39
MATLAB
15,863
505
function [result] = writeNexFile(nexFile, fileName) % [result] = writeNexFile(nexFile, fileName) -- write nexFile structure % to the specified .nex file. returns 1 if succeeded, 0 if failed. % % INPUT: % nexFile - a structure containing .nex file data % % SOME FIELDS OF THIS STRUCTURE (VERSIONS ETC.) ARE N...
b086a9babcf202152a984844999bf03863d57fc1e7d5e69f305185133648ab76
MATLAB
15,869
495
function [status, paramstr] = nk_SetupGlobalVariables(dat, act, dispflag, varind) global ... PREPROC ... PARMODE ... SVM ... RFE ... CMDSTR ... MULTI ... SAV ... GRD ... MODEFL ... SCALE ... CV ... RVM ... RAND ... VIS ... MKLRVM ... DATID ... SPM5VER...
ab42ad246a310761f636f08b0449a5116b1a05006b92c0812cdc625a6fa23a6e
MATLAB
15,904
333
% Comparing power between 2 of the followings: tonic, mixed, and phasic % This version: 200905 by poem %% set parameters (initialize) clear all; SL = '\'; FilePath = ''; if isunix mypath; FilePath = '~/liang/RS/'; %directory SL = '/'; end DR_PBase_setup; %load setup file MN = 'motionless'; p_val ...
81b9c6609d4e095f93e41d76efd99308a0fd4da217f0f84c48fd8b4c1bccb5ef
MATLAB
15,941
351
% ========================================================================= % = MODELPERF PLOT = % ========================================================================= function handles = display_modelperf(handles) multfl = false; predind = get(handles...
f12b7ff94990d22d445e108cbe43a8cc913b241077d5d3b1e6feb76a8701fb97
MATLAB
15,961
433
%% GRAPH SIGNAL PROCESSING ANALYSIS OF SOUND PROCESSING IN THE COCHLEA % Melia E. Bonomo, Santiago Segarra, Robert M. Raphael % Rice University, 2026 % This code is freely distributed under the GNU General Public License. % http://www.gnu.org/licenses/gpl-3.0.html % PATIENT GROUPS % 32 patients spread across 7 l...
0789b608506323d39a850b8e7a2070d080a582b5a5f30f11ea4c6ab480b8f081
MATLAB
15,974
378
% ========================================================================= % FORMAT param = nk_MLI_config(param) % ========================================================================= % NeuroMiner menu configurator for the interpretation of model predictions % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
9d497920a5f4852bd7dced6e0dd2f25255de700eef9eb71809c6120f61f5a8fc
MATLAB
16,003
459
% ======================================================================== %> @brief dotsStimulus simple variable coherence dots stimulus, inherits from baseStimulus %> %> %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ====================================================================...
5a043e4034f5076de5dbc6f518c2000284afaa86a6db772bdbf8cd6a380f3e60
MATLAB
16,036
459
% ======================================================================== %> @brief dotsStimulus simple variable coherence dots stimulus, inherits from baseStimulus %> %> %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ====================================================================...
2bb7c4a544ce7e23138dd6f5bf3e5d48452232a8a38c27f31cbea93c1d44e299
MATLAB
16,040
507
classdef timeLogger < optickaCore %TIMELOGGER Simple class used to store the timing data from an experiment % timeLogger stores timing data for a taskrun and optionally graphs the % result. properties timer = @GetSecs verbose = true stimStateNames = {'stimulus','onestep','twostep'} t = struct('vb...
73ca610467b414e02e00e63f7af0ecb9f39069258b7a83729696487f748c6772
MATLAB
16,070
407
% ========================================================================= % function Predict = nk_PredictData(F, W, TR, TRInd, dTRLabel, ... % CVD, CVDInd, dCVDLabel, ... % TS, dTSInd, dTSLabel, ... % mTS...
0e77d813bfe224bb356264bb6a31631baa2e68fc77e0208f5d31b0e46a6e8134
MATLAB
16,223
428
function varargout = nk_OOCVDataIO(varargin) % NK_OOCVDATAIO MATLAB code for nk_OOCVDataIO.fig % NK_OOCVDATAIO by itself, creates a new NK_OOCVDATAIO or raises the % existing singleton*. % % H = NK_OOCVDATAIO returns the handle to a new NK_OOCVDATAIO or the handle to % the existing singleton*. % % ...
537245dc491db678af32e232a13af4dbd7c508a428d422afb95c82e0ec99ba88
MATLAB
16,295
479
% ======================================================================== %> @brief ndotsStimulus limited lifetime coherence dots stimulus %> %> %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ======================================================================== classdef ndotsStimulu...
bcfa33f09edd8fbffa8bede69724c5b347b9a3b18d6da83024499668a42215f3
MATLAB
16,295
479
% ======================================================================== %> @brief ndotsStimulus limited lifetime coherence dots stimulus %> %> %> %> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md % ======================================================================== classdef ndotsStimulu...
711fbf28629606d9be716fc1aedf5a1dcea90ed1503f506c384ec56291a276d5
MATLAB
16,353
364
% FIXATION TRAINING: Protocol presents a pulsing 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. You can use the...
e65b22a42048a36c609d61a805634242a8749a55104a33d49a7230107cc112fb
MATLAB
16,436
367
%component maps, dipoles and power spectra in a cluster %ver 2009/01 %% 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/';...
dc17dd8672c361c3e24365f1e59453717a2707198bb5a6446e33a95313588c78
MATLAB
16,517
378
function [SVM, act] = nk_Model_config(SVM, TrainParam, parentstr, varind, act) global NM EXPERT d = nk_GetParamDescription2(NM,TrainParam,'GridParam'); if (isfield(NM,'TrainParam') && isfield(NM.TrainParam,'RAND') && NM.TrainParam.RAND.InnerFold == -1 ) SVM.GridParam = 1; optimstr = ''; menusel = []; else opti...