sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
4a91d5cad307134f7b35bca804abf2cb9f39216ea7d7c4ea6e601c76f71f9672 | MATLAB | 22,227 | 529 | function [act, inp, NMo] = nk_MLOptimizerPrep(act, inp, parentstr)
% =========================================================================
% [act, inp] = nk_MLOptimizerPrep(act, inp, parentstr)
% =========================================================================
% This function allows the interactive and bat... |
004cf273d7748d128e769e80d3ea6468108ccb72f6b6bb25f5127338bd968246 | MATLAB | 22,281 | 599 | classdef zmqConnection < optickaCore
%> zmqConnection is a class to handle ØMQ connections for opticka class
%> communication. We use matlab-zmq (a basic libzmq binding),
%> and a REQ-REP pattern for main communication.
properties
%> ØMQ connection type, e.g. 'REQ', 'REP', 'PUB', 'SUB', 'PUSH', 'PULL'
type ... |
af19947e3dda1e0f8c8906f3b3b1caa77708c84febe119cc0aefabcc63387f70 | MATLAB | 22,345 | 527 | function result=rda(x,group,varargin)
%RDA performs linear and quadratic robust discriminant analysis
% on the data matrix x with known group structure. It is based on the
% MCD estimator (see mcdcov.m), hence it has to be applied to
% low-dimensional data.
%
% The Robust Discriminant method is described in: ... |
9c7b47bcdd0cd7ba3167a8383529450d0677a1b609944fe8508c0805d2abadaa | MATLAB | 22,445 | 425 | 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,:);
% ... |
a00b50cb4d380a8af3a3a4b07c6498e113f8c9272feb339d0d5d4499855c1159 | MATLAB | 22,460 | 471 | %ORIENTATION TUNING state configuration file, this gets loaded by opticka via runExperiment class
% The following class objects (easily named handle copies) are already
%> methods (functions) useful for running the task:
%>
%> me = runExperiment object ('self' in OOP terminology)
%> s = screenManager object
%> aM ... |
dbc049e1acf43a3ae86974b491d3d9fc29b92f72b0f1a8f5fa6a7f4d9264163e | MATLAB | 22,528 | 426 | 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,:);
% ... |
1a5c131e1b0f4ee305431ef814aacbecc6a7f6479e0f7af3132929fefea01406 | MATLAB | 22,538 | 606 | classdef zmqConnection < optickaCore
%> zmqConnection is a class to handle ØMQ connections for opticka class
%> communication. We use matlab-zmq (a basic libzmq binding),
%> and a REQ-REP pattern for main communication.
properties
%> ØMQ connection type, e.g. 'REQ', 'REP', 'PUB', 'SUB', 'PUSH', 'PULL'
type ... |
e607ada7f2cfb9aebb8edde87c60ceab157acb3f806e72a225d40221daf6f9fa | MATLAB | 22,832 | 577 | % ========================================================================
%> @class stateMachineTree
%> @brief hierarchical state machine built from a tree of stateNode handles.
%>
%> stateMachineTree extends stateMachine to support hierarchical (nested)
%> states using a handle-class tree (stateNode). Each state beco... |
fca7f2ed3454046859696a370d9433d436722704be652569a68ad6f7ac869893 | MATLAB | 22,836 | 361 | function RecordingMetrics = calculateCorrelogramMetrics(Correlograms,AnalysisRegions,ProcessedData,RecordingMetrics,plotProps,sw, plxFileName)
%This function calculates correlogram metrics for each correlogram
if sw.calculateStatisticsFromScratch == 0 %if loading previously-calculated correlogram stats...
disp... |
427632819d0ca9987a862c3ccd54286b66b11c09b11df95bd9afc5a502997acd | MATLAB | 22,966 | 461 | function IN = inpolyhedron(varargin)
%INPOLYHEDRON Tests if points are inside a 3D triangulated (faces/vertices) surface
%
% IN = INPOLYHEDRON(FV,QPTS) tests if the query points (QPTS) are inside
% the patch/surface/polyhedron defined by FV (a structure with fields
% 'vertices' and 'faces'). QPTS is an N-by... |
7cbeec931c51ca240785477fe225f10d17ad40ec060ca3afc2083ab83e8df32b | MATLAB | 23,102 | 479 | function [M_final,shifts_g,template,options,col_shift] = normcorre_batch(Y,options,template)
% online motion correction through DFT subpixel registration
% Based on the dftregistration.m function from Manuel Guizar and Jim Fienup
% INPUTS
% Y: Input data, can be already loaded in memory as a 3D
% ... |
d8a60f04fd5ab361a5e0bc24b4f863c076caf55096c635661454b99374e46bed | MATLAB | 23,118 | 711 | % HYDRA SOLVER
% Version 1.0.0 --- January 2018
% Section of Biomedical Image Analysis
% Department of Radiology
% University of Pennsylvania
% Richard Building
% 3700 Hamilton Walk, 7th Floor
% Philadelphia, PA 19104
%
% Web: https://www.med.upenn.edu/sbia/
% Email: sbia-software at uphs.upenn.edu
%
% Cop... |
86022597db613cfef8709f45001dce3d483d04cb4abaa01d053c88acfd73ee89 | MATLAB | 23,156 | 492 | % SACCADE COUNTERMANDING TASK - See Thakkar et al., 2011 | Hanes & Schall 1995
% A fixation cross appears and after a delay it disappears and a saccade
% target appears. On 70% of trials a speeded saccade in <500ms is rewarded.
% In 30% of trials, the fixation cross reappears (STOP signal) after a
% delay and the subje... |
7502db05dae2ec7a61f7ed6173157c3fe5987d66bd4bba42d0026b67e315459b | MATLAB | 23,159 | 498 | function [tY, Pnt, paramfl, tYocv] = nk_PerfPreprocessMeta(inp, labels, paramfl)
% =========================================================================
% function [tY, Pnt, paramfl, tYocv] = nk_PerfPreprocessMeta(inp, labels, paramfl)
% =========================================================================
%
% ... |
0fadba6c399e0d09e5d6d18d28fe75601deb7533b7e5106636588a0d45e735c0 | MATLAB | 23,304 | 779 | function patient_groups_compare(EventTypes)
%PATIENT_GROUPS_COMPARE Comparison of patient groups
% PATIENT_GROUPS_COMPARE(EventTypes) compares UPDRS scores, clinical
% parameters, postoperative stimulation location, bursting index, mean firing rate
% and spike-phase coupling measures in patients with reaction t... |
549940abe3c5f5fecec783f222f6716548a81f740761870f9b0fef86b62638e0 | MATLAB | 23,314 | 623 | % ========================================================================
%> @brief movieStimulus is the class for movie based stimulus objects
%>
%>
%>
%> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md
% ========================================================================
classdef movieS... |
0cf5d50d8ebd919e575a412b923c0fd9313ca351445726285b1bf9d4cbccd2b9 | MATLAB | 23,386 | 625 | % ========================================================================
%> @brief movieStimulus is the class for movie based stimulus objects
%>
%>
%>
%> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md
% ========================================================================
classdef movieS... |
419fcc9dad6c064950bbafd1a5c9530143904ec9a72e49693cd3a764779f54bd | MATLAB | 23,413 | 623 | function mp2rage_jobs = mp2rage_cfg_matlabbatch
%MP2RAGE_CFG_MATLABBATCH is the configurarion file for all jobs of the mp2rage branch
% This file is executed by spm job/batch system
%
% Output file names are handled by a mp2rage_matlabbatch_job_output
%
% See also spm_cfg mp2rage_matlabbatch_job_output mp2rage_run_remo... |
6bde51e1d053880616ffd8e638916a87f28e7ca49abae7233a52c085029d13a3 | MATLAB | 23,430 | 652 | function [props, cellids2] = get_prop(prop,cellids,varargin)
%GET_PROP finds required property values of selected units
% [props, cellids2] = GET_PROP(prop,cellids,varargin)
% Gets specified properties (prop) of cellids
% In case of phase-coupling, peak amplitude and - latency properties
% cell array of event la... |
28f0cc8f6d492c7571e8853779141aa1a5ab3c5de531920cde7712399ba4f0c2 | MATLAB | 23,508 | 653 | function result=adjustedboxplot(x,varargin)
%
%ADJUSTEDBOXPLOT produces an adjusted box and whisker plot with one box for each column
% of X.
% Typical for this boxplot are its skewness-adjusted whiskers, which are based on
% the medcouple, a robust measure of skewness (see mc.m). At skewed data, the original boxplot... |
f89c7e64a855353067da44e142b20fed730bc35f9fcd0b07b3699b56e71312e8 | MATLAB | 23,665 | 659 | classdef CompactEditableComboBox < matlab.ui.componentcontainer.ComponentContainer
%CompactEditableComboBox Compact App Designer component using uihtml + MATLAB popup menu.
%
% This component keeps the HTML part short (one row) and opens the
% option list as a MATLAB uicontextmenu. The menu is opened in... |
0ac67a05e5c2e2dc08e55b0659a8690d5d1e2fbe961ae768618944d254436af0 | MATLAB | 23,711 | 492 | %> REVERSE CORRELATION PROTOCOL
% The following class objects are already loaded by runTask() and available
% to use; each object has methods (functions) useful for running the task:
%
% me = runExperiment object ('self' in OOP terminology)
% s = screenManager object
% aM = audioManager object
% stims = our list of... |
5e4cbe6dec075a5fde95406ed2e2b0d3c6645f64072f5308f86499a13108df3a | MATLAB | 23,819 | 675 | % ========================================================================
%> @brief polar grating stimulus, inherits from baseStimulus
%> POLARGRATINGSTIMULUS inherits from baseStimulus
%> The basic properties are:
%> type = 'radial' or 'circular' or 'spiral'
%> colour = first grating colour
%> colour2 = second... |
aaae7969230936b79967958c46ff8878942536f3ef80186bcbe9b7374c51a330 | MATLAB | 23,974 | 689 | function preprocess_PD(sess2analyse,epoch_win,EventTypes,SubEventTypes,preproc,baseline_win)
%PREPROCESS_PD preprocesses EEG/LFP data for further analysis
% PREPROCESS_PD(...) preprocesses raw, continuos EEG/LFP data, included in SESS2ANALYSE,
% saves filtered and cleaned data in EEGLAB (.set) format.
% This functi... |
8c4881bd6c4062d12e77280c3304b0c00135c94a0eed355132ad4a212e797c1f | MATLAB | 24,066 | 547 | % PRO-SACCADE and ANTI-SACCADE Task
%
% This task supports both pro and anti saccades and uses 3 stimuli:
% (1) pro-saccade target
% (2) anti-saccade target and
% (3) fixation cross.
%
% The task sequence is set up to randomise the X & Y position (xpPosition independent variable of (1) ±10° on
% each trial, and (2)... |
3b1a33756dc2e778c1278b3a7d724b58f171925785a270c156d01c69c92c763a | MATLAB | 24,133 | 493 | %power spectra cross subjects
%mostly base on RS_powbase
%This version: 2008/11 by poem
%% set parameters (initialize)
clear all;
SL = '\';
FilePath = '';
if isunix
mypath;
FilePath = '~/liang/RS/'; %directory
SL = '/';
end
DR_PBase_setup; %load setup file
%datasets
PLOT_SET = {
's3... |
d61097833a23c7d1785fe36075905cddf1b47e4995afc53887f82e78dc2b3055 | MATLAB | 24,185 | 626 | function timeTest(n, numifis, loadjitter, clearmode, stereo, flushpipe, synchronous)
% timeTest(n, numifis, loadjitter, clearmode, stereo, flushpipe, synchronous)
%
% Tests syncing of Psychtoolbox to the vertical retrace (VBL) and demonstrates
% how to implement the old Screen('WaitBlanking') behaviour with
% Screen('F... |
2be143947eed66a33aa485ca84635509a88a4c1a23e5e35ef8e8a2d784f6a0aa | MATLAB | 24,302 | 575 | function [ suggest best_acc best_sv ] = nk_SA (Y, inp, epsilon, init_T, end_T, dt, lambda, big_gamma, also_plot )
%
% function [ suggest best_acc best_sv ] = nk_SA (Y, inp, epsilon, init_T, end_T, dt, lambda, big_gamma, also_plot )
% (n-fold cross-validation version, with simulated annealing rather than grid ... |
d8a928a560294effb9b50848129e420a1b4a0acd23dc03dc8b7f3c63eba875c1 | MATLAB | 24,447 | 823 | % SPARSEBAYES Sparse Bayesian modelling: main estimation algorithm
%
% [PARAMETER, HYPERPARAMETER, DIAGNOSTIC] = ...
% SPARSEBAYES(LIKELIHOOD, BASIS, TARGETS, OPTIONS, SETTINGS)
%
% OUTPUT ARGUMENTS:
%
% PARAMETER Structure specifying inferred primary parameters:
%
% .Value Vector of weight values
% .Relevant Ve... |
023c8501071e02ecd0c0925cebfa1cd1d0c87fa798f93681d5eb275116048bdc | MATLAB | 24,607 | 496 | %> ISOLUMINANT COLOUR Task, shows how to randomise different colours using a
%> disc (100°=full screen).
%> This is a state configuration file for runExperiment.runTask (full
%> behavioural task design). This state file has a [prefix] state, a
%> [fixate] state for the subject to initiate fixation. If the subject fails... |
7264ff0b9493c3ac880a807157f4d0edb180e30fb38c1f180baf591279ff0834 | MATLAB | 24,617 | 315 | function rating = face_exp_new (subject,window,screenNumber,width,height,session,pth,p1,p2,p3,ind,Index_Matrix,h)
% check for Opengl compatibility, abort otherwise:
AssertOpenGL;
KbName('UnifyKeyNames');
KbCheck;
escape = KbName('ESCAPE');
responseKey = 1; % X mouse button
% h = IOPort('OpenSerialPort', 'com... |
fa1c128e324ef134bf2139564f426a3a2f65c109b4f77a65b10f209fd52e59d8 | MATLAB | 24,726 | 525 | % SACCADE PHOSPHENE TASK: See Chen et al., 2020 From Methods:
% Prior to surgical implantation of the electrode arrays, the monkeys were
% trained on a saccade task, in which they reported the location of a visually
% presented dot on a grey screen (with a background luminance of 16.6 cd/m2)
% with an eye movement. Thi... |
09355cf8e2de2cfdb03f844d834720b856d9e97a98803ae22b1bb7a68e9b703d | MATLAB | 24,736 | 525 | % SACCADE PHOSPHENE TASK: See Chen et al., 2020 From Methods:
% Prior to surgical implantation of the electrode arrays, the monkeys were
% trained on a saccade task, in which they reported the location of a visually
% presented dot on a grey screen (with a background luminance of 16.6 cd/m2)
% with an eye movement. Thi... |
62c9e05a857c84dad5945c569ca309d78672cd7c188a2588e0af44e25072ed39 | MATLAB | 24,740 | 561 | % PRO-SACCADE and ANTI-SACCADE Task
%
% This task supports both pro and anti saccades and uses 3 stimuli:
% (1) pro-saccade target
% (2) anti-saccade target and
% (3) fixation cross.
%
% The task sequence is set up to randomise the X & Y position (xpPosition independent variable of (1) ±10° on
% each trial, and (2)... |
840420d66fb0113bd23df22d88a43429626e86a86e649d6b99f82ba285561a4f | MATLAB | 24,748 | 561 | % PRO-SACCADE and ANTI-SACCADE Task
%
% This task supports both pro and anti saccades and uses 3 stimuli:
% (1) pro-saccade target
% (2) anti-saccade target and
% (3) fixation cross.
%
% The task sequence is set up to randomise the X & Y position (xpPosition independent variable of (1) ±10° on
% each trial, and (2)... |
e912b9a4ae2cd5c3c68b69c5f5b0640f425453c5fff065808060a00f11c6945d | MATLAB | 25,043 | 521 | function brainframe(input_struct)
%Figure call
figure('Name',input_struct.img_labels);
%Voxel or region resolution flag
voxUreg = input_struct.voxUreg;
%Connectome visualization binary flag
iscon = input_struct.iscon;
%Base brain atlas prep
brainat = input_struct.brain_atlas;
CCFinds = brainat;
CCFbin = brainat;
CC... |
7bab3418d4fff9f2154956ce68776fbe3c21bfe45ca49fba084bf1ba62f9ccc6 | MATLAB | 25,086 | 594 | %%
%% for active units with Strict Logic (Trough->P2)
clc;
clear;
% --- 1. 参数设置 ---
fs = 25640; % 采样频率
filepath = "D:\930_paper_plotting\Unit_info\Unit_info\Unit_info_SU_patients_extend"; % 文件路径
filenames = dir(fullfile(filepath, "*Final.mat")); % 获取所有.mat文件
% 初始化存储结构
selected_units_all_files = struct... |
33f4488cba26484f9ead08b9e166d2ce6e991c7dc03fb217a4238c5b8eecfe5d | MATLAB | 25,235 | 791 | % ========================================================================
classdef metaStimulus < optickaCore
%> @class metaStimulus
%> @brief Manager for multiple stimuli.
%>
%> METASTIMULUS manages a collection of stimuli, wrapped in one object. It
%> allows you to treat this group of heterogenous stimuli as if they... |
308e186a3fe050267ecbb07cc344e93497a7e8c32635d035a6308d5dcdf0480c | MATLAB | 25,332 | 498 | % =========================================================================
% FORMAT res = nk_CVpartition_config(res)
% =========================================================================
% Setup repeated nested cross-validation structure
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
98f51d802072378bd53371583451c15bbb49582bd2763449ee627b28564368f6 | MATLAB | 25,542 | 797 | % ========================================================================
classdef metaStimulus < optickaCore
%> @class metaStimulus
%> @brief Manager for multiple stimuli.
%>
%> METASTIMULUS manages a collection of stimuli, wrapped in one object. It
%> allows you to treat this group of heterogenous stimuli as if they... |
a74500eafe694dc455f0628d3229f487ab5dcb32ebe4e9a12098c5074a1ccc07 | MATLAB | 25,986 | 725 | function time_freq_patients(sess2analyse,EventTypes,SubEventTypes,epoch_win,baseline_win,varargin);
%TIME_FREQ_PATIENTS Time-frequency decomposition with wavelet
% TIME_FREQ_PATIENTS(sess2analyse,EventTypes,SubEventTypes,epoch_win,baseline_win,...)
% -Applies wavelet transformation (see eegwavelet2.m) t... |
c21f6e8dff0574f56b82d3760a8b2ace0501d40bbe039116d13ca3bcca06b421 | MATLAB | 26,043 | 905 | function [A, W] = fpica(X, whiteningMatrix, dewhiteningMatrix, approach, ...
numOfIC, g, finetune, a1, a2, myy, stabilization, ...
epsilon, maxNumIterations, maxFinetune, initState, ...
guess, sampleSize, displayMode, displayInterval, ...
s_verbose);
%FPICA - Fixed point ICA. Main algorithm of FASTICA.
%
% ... |
84ebf7185477deffd456403d8459c7a8896084da1229e71eb194f74dcd663a0f | MATLAB | 26,073 | 723 | function fighandle = palm_viewsurf(varargin)
% Simple visualisation of surface results still in Octave/MATLAB.
% The principles are generally similar to those of the tool "dpx2map.m",
% described here:
% https://brainder.org/2013/07/28/displaying-vertexwise-and-facewise-brain-maps/
%
% Usage:
% h = palm_viewsurf( ...
... |
1fa6d94a6b63492a3251a08e95705db1913271367f07e80d347ed27969955ac1 | MATLAB | 26,206 | 529 | function print2eps(name, fig, export_options, varargin)
%PRINT2EPS Prints figures to eps with improved line styles
%
% Examples:
% print2eps filename
% print2eps(filename, fig_handle)
% print2eps(filename, fig_handle, export_options)
% print2eps(filename, fig_handle, export_options, print_options)
%
% This fun... |
595d803b447138811c4af5cf86f32917754214b1dfa4352e4292c50cf85eb0c0 | MATLAB | 26,269 | 524 | %power spectra cross subjects
%mostly base on RS_powbase
%This version: 2008/12 by poem
%% set parameters (initialize)
clear all;
SL = '\';
FilePath = '';
if isunix
mypath;
FilePath = '~/liang/RS/'; %directory
SL = '/';
end
DR_PBase_setup; %load setup file
%datasets
PLOT_SET = {
's3... |
1901ba60e0625bd8af2aed46046e6cd782f5183fde0a2aa6c28c836602b8f8e1 | MATLAB | 26,324 | 610 | function result = rsimca(x,group,varargin)
%RSIMCA performs a robust version of 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 (ROBPCA) is performed. Afterwards a classification
% rule is developped to determine the assignment... |
4864d398e145114f9201aa4423edabd9b2e159d918d555196701e3f851a7f442 | MATLAB | 26,487 | 531 | function [M_final,shifts,template,options,col_shift] = normcorre(Y,options,template)
% online motion correction through DFT subpixel registration
% Based on the dftregistration.m function from Manuel Guizar and Jim Fienup
% INPUTS
% Y: Input data, can be already loaded in memory as a 3D
% ... |
ce7796a2cee632062ada2dfca1923e50d28f6912d8591189542cc92b0b511e83 | MATLAB | 26,729 | 492 | % Computing baseline power on alpha and theta bands
% Core code provided by Ruey-song Huang (SCCN, UCSD)
% ver. 200811
%% set parameters (initialize)
clear all;
SL = '\';
FilePath = '';
if isunix
mypath;
FilePath = '~/liang/'; %directory
SL = '/';
end
DR_PBase_setup;
%datasets
PLOT_SET = {
's31_0611... |
279449cbd8c2d9e5acc998aa8e5c729f032ebe02ebfd7bbf74276668c7cc3884 | MATLAB | 26,783 | 741 | classdef jzmqConnection < optickaCore
%> jzmqConnection is a class to handle ØMQ connections for opticka class
%> communication. We use JeroMQ wrapper jzmq, a pure Java implementation of
%> ØMQ.
properties
%> ØMQ connection type, e.g. 'REQ', 'REP', 'PUB', 'SUB', etc.
type jzmq.SocketType = "REQ"
%> transpor... |
4494ebb6433e43f52773ea1ba60ce43926b51b1043a83e6448923d63cf420f1d | MATLAB | 26,800 | 515 | %> DEFAULT state configuration file for runExperiment.runTask (full
%> behavioural task design). This state file has a [prefix] state (a blank before
%> fixation starts), then a [fixate] state for the subject to initiate fixation.
%> If the subject fails initial fixation, an [breakfix] state is called. If the
%> subjec... |
4578d580d3cc481a9fb29e25b327e527fa2e4f0ac65920451e5542daba93d301 | MATLAB | 27,152 | 518 | %> DEFAULT state configuration file for runExperiment.runTask (full
%> behavioural task design). This state file has a [prefix] state (a blank before
%> fixation starts), then a [fixate] state for the subject to initiate fixation.
%> If the subject fails initial fixation, an [breakfix] state is called. If the
%> subjec... |
bea285cc576cd11f206d0e0b954109601a92a92ebdac45f379c58051e056d5fb | MATLAB | 27,253 | 825 | % ========================================================================
%> DEPRECATED, use taskSequence.
%>
%> Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md
% ========================================================================
classdef stimulusSequence < optickaCore & dynamicprops
pr... |
aef54f16e42b9db8ffdd914bd8f0c88f239c21bf00379bc042d8aa846ebd0c9a | MATLAB | 27,296 | 713 | clear
load('ProcessedData\tables_compiled.mat');
%% split simply by trialN
% reorg main table if needed; all days
% re_org = vertcat(tables_compiled{:});
% tables_compiled = cell(2,1);
% tables_compiled{1,1} = re_org(re_org.TrialN < 5,:);
% tables_compiled{2,1} = re_org(re_org.TrialN > 4,:);
% reorg main ta... |
68e38c9606daa08ec7749815210ee60c7a06e22f77057c80ec3fc78a2a05f519 | MATLAB | 27,406 | 753 | classdef jzmqConnection < optickaCore
%> jzmqConnection is a class to handle ØMQ connections for opticka class
%> communication. We use JeroMQ wrapper jzmq, a pure Java implementation of
%> ØMQ.
properties
%> ØMQ connection type, e.g. 'REQ', 'REP', 'PUB', 'SUB', etc.
type jzmq.SocketType = "REQ"
%> transpor... |
ab429e7a90edc73bf3d82eabde2f1cad405bc328a71e26deb5bca0f83236f8d0 | MATLAB | 27,450 | 620 | % ========================================================================
classdef arduinoIOPort < handle
%> @class arduinoIOPort
%> @brief arduinoIOPort - modified legacy ardino interface using PTB IOPort
%> interface for serial communication and adding a new timedTTL function for
%> asynchronous TTL output (i.e. ret... |
1a0b89e7a661c005b54fa6afa6d147f7946438154d896bfe9631adbd333aa512 | MATLAB | 27,526 | 756 | function [hdr] = ft_read_plxheader(filename, varargin)
% FT_READ_HEADER reads header information from a variety of EEG, MEG and LFP
% files and represents the header information in a common data-independent
% format. The supported formats are listed below.
%
% Use as
% hdr = ft_read_header(filename, ...)
%
% Additio... |
fd557efc3c445615fa515ff743197a829dd7605b31ce6247aff182964ea6a716 | MATLAB | 27,903 | 897 | classdef LFPMeta < analysisCore
properties
%verbosity
verbose = true;
end
properties (SetAccess = protected, GetAccess = public)
%> LFP sites
sites@cell
%> display list
list@cell
%> raw LFP objects
raw@cell
%> meta result
results
end
properties (SetAccess = protected, GetAccess = public, ... |
60168e2321f1998c84715d154e6ea5b8d63122c3ad537eab23265e10a24124b2 | MATLAB | 28,418 | 923 | function fish_p = unit_subregions(EventTypes)
%UNIT_SUBREGIONS Localization of units within the STN
% UNIT_SUBREGIONS(EventTypes)
% - creates a struct with localization data to be used for analysis, based
% on an excel table, localized in rootdir \ 'STN_loc' \ :
% 'stn_regiok_final_anonim.xlsx' name ... |
afc2920609f2041b00b0618ef6d38685d8724b367c3fc8f44fd98c826b93a127 | MATLAB | 28,618 | 896 | % ========================================================================
classdef touchManager < optickaCore
%> @class touchManager
%> @brief Manages touch screens (wraps the PTB TouchQueue* functions), and
%> provides touch area management methods
%>
%> TOUCHMANAGER -- call this and setup with screen manager, then r... |
c01eae78e03eafe6a21c9c6c741916777ad1c4995c4e32bd83ed98577d317b5d | MATLAB | 28,639 | 594 | % ========================================================================
%> @class EyetrackerCoreTest
%> @brief Class-based unit tests for eyetrackerCore / eyelinkManager.
%>
%> Tests the fixation-window logic, exclusion zones, fixInit, offset,
%> reset methods, and dummy-mode (mouse) sample acquisition using
%> eyel... |
eef34ce53925e270df39edc92ea00d84bd7d2d7f3a3ffddc4af636f4fd4cbc9f | MATLAB | 28,661 | 601 | %power spectra cross subjects (comparing motionless and motion)
%mostly base on RS_powbase
%This version: 2009/1 by poem
%% set parameters (initialize)
clear all;
SL = '\';
FilePath = '';
if isunix
mypath;
FilePath = '~/liang/RS/'; %directory
SL = '/';
end
DR_PBase_setup; %load setup file
%datase... |
85150899bdbcea94ec0cc9121e1180ce1cd2c8c649eb72ffdbcb4ab112498159 | MATLAB | 28,784 | 668 | function outputs = eNDM_mouse(varargin)
% Parameters to fit
% param(1) = seed rescale factor
% param(2) = alpha
% param(3) = beta
% param(4) = s
% param(5) = a (not explored or fit)
% param(6) = b
% param(7) = p
% Define defaults and set inputs
study_ = 'IbaHippInj';
costfun_ = 'LinR';
solvetype_ = 'analytic';
volc... |
fc24c61747f7c8b4b7790a5d3ce9a050f0495c214609aa1788d56f352236f784 | MATLAB | 28,950 | 904 | function [samples, stats, structArray] = matjags(dataStruct, jagsFilenm, initStructs , varargin)
% MATJAGS, a Matlab interface for JAGS
% Version 1.3. Tested on JAGS 3.3.0, Windows 64-bit version
%
% This code has been adapted from MATBUGS that was written by Kevin Murphy and Maryam Mahdaviani
%
% [samples, stats] = ma... |
1d0c36a47c5a0ae586e5ea517465ad2dd7449416cba48b593c0309f87c5200da | MATLAB | 29,015 | 621 | % ========================================================================
%> @class TouchManagerTest
%> @brief Class-based unit tests for touchManager.
%>
%> Tests construction, property defaults, window management (updateWindow,
%> resetWindow), reset behaviour, exclusion zones, and the calculateWindow
%> logic (circ... |
fe2347765cfa6da5ecbb9ea1938d22c5dc2124bb7fe73dfbb1f78636c5ce5e80 | MATLAB | 29,147 | 606 | %power spectra cross subjects (comparing motionless and motion)
%mostly base on RS_powbase
%This version: 2009/2 by poem
%% set parameters (initialize)
clear all;
SL = '\';
FilePath = '';
if isunix
mypath;
FilePath = '~/liang/RS/'; %directory
SL = '/';
end
DR_PBase_setup; %load setup file
%datase... |
053455d2ecf7427af9b17cf3efb0a13d50f0ed82e7285070608925a49625ef6a | MATLAB | 29,965 | 947 | function comp_nmf_online_algorithms()
% Test file for stochastic/online NMF.
%
% Created by H.Kasai on Apr. 17, 2018
clc;
clear;
close all;
%% set options
max_epoch = 100;
verbose = 2;
batch_size = 50;
permute_on ... |
62df122e5fcdcf1e7704e2e9b7ecb5349509c66859de6b11c2cf839abd68ec47 | MATLAB | 29,969 | 947 | function comp_nmf_online_algorithms_test()
% Test file for stochastic/online NMF.
%
% Created by H.Kasai on Apr. 17, 2018
clc;
clear;
close all;
%% set options
max_epoch = 100;
verbose = 2;
batch_size = 50;
permute_on ... |
1c639f1989c14636ce563629526151e69d5a853026943aa67fe2902042b08e8d | MATLAB | 30,420 | 866 | function result=robpca(x,varargin)
%ROBPCA is a 'ROBust method for Principal Components Analysis'.
% It is resistant to outliers in the data. The robust loadings are computed
% using projection-pursuit techniques and the MCD method.
% Therefore ROBPCA can be applied to both low and high-dimensional data sets.
% In l... |
63d7e28262b578c6d3fc869b0f369ea2f3bf35499e4c0647348f4da06772a316 | MATLAB | 30,474 | 633 | %power spectra cross subjects (comparing motionless and motion)
%mostly base on RS_powbase
%This version: 2009/3 by poem
%% set parameters (initialize)
clear all;
SL = '\';
FilePath = '';
if isunix
mypath;
FilePath = '~/liang/RS/'; %directory
SL = '/';
end
DR_PBase_setup; %load setup file
%datase... |
b8f742041f9bab507b7019d5b2b26aef22605be8f2ae1d58b5b3f62906565967 | MATLAB | 30,474 | 677 | function [tY, Pnt, paramfl, tYocv] = nk_PerfPreprocess(Y, inp, labels, ...
paramfl, Yocv, Cocv)
% =========================================================================
% [tY, Pnt, paramfl, tYocv] = nk_PerfPreprocess(Y, inp, labels, ...
% ... |
9b338fbf769fa2ce4319a81d398633b7d40604659fb6e56fb66d76bdf5454cf1 | MATLAB | 30,537 | 632 | %% KJH 03/182026
% code for reproducing all statistics in Hiersche, Osher, Saygin (2026)
% Functional Dissociation of Language and Theory of Mind in the Developing
% Superior Temporal Lobe. Communications Biology
% code and data are all available on https://github.com/SayginLab/STL_languageToM
% most analyses were pe... |
27036f5d86e5c65982f2e677ed380c2f2ce70d95e4996d74b8626f61fde86497 | MATLAB | 30,560 | 1,025 | function TFpower_map_RT
% TFPOWER_MAP_RT Correlation map between reaction time and wavelet power coefficients
% TFPOWER_MAP_RT calculates trial-by-trial correlation (Pearson's correlation)
% between reaction time and time-frequency wavelet power coefficients of each patient.
% Significant correlation tested ... |
4c79088ef45024d8c2343056b7f834ee28ed773349dcce25196cc236ca4fa077 | MATLAB | 30,856 | 662 | %power spectra cross subjects (comparing motionless and motion)
%mostly base on RS_powbase
%This version: 200908 by poem
%% set parameters (initialize)
clear all;
SL = '\';
FilePath = '';
if isunix
mypath;
FilePath = '~/liang/RS/'; %directory
SL = '/';
end
DR_PBase_setup; %load setup file
%datase... |
ea85ba174c068c71221a74a05298b14894981e6c0263ea195feb8cbd0403e520 | MATLAB | 30,866 | 662 | %power spectra cross subjects (comparing motionless and motion)
%mostly base on RS_powbase
%This version: 200904 by poem
%% set parameters (initialize)
clear all;
SL = '\';
FilePath = '';
if isunix
mypath;
FilePath = '~/liang/RS/'; %directory
SL = '/';
end
DR_PBase_setup; %load setup file
%datase... |
42ee5ffd7c67a56970d2c656c60bd4b3bd48c8d116d6faab3a83db3e095eefa5 | MATLAB | 31,469 | 817 | function [ Res, IN ] = nk_SimulateML2(IN, axes, batchflag)
% =========================================================================
% FORMAT function [ R, P ] = nk_SimulateML2(IN)
% =========================================================================
% This function is part of the NeuroMiner machine learning li... |
f920e0684fa79a3114e1df538a01f25886249831d050dd3eed6d47a11d378a54 | MATLAB | 31,773 | 671 | function [im, kspFull] = pocs( ksp, iter, watchProgress )
%Partial-Fourier Reconstruction with POCS
%
% [im, kspFull] = pocs( kspIn, iter, watchProgr )
%
% === Input ===
%
% kspIn: Reduced Cartesian MRI Data-Set
% Any dimension may be reduced,
% but only one reduction dim. is... |
d501cf99fdcc0b12b729d37d9680c6608bfc7c9cabc20d341958753f4eae7b27 | MATLAB | 32,010 | 914 | % ========================================================================
%> @brief LABJACKT Connects and manages a LabJack T4 / T7
%> This class handles digital I/O and analog I/O and analog streaming.
%> Connection can be USB or network. Network is slightly lower latency than USB
%>
%> Example:
%>
%> ```matlab
%> l ... |
2a1d4ed2dd764eac1ac329e51cefc575d6eef9e66eb6144502ee3725ed981d2f | MATLAB | 32,672 | 716 | %This code is from the following two links
%https://www.mathworks.com/matlabcentral/fileexchange/45134-violin-plot.
%Bechtold, Bastian, 2016. Violin Plots for Matlab, Github Project
%https://github.com/bastibe/Violinplot-Matlab, DOI: 10.5281/zenodo.4559847, https://www.mathworks.com/matlabcentral/fileexchange/1701... |
17a7860f01b2e2d1f6928cd09dfa7eecd55203a3ec293e23d00a787baddd1518 | MATLAB | 32,914 | 693 | function [im, kspFull] = pocs_wt( ksp, iter, watchProgress )
%Partial-Fourier Reconstruction with POCS
%
% [im, kspFull] = pocs_wt( kspIn, iter, watchProgr )
%
% === Input ===
%
% kspIn: Reduced Cartesian MRI Data-Set
% Any dimension may be reduced,
% but only one reduction d... |
15030ce48c53e554b1208f05f784f53a6ef3896947b8afaa818d69a3b755e8ec | MATLAB | 33,302 | 701 | %component maps, dipoles and power spectra in a cluster
%ver 200903
%pre_ver: DR_PlotCompPowerDipole_200902_final
%% set parameters (initialize)
try
close(4001);
end
try
close(4002);
end
try
close(4003);
end
try
close(4004);
end
try
close(4009);
end
try
close(166);
end
clear all;
SL... |
a46b96e27f64cc52f3361b23ec628b74ed95d92b2ac631ed2e062220e6a4f56f | MATLAB | 33,481 | 905 | function varargout = nk_ItemSelector(varargin)
% NK_ITEMSELECTOR MATLAB code for nk_ItemSelector.fig
% NK_ITEMSELECTOR, by itself, creates a new NK_ITEMSELECTOR or raises the existing
% singleton*.
%
% H = NK_ITEMSELECTOR returns the handle to a new NK_ITEMSELECTOR or the handle to
% the existing si... |
5730177843a5083bcf2f2f7f499d0d5bf988620463d0a7ae57dae088dfbb037d | MATLAB | 33,799 | 531 | %==========================================================================
%FORMAT [ IN , OUT ] = SubSpaceStrat(IN, OUT, Param.EnsembleStrategy, strout)
%==========================================================================
%Performs subspace optimization using either probabilistic feature
%extraction or en... |
abb6a39bfa623dd0c406a7d36afd1ada677f6908f3c193c6f9e6f29232bf6669 | MATLAB | 33,988 | 1,050 | % ========================================================================
%> @brief ANIMATIONMANAGER Provides per frame paths for stimuli
%> We integrate dyn4j java physics engine for rigid body. The plan is to
%> also support sinusoidal, brownian, circular etc.
%>
%> ```matlab
%> screen = screenManager(); % create a... |
aecb0ff80ed5b6ecb854c5599cdde051a022475a787ff0cea323a68018748716 | MATLAB | 34,068 | 721 | function [act, varind] = nk_TrainClass_config(act, varind, parentstr)
% =========================================================================
% FORMAT [act, varind] = nk_TrainClass_config(act, varind, parentstr)
% =========================================================================
% Interface for defining the... |
eb4f3e59a3e941899949b296d66d7f49960ce731df37f5d1149bd7a40d783d03 | MATLAB | 34,453 | 1,066 | % ========================================================================
%> @brief ANIMATIONMANAGER Provides per frame paths for stimuli
%> We integrate dyn4j java physics engine for rigid body. The plan is to
%> also support sinusoidal, brownian, circular etc.
%>
%> ```matlab
%> screen = screenManager(); % create a... |
b968dafdbd5f6cc9dc9f721be419a75e52823fbd330a541cdcf186c3aa36db73 | MATLAB | 34,489 | 465 | function PlotPopulationMetricChanges(ProcessedData,RecordingMetrics,AnalysisRegions,InjuryIndicies,Correlograms,plotProps,sw)
%Make violin plots of correlogram metric distributions for all analyzed regions
%% Initialize arrays to make violin plots of correlogram metrics
if plotProps.includeAutocorrelogramsInStatis... |
813348a36b6760af2e67a5f7773b4b71ee81e347453a064e3e062f1064036656 | MATLAB | 34,544 | 798 | function hn=arrow3(p1,p2,s,w,h,ip,alpha,beta)
% ARROW3 (R13)
% ARROW3(P1,P2) draws lines from P1 to P2 with directional arrowheads.
% P1 and P2 are either nx2 or nx3 matrices. Each row of P1 is an
% initial point, and each row of P2 is a terminal point.
%
% ARROW3(P1,P2,S,W,H,IP,ALPHA,BETA) can be used ... |
0a8d1986c83b0d9592d01026b5c99b11e32593bd770eb6d85724ae1e1c12c35e | MATLAB | 34,640 | 505 | function [InjuryIndicies,AnalysisRegions, plotProps] = getInjuryOrTreatmentIndicies(RecordingMetrics,plxFileName,sw,plotProps,ProcessedData)
%This function allows the user to specify where treatments were
%administered during the recording and plots recording outputs independent
%of correlograms with the labeled tre... |
0b3f799626b673cdf7d4d57214bf5c83d5c4cffaf199f21465b34833799df72a | MATLAB | 34,664 | 830 | function twix_obj = mapVBVD(filename,varargin)
% Reads Siemens raw .dat file from VB/VD MRI raw data.
% requires twix_map_obj.m & read_twix_hdr.m
%
%
% Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de)
%
%
% Philipp Ehses 11.02.07, original version
% [..]
% Philipp Ehses 22.03.11, port to VD11... |
ea02da664f535df5d80eb79aa0f02444b4dc90eb9d2a1ea2c555dd49c7c5aac6 | MATLAB | 35,555 | 853 | function twix_obj = mapVBVD_wt(filename,varargin)
% Reads Siemens raw .dat file from VB/VD MRI raw data.
% requires twix_map_obj.m & read_twix_hdr.m
%
%
% Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de)
%
%
% Philipp Ehses 11.02.07, original version
% [..]
% Philipp Ehses 22.03.11, port to V... |
0a2d8cfc62e09ab54eb13982d46d62eac2155e1a1ea755d7a5a918771ca1cc5b | MATLAB | 35,590 | 1,068 | % ========================================================================
classdef optickaCore < handle
%> @class optickaCore
%> @brief optickaCore base class inherited by other opticka classes.
%>
%> @section intro Introduction
%>
%> optickaCore is itself derived from handle. It provides methods to find
%> attributes... |
1c2021853fd21c75c0c70069bf61fc49c303f03170268c045b1822097af8be2f | MATLAB | 36,033 | 913 | % ========================================================================
%> @brief LABJACK Connects and manages a LabJack U3 / U6
%>
%> Connects and manages a LabJack U3 / U6. To run this in OS X and Linux,
%> you need to install libusb and the exodriver. The easiest way to do this
%> is to use homebrew on OS X, a li... |
8747e372e3667f53d614cdbf88afa54ada75eb78e6b9af1fc599ba05e4b966e0 | MATLAB | 36,188 | 989 | % ========================================================================
classdef eyelinkManager < eyetrackerCore
%> @class eyelinkManager
%> @brief eyelinkManager wraps around the eyelink toolbox functions offering a
%> consistent interface and methods for fixation window control. See
%> eyetrackerCore for the commo... |
380c829db08d550123755d237c89b44a1c506972f409d6bd5b2c6d0af8ac4ff9 | MATLAB | 36,252 | 1,087 | % ========================================================================
classdef pupilCoreManager < eyetrackerCore & eyetrackerSmooth
%> @class pupilCoreManager
%> @brief Manages the Pupil Labs Core
%>
%> The eyetrackerCore methods enable the user to test for common behavioural
%> eye tracking tasks with single comm... |
ecd61f5221e449fad2def757d003bbbf2ca375f1a5644de27fe154cb6d81fe4b | MATLAB | 36,261 | 1,087 | % ========================================================================
classdef pupilCoreManager < eyetrackerCore & eyetrackerSmooth
%> @class pupilCoreManager
%> @brief Manages the Pupil Labs Core
%>
%> The eyetrackerCore methods enable the user to test for common behavioural
%> eye tracking tasks with single comm... |
b0a95085201747f26e9995e12b6200ad57619066f5c0ba4a5a1276efa040590f | MATLAB | 36,319 | 990 | % ========================================================================
classdef eyelinkManager < eyetrackerCore
%> @class eyelinkManager
%> @brief eyelinkManager wraps around the eyelink toolbox functions offering a
%> consistent interface and methods for fixation window control. See
%> eyetrackerCore for the commo... |
8cd6375c721b34bef33f93f74f274f6c3b20f457564c904725e06f9a1897d940 | MATLAB | 36,333 | 924 | % ========================================================================
%> @class ScreenManagerTest
%> @brief Class-based unit tests for screenManager.
%>
%> Tests construction, property defaults, set methods for all public
%> properties, coordinate conversion (toPixels/toDegrees), and static
%> utility methods. CI-... |
20f3db2389b80be0a96837aabeeb055cd6a1af93dd300181557a3c9ddb8f6896 | MATLAB | 36,484 | 1,086 | function RT_perf_compare(groups_nm,conditions,stat,remoutliers, indivfig,avgfig,addlines,addpoints,rtplots,perfplots)
%RT_PERF_COMPARE Comparison of reaction time (RT), performance and stop performance.
% RT_perf_compare(groups_nm,conditions,...) calculates RT and/or performance
% for specified patient groups... |
df76615d68a0821c9249d5fa9f7edaacbc05473fcc43321133dc795fed9dce0e | MATLAB | 36,736 | 1,188 | % ========================================================================
%> @brief dataConnection Connects and manages a socket connection
%>
%> Connects and manages TCP/UDP Communication. We allow both TCP and UDP
%> connections, and can choose to be a client or server in TCP mode. To use
%> at its simplest in UDP m... |
1e27a118fb1670dd8e555dbd639a629b1fdee761de8d2adcb1a6f34012f6ed95 | MATLAB | 36,902 | 1,094 | % ========================================================================
classdef iRecManager < eyetrackerCore & eyetrackerSmooth
%> @class iRecManager
%> @brief Manages the iRec eyetrackers https://staff.aist.go.jp/k.matsuda/iRecHS2/index_e.html
%>
%> The eyetrackerCore methods enable the user to test for common beh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.