sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
8354d1fac79a613a2080722d2e122efb2f52067828a1bbfe445209dee3a106c6 | MATLAB | 13,317 | 465 | % clear
% clc
% f = gcf;
% exportgraphics(f,'Fig1_Original.png','Resolution',600)
MotionData = load('MotionData.mat');
MusculoskeletalData = load('MusculoskeletalData.mat');
MuscleCluster = load('MuscleCluster.mat');
MuscleCluster = MuscleCluster.MuscleCluster;
C1 = MuscleCluster{1};
C2 = MuscleCluster{2};
C3 = Mus... |
10b1635c52be37ba801e089924b15faf98ce6098ba995897db77ab4d12d9c4dc | MATLAB | 13,329 | 483 | clear
clc
% f = gcf;
% exportgraphics(f,'Fig1_Original.png','Resolution',600)
MotionData = load('MotionData.mat');
MusculoskeletalData = load('MusculoskeletalData.mat');
%% Motion Data
MotionData = MotionData.MotionData;
% Joint Angles
SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180);
ELBa = MotionData.G... |
0d8076a59e8748783ed5773ebdbeb14fb38cad86e5d7bb1752ae32b2d02b66b7 | MATLAB | 13,348 | 1 | function GLAN = timefreq_stata_group(GLAN,cfg)
% REALIZA ESTADISTICA NOPARAMETRICA A TRIEMP-FRECUENCIA
% v.0.0.1
%
%
% cfg.
% subject = [{}{}{}]
% comp =[n1 n2]; % INDEX OF THE CONDITION TO COMPARED , ONLY TWO!!!
% alpha =0.05;
% m ='d'; OR ='i' % RELATIONSHEAP TO THE SAMPLES 'i'NDEPENDENT OR 'd'EPENDET
% ... |
6c4a076f9320d56a2206d0e57a2654c830eb7f4ca44be229de469e14b091ae42 | MATLAB | 13,351 | 343 | % Imports
addpath("HelperFunctions")
load(fullfile(DataPath, "WeberData.mat")) % Weber fraction
load(fullfile(DataPath, "AmpDiscrim.mat")) % ICMS amp discrim
load(fullfile(DataPath, "ForceEquiv_UC.mat")) % Mech amp est
load(fullfile(DataPath, "AmpDiscrimMultiChan.mat")) % Multi chan discrim
load(fullfile(DataPath, "Amp... |
e84f01289c4d3fefe4772a12b28f94ea25ad13aab701f06f8ff7bb587a2baa9a | MATLAB | 13,367 | 383 | function [map,prm] = cubehelix_view(N,start,rots,sat,gamma,irange,domain)
% An interactive figure for Cubehelix colormap parameter selection. With demo!
%
% (c) 2017 Stephen Cobeldick
%
% View Dave Green's Cubehelix colorschemes in a figure.
%
% * Two colorbars give the colorscheme in color and grayscale.
% * A button ... |
cda9ad37389a4ee47b4bd7d9908e5632d9446000ee05a286bc1647e43135aec5 | MATLAB | 13,386 | 369 | classdef PointFilterContainer < matlab.mixin.Copyable
%
%
%
%<PRE>
% This file is part of dspace-core.
%
% Copyright (C) 2020 University Zurich, Sepp Kollmorgen
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU Affero Gene... |
7f1b5b6fe590030839bab465ebad6a5a492f757d5c78e9e63d326cae836537e2 | MATLAB | 13,387 | 252 | function [pval,F,slope_intcpt_lm]= plot_rate_remapping_NEW(varargin)
%%% now as a name-var pair input method
% INPUTS:
% 'scoring': 'wcorr','spearman' - in the future will add 'linear' (default: 'wcorr')
% 'method': 'TRACK_PAIRS' or 'ONE_TRACK' (default: '... |
56cd32e49b2c85bf073e0b3c304b08a3e4a510f606f972c11c3dd226bd25b762 | MATLAB | 13,389 | 462 | % clear
% clc
% f = gcf;
% exportgraphics(f,'Fig1_Original.png','Resolution',600)
MotionData = load('MotionData.mat');
MusculoskeletalData = load('MusculoskeletalData.mat');
MuscleCluster = load('MuscleCluster.mat');
MuscleCluster = MuscleCluster.MuscleCluster;
C1 = MuscleCluster{1};
C2 = MuscleCluster{2};
C3 = Mus... |
4d384d1b34cd964a912a65781790f73ac019e569d0d4ee3e7b63a0869a08bc11 | MATLAB | 13,391 | 413 | //========================================================================
// GLFW 3.4 macOS - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>
//
// This software is provided 'as-is', without any express or implied
// ... |
422e68c8fbb8f2f793e464ecaab3e7b9f902f75bc33dfd45c170580bf0668d94 | MATLAB | 13,397 | 348 | function [Zi, h] = ft_plot_topo(chanX, chanY, dat, varargin)
% FT_PLOT_TOPO interpolates and plots the 2-D spatial topography of the
% potential or field distribution over the head
%
% Use as
% ft_plot_topo(x, y, val, ...)
%
% Optional arguments should come in key-value pairs and can include
% 'gridscale' = sc... |
a9c72d3c9c9041d262afda2c2f8294973fbd7804b1e2f438d3bff005e105944e | MATLAB | 13,408 | 348 | function [Zi, h] = ft_plot_topo(chanX, chanY, dat, varargin)
% FT_PLOT_TOPO interpolates and plots the 2-D spatial topography of the
% potential or field distribution over the head
%
% Use as
% ft_plot_topo(x, y, val, ...)
%
% Optional arguments should come in key-value pairs and can include
% 'gridscale' = sc... |
001d1d89ae76505c30f430670dc9a6d5cfdd55bf1e610d817d54676348dc5754 | MATLAB | 13,410 | 377 | function [h, t, w, auc, w_times, halfh] = htw_from_fit(hrf, b, dt, varargin)
% Estimates height, time to peak, width, and area under the curve of a fitted response
%
% :Usage:
% ::
%
% h, t, w, auc, w_times, halfh] = htw_from_fit(hrf, b, dt, [optional arguments])
%
% ..
% tor wager, Sept 08
% ..
%
% :Inputs:
%
... |
cba33212a0d29689f6bb196c0e75fcb8cccb05b2659036a3ca0b4ea84497dcef | MATLAB | 13,413 | 260 | % This script inverts the QGIF model for the given fluorescence trace using
% CaBBI method: [ Rahmati. et al. 2016, PLoS Comput Biol 12(2) ]
%
% To user:
% I) in Step 1, determine the directory to the fluorescence trace (a real row vector);
% as default the code will download and use our published data for CaBBI
% ... |
65e037abb872410ec7915d65caa3862e7cf3a2b9422fdc350f9506b0652a7a6f | MATLAB | 13,421 | 402 | % This code runs simulations of a 3-layer spiking recurrent neural network
% L0: input layer
% L1: Sender network
% L2: Receiver network
% I did set up the network in such a way that L0 consists of homogeneous
% Poisson processes (in space and in time), and L1 and L2 have the same
% parameters and hence are equivalent.... |
1bac17eddb5ac2a78638fd157e88d48519df96d8ca56066fe6b4f06852c9754f | MATLAB | 13,430 | 229 | function place_fields = calculate_place_fields(x_bins_width)
% INPUTS:
% x_bin_width: enter width value (2 for fine resolution, 10 for bayesian
% decoding).
% loads list_of_parameters.m, extracted_clusters.mat,extracted_position.mat, extracted_waveform.mat
% uses function skaggs_information.m
% Main difference is t... |
0fbc2213f91fb64faab9d51e2c49f9aa55f6db504855a9142e172aa1f528ffe0 | MATLAB | 13,438 | 302 | function [stat, cfg] = ft_statistics_mvpa(cfg, dat, design)
% FT_STATISTICS_MVPA performs multivariate pattern classification
% on the data. If the data has not been averaged over time, classification
% is performed separately for every time point. Additionally, searchlight
% analysis (classification for each channel/... |
5dfb1e94867b92bc604cd94c1c38515f333a16bbb3fe49e00287b49efab25650 | MATLAB | 13,445 | 260 | %% Decription
% This example showcases the ability to launch broadband simulations, in
% which multiple wavelengths of excitation and fluorescence light are
% simulated. The geometry is loosely based on that of example 4 (blood
% vessel), but with a sphere of some fluorescing stained cancerous tissue
% inserted into th... |
2837bf947a9090914f15810c82915b263d112e2eba65d558f4621f32bf6352ab | MATLAB | 13,447 | 309 | function [FCBrain, Header] = y_SCA(AllVolume, ROIDef, OutputName, MaskData, IsMultipleLabel, ROISelectedIndex, IsNeedDetrend, Band, TR, TemporalMask, ScrubbingMethod, ScrubbingTiming, Header, CUTNUMBER)
% [FCBrain, Header] = y_SCA(AllVolume, ROIDef, OutputName, MaskData, IsMultipleLabel, ROISelectedIndex, IsNeedDetrend... |
6d97645773af3cbd33fd0c96b658b350951b00e5c8f8e7eff31b49b287f5d3a2 | MATLAB | 13,447 | 371 | function [dipout] = beamformer_pcc(dip, grad, headmodel, dat, Cf, varargin)
% BEAMFORMER_PCC implements an experimental beamformer based on partial
% canonical correlations or coherences. Dipole locations that are outside
% the head will return a NaN value.
%
% Use as
% [dipout] = beamformer_pcc(dipin, grad, headmod... |
552b7fccf1ed3cb96481837d59757a7891ca481a1d3ed74dcb9f4835b6498340 | MATLAB | 13,449 | 511 | function LAN = freq_lan(LAN,cfg)
% freq_lan.m
% v 0.1.7
%
%
% REQUIERTE:
% LAN.freq.cfg. o cfg
% .type = 'Hilbert' 'Fourier' 'MultiTaper' 'Morlet'
% .bin = [r] ; resolucion en frecuiencias e.g = 1
% .win = [n] ; ventana en puntos e.g = 512
% .fwin = [tw] ; cycles per time window for th... |
0c75de241698bb77e546c66c62d5517d198efee5ea16ab2c5c0212f30731d775 | MATLAB | 13,455 | 324 | function varargout = sbfmf_write_gui(varargin)
% SBFMF_WRITE_GUI M-file for sbfmf_write_gui.fig
% SBFMF_WRITE_GUI, by itself, creates a new SBFMF_WRITE_GUI or raises the existing
% singleton*.
%
% H = SBFMF_WRITE_GUI returns the handle to a new SBFMF_WRITE_GUI or the handle to
% the existing singlet... |
81dd8c13aeb20750d14a5b55fb5feda74462c8f564fc5bbe12a7b95bc6ee6353 | MATLAB | 13,456 | 366 | function varargout = DPABI_VoxelAugmentor(varargin)
% DPABI_VoxelAugmentor MATLAB code for DPABI_VoxelAugmentor.fig
% DPABI_VoxelAugmentor, by itself, creates a new DPABI_VoxelAugmentor or raises the existing
% singleton*.
%
% H = DPABI_VoxelAugmentor returns the handle to a new DPABI_VoxelAugmentor or t... |
f3454904ba4b53e5f9f03bc2c4a05881f38a01defa5410084b608a98e5a8c49c | MATLAB | 13,459 | 290 | function savefig(fname, varargin)
% Usage: savefig(filename, fighdl, options)
%
% Saves a pdf, eps, png, jpeg, and/or tiff of the contents of the fighandle's (or current) figure.
% It saves an eps of the figure and the uses Ghostscript to convert to the other formats.
% The result is a cropped, clean picture. There a... |
73c0d058e661a585e82ea273429cfd14ba7f20f680abaa8810509d9e87f34aec | MATLAB | 13,473 | 421 | function [source] = fixsource(source)
% FIXSOURCE converts old style source structures into new style source structures
%
% Use as
% output = fixsource(input)
% where input is a structure representing source data
%
% Typically, old style source structures contain source.avg.XXX or source.trial.XXX.
% Furthermore. o... |
d451b3e23d031d9d5e84fe6f87ede10aabdbdf32fd4d7366c33fc3918ee88957 | MATLAB | 13,475 | 324 | function varargout = w_AlphaSimCorrection(varargin)
% W_ALPHASIMCORRECTION MATLAB code for w_AlphaSimCorrection.fig
% W_ALPHASIMCORRECTION, by itself, creates a new W_ALPHASIMCORRECTION or raises the existing
% singleton*.
%
% H = W_ALPHASIMCORRECTION returns the handle to a new W_ALPHASIMCORRECTION or t... |
c3160f9be5f51e546f9da10f3d28292ba7f0214620bd48eecc6a02578b060438 | MATLAB | 13,489 | 320 | %% computeSDO_populateSDOArray (DEPRECIATED)
% Given supplied point-process and time series data sets, compute the
% stochastic dynamic operator for every supplied combination.
%
% The SDO measures the (change in) average state transition between each time
% bin in the 'pre-spike' interval to each 'post-spike' time bi... |
9014f05001390a85e663d42420de46a0807808f2c062aa5e289094d3feb8d959 | MATLAB | 13,492 | 196 | function PAA_calculation_default_all()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Calculate slow wave data summary (from .csv format output)
%
% Info: Opens csv output from 'PAA_standalone' pipeline and computes
% summary stats.
%
% Download: https://github.c... |
d1b57298a0a7757eb96b59fce7808e8c0346d7ae7a01cd6c9f0115e33aa63296 | MATLAB | 13,492 | 381 |
function bayesdata = yw_covbat(dat, batch, mod, parametric, pcs_mod, pcs_parametric, percent_var, npc)
%% function bayesdata = yw_covbat(dat, batch, mod, parametric, pcs_mod, pcs_parametric, percent_var, npc)
% 1.empirical bayesian harmonization of mean and variance
% dat - p x m matrix, p represent par... |
4129fb100bf165373b48eefe084a8ac11ff4ae9140fe4692999b469d78fc136d | MATLAB | 13,496 | 333 | %% computeSDO [Deprecated]
% Standalone programmatic script for SDO Analysis. Generates and analyzes the sdo
% structure from the supplied xtData, ppData, and specified parameters.
% (Parameters must be adjusted within script body.)
%
% DEPENDENCIES: pxTools Library
%
% INPUTS:
% xtData - (Loaded into Memory)
% ... |
c151e543c1c14394b8e49d38634a46ba26e20ac9ccda03fd34116236b12fbb39 | MATLAB | 13,516 | 352 | %__________________________________________________________________________
% violin_h.m - Simple violin plot using matlab default kernel density estimation
%
% Updates:
% v2: extended for accepting also cells of different length
% v3:
% - changed varargin to parameter - value list
% - specification of x-axis va... |
0d99bc461e241b0e043d2b8f67d1a4c264bd0525be8306fcea5c56b9975e1e8d | MATLAB | 13,520 | 321 | %% computeSDO_populateSDOArray
% Given supplied point-process and time series data sets, compute the
% stochastic dynamic operator for every supplied combination.
%
% The SDO measures the (change in) average state transition between each time
% bin in the 'pre-spike' interval to each 'post-spike' time bin; averaged
% ... |
c8cd441856e494c5ee28c6d5054c041aad1d2cef3d92991f459f76527573fd1e | MATLAB | 13,520 | 229 | function H_BrainNet = y_CallBrainNetViewer(BrainVolume,NMin,PMin,ClusterSize,ConnectivityCriterion,SurfFileName,viewtype,ColorMap,NMax,PMax,BrainHeader, PN_Flag)
% function H_BrainNet = y_CallBrainNetViewer(BrainVolume,NMin,PMin,ClusterSize,ConnectivityCriterion,SurfFileName,viewtype,ColorMap,NMax,PMax,BrainHeader)
% F... |
1fb901853f89d14ce42cf6f96ed2031f959ca873cbe2c9084d312954f5d84adf | MATLAB | 13,521 | 359 | function dataOut=fcBx_Chi_McNemar_TwoGroups(fc,Bx,IM,params)
% Perform the correlation analysis (type = {Pearson, Spearman}),
% and enrichment analyses using Chi-square and Hypergeometric stats.
% fc is the Fisher-z fc-data; Nseeds-Nseeds-Nsubj
% Bx is the behavior data; Nsubj
% IM is the ROI-to-module key.
% params.... |
be5cddc47be607d942e75d6326b9e48833a8224112be265d347fc90243e4f0f9 | MATLAB | 13,523 | 468 | function Answer=inputdlg_ZN(Prompt, Title, NumLines, DefAns, Resize)
%INPUTDLG Input dialog box.
% ANSWER = INPUTDLG(PROMPT) creates a modal dialog box that returns user
% input for multiple prompts in the cell array ANSWER. PROMPT is a cell
% array containing the PROMPT strings.
%
% INPUTDLG uses UIWAIT to suspend... |
202640bcd993f4b201820daa1ee3b6aa5c65063c7e0593a604c7589700f4f516 | MATLAB | 13,528 | 348 | function varargout = DPABI_DualRegression(varargin)
% DPABI_DUALREGRESSION MATLAB code for DPABI_DualRegression.fig
% DPABI_DUALREGRESSION, by itself, creates a new DPABI_DUALREGRESSION or raises the existing
% singleton*.
%
% H = DPABI_DUALREGRESSION returns the handle to a new DPABI_DUALREGRESSION or t... |
677df89cf9d1ef3c503c94b81cd60898eb20f61fae051fef748ad655ab2d0a38 | MATLAB | 13,536 | 418 | classdef TrackingVisualizerTrxMAFast < handle
% shows a trx/centroid marker, text label, trajectory traces
% Conceptually similar to TrackingVisualizerTrx but as prototyping MA
% wanted to dev without worrying about SA-Trx regressions
properties
lObj
hTraj; % 1 x 1 vector ... |
9ada9578d23e8ea8379f2db44eb5bf5abf0c5706e4d04ab897b37d99f1c0f18c | MATLAB | 13,543 | 368 | function [pnt, ori, lab] = channelposition(sens)
% CHANNELPOSITION computes the channel positions and orientations from the
% coils or electrodes
%
% Use as
% [pos, ori, lab] = channelposition(sens)
% where sens is an electrode, gradiometer or optode array.
%
% See also FT_DATATYPE_SENS
% Copyright (C) 2009-2018, ... |
f97ed59bd4dbd9e49c4775d5be793b63157bbaed0a43eddf77bf392a34bb5387 | MATLAB | 13,546 | 384 |
% Inputs:
% day -- string; the "stacks" directory where all the data is saved
% Ex: day = 'Y:\Sarah\Data\Random Motorized Treadmill\012122\1088\stacks'
% roi_1_mask =
function [ ] = Data_verification_v3_short_Automated(day, roi_1_mask, roi_2_mask)
% Change Current folder display to your stacks folder
cd... |
0e774d2215bf40b1e62c8c8a8685aedd7c5c18cd00066fa601a012c070512065 | MATLAB | 13,547 | 238 | function [AllStatTests]=Multiple_Statistical_Tests(DataStructure,Statistical_Comparison_Label,DisplayResults,ExportAllResults,StatisticsSaveDir)
AnovaPostHoc_alpha=0.05;
DisplayChoice='off';
if DisplayResults
DisplayTables='on';
else
DisplayTables='off';
end
ANOVA_Mode=[1];
%... |
2240c4ea504ccf288000d7ce9c14a60f3eda46bb9c16cfb9ca333e0b5de6864a | MATLAB | 13,549 | 221 | function [DegreeCentrality_PositiveWeightedSumBrain_LH_AllWindow, DegreeCentrality_PositiveWeightedSumBrain_RH_AllWindow, DegreeCentrality_PositiveBinarizedSumBrain_LH_AllWindow, DegreeCentrality_PositiveBinarizedSumBrain_RH_AllWindow, GHeader_LH, GHeader_RH] = y_DegreeCentrality_Bilateral_Surf_Window(WindowSize, Windo... |
b42bd0d3a89e33a5de75b16d96788df6a939d09a8da5cfbb9e9189a215e8a2c8 | MATLAB | 13,558 | 355 | function [data] = ft_combineplanar(cfg, data)
% FT_COMBINEPLANAR computes the planar gradient magnitude over both directions
% combining the two gradients at each sensor to a single positive-valued number. This
% can be done for single-trial/averaged planar gradient ERFs or single-trial/averaged
% TFRs.
%
% Use as
% ... |
ba5348447e00c952ef664f008201036baf950edfd5fc1f10f3c16e85cb2af47a | MATLAB | 13,567 | 267 | function h_replot3(handles,mode)
global h_img3;
[currentInd, handles, currentStruct, currentStructName] = h_getCurrendInd3(handles);
if ~exist('mode', 'var') || isempty(mode)
mode = 'slow';
end
imageModes = get(handles.imageMode,'String');
currentImageMode = imageModes{get(handles.imageMode,'Value')}... |
0defea8838c255b5fc72f88dc9ae5c953b9974c31ce802641d23a94167726acf | MATLAB | 13,578 | 405 | function polymodel = polyfitn(indepvar,depvar,modelterms)
% polyfitn: fits a general polynomial regression model in n dimensions
% usage: polymodel = polyfitn(indepvar,depvar,modelterms)
%
% Polyfitn fits a polynomial regression model of one or more
% independent variables, of the general form:
%
% z = f(x,y,...) + e... |
b2052da93554769304d1dfce6a8cb927d80a9b68a2c324dd6a2bb4635cfa435c | MATLAB | 13,580 | 248 | %%Initial analysis of individual axon recording sessions
%Chad Heer
%INPUTS
%data = data struct containing F, Fc, and Fc3
%behplane = cell array containing structs of each behavioral variable
%fam_laps = frames in familiar environment
%novel_laps = frames in novel environment
%novel_early = frames of initial laps in n... |
27e65fa405dcd95cff56f7120a4b6d1fb9d2d8eccfa2c226893ed9084c897ac0 | MATLAB | 13,590 | 429 | function varargout = colorspace(Conversion,varargin)
%COLORSPACE Convert a color image between color representations.
% B = COLORSPACE(S,A) converts the color representation of image A
% where S is a string specifying the conversion. S tells the
% source and destination color spaces, S = 'dest<-src', or
% alt... |
354d5eab4c82f2c2b65820e26e003f9399404c63d2535d1382a2097736d8776e | MATLAB | 13,594 | 395 | function [headers, fid] = readPLXHeaders(filename, fullread)
% readPLXHeaders - Read file headers and channel information from PLX file.
%
% [headers, fid] = readPLXHeaders(filename)
%
% readPLXHeaders will read the header data from a PLX file and return a
% structure with fields corresponding to each piece of header d... |
5a9308de5a7315e65181e25b69dd09194e34e35539a90e2274333468f72456fe | MATLAB | 13,594 | 426 | %epa_tach Generates tachometric curves in endogenous pro/anti experiment
%
% This script produces tachometric curves in the endogenously driven
% pro/antisaccade (EPA) task. It reproduces Figure 2; Figure 3a, c;
% Figure 4d, e; Figure 6a, b; and three supplementary figures
% associated with them. More details are... |
bb4876c2b94669f7f0feaf9f9a80d0e987fd24b738f40f942b80dc818fc69ffb | MATLAB | 13,602 | 354 | function [data] = ft_combineplanar(cfg, data)
% FT_COMBINEPLANAR computes the planar gradient magnitude over both directions
% combining the two gradients at each sensor to a single positive-valued number. This
% can be done for single-trial/averaged planar gradient ERFs or single-trial/averaged
% TFRs.
%
% Use as
% ... |
3255d9de88fa0ab6b69e629dc0e03675afd18e51299c2fdaad8af9df6386d177 | MATLAB | 13,606 | 352 | function seqPlayer( fName, dispFunc )
% Simple GUI to play seq files.
%
% Use arrow keys to play the video. Controls are as follows:
% (1) If stopped: [L] play backward, [R] play forward
% (2) If playing forward: [L] halve speed, [R] double speed, [U/D] stop
% (3) If playing backward: [L] double speed, [R] halve speed,... |
752eba1fc2cf57f0e5895d0a6a6d7d2e4a30d58bd431629ec8d2a16a7e370465 | MATLAB | 13,606 | 331 | function [imdata,syndata,pwdata] = synapse_properties_multiplexed(params,fovid,nsynapses)
% This function extracts multiplexed synapse features (e.g. volume, number
% of puncta for each channel, pairwise overlaps, pixel-wise correlations,
% etc.) from cropped synaptic ROIs with multiple channels
%
%Extract parameters... |
1545a628d54e741d6366a3531b0f70b74387adc02852f35dba8933612052df07 | MATLAB | 13,612 | 378 | function FilterIntan(datDir, varargin)
% 3/24/2017 M. Farries
% usage: FilterIntan( datDir, varargin )
% This function wavelet filters data and performs common average
% referencing (CAR). The result is saved in .hsd files (one file for each
% tetrode or stereotrode). Filtering and CAR is applied to all good wi... |
b4a87cd7e8f8af17985755af2909e88685f2865adc22fad834206fb07b3dfb6b | MATLAB | 13,631 | 462 | function [CMAP,LEV,WID,CLIM] = cmjoin(varargin)
%CMJOIN Joins colormaps at certain levels.
%
% SYNTAX:
% cmjoin(CMAPS)
% cmjoin(CMAPS,LEV)
% cmjoin(CMAPS,LEV,WID)
% cmjoin(CMAPS,LEV,WID,CLIM)
% ... |
ed0a758b7032271b87d748f9697bd4b538a19915418627ae102813e742164416 | MATLAB | 13,634 | 392 | function [cfg] = ft_topoplotCC(cfg, freq)
% FT_TOPOPLOTCC plots the coherence between channel pairs
%
% Use as
% ft_topoplotCC(cfg, freq)
%
% The configuration should contain:
% cfg.feedback = string (default = 'textbar')
% cfg.layout = specification of the layout, see FT_PREPARE_LAYOUT
% cfg.foi ... |
9bde21e7079e2b69facb20ed9676b3f0ec29c66adc3e816608aaddb0c8515105 | MATLAB | 13,637 | 482 | % Cleaned-up version of init_calib.m
eval(['I = I_' num2str(kk) ';']);
figure(2);
image(I);
colormap(map);
%%%%%%%%%%%%%%%%%%%%%%%%% LEFT PATTERN ACQUISITION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
title(['Click on the four extreme corners of the left rectangular pattern... Image ' ... |
c83525599527617dae9be1aa4f2b97ac0c63ea1ff10bb61496bd57a34d6a10ff | MATLAB | 13,638 | 366 | function [dipout] = minimumnormestimate(dip, grad, headmodel, dat, varargin)
% MINIMUMNORMESTIMATE computes a linear estimate of the current in a
% distributed source model.
%
% Use as
% [dipout] = minimumnormestimate(dip, grad, headmodel, dat, ...)
%
% Optional input arguments should come in key-value pairs and can... |
6bf666def0ce3b56ef9b8fc4b8dccc444ba78a633bd66190867958f9c96aebb6 | MATLAB | 13,644 | 366 | function [dipout] = minimumnormestimate(dip, grad, headmodel, dat, varargin)
% MINIMUMNORMESTIMATE computes a linear estimate of the current in a
% distributed source model.
%
% Use as
% [dipout] = minimumnormestimate(dip, grad, headmodel, dat, ...)
%
% Optional input arguments should come in key-value pairs and can... |
f5c931edcf18ab164b3404f4ef452d3f3c412d6e1c92cea382bcd73d21528827 | MATLAB | 13,648 | 369 | % This script shows how to run urOMT algorithm and Eulerian & Lagrangian post-processing on a gaussian dataset (which consists of 5 successive images)
% Parameters of urOMT are defined in getPamams.m
% Parameters of Eulerian post-processing are defined in paramInitEULApar.m
% Parameters of Lagrangian post-processing ar... |
f246f2fe91699d8045b797ce64c708db659b3e88f6b0d400049506e9571d1093 | MATLAB | 13,649 | 461 | function COR = modelr_new(COR,cfg)
% <*LAN)<]
% v.0.2.3 devel
%
%
%
% Realiza modelos usando R
% COR estructura de datos
% .cfg configuraciones
% .model = formula del modelo segun R
% 'rt ~ BETA'
% .command = comando a utilizar
% 'lme' line... |
fead9452c380ec93b570ca4ce993d37460f94d3add356867406173f738eb3513 | MATLAB | 13,649 | 461 | function COR = modelr_new(COR,cfg)
% <*LAN)<]
% v.0.2.3 devel
%
%
%
% Realiza modelos usando R
% COR estructura de datos
% .cfg configuraciones
% .model = formula del modelo segun R
% 'rt ~ BETA'
% .command = comando a utilizar
% 'lme' line... |
a64d0a2633ffd03a1088e011ca4b770701e53c8a9891b2838eaa929b833a7400 | MATLAB | 13,652 | 324 | clear; clc;
% This analysis script can be used to run connectome-based predictive
% modelling with leave-site-out cross-validation
% NOTE: Every site included in analysis must contain participants (e.g. if
% you choose to include only a subset of participants, then you must ensure
% particpants from each subset are in... |
2f1b03469308e50db57f3ce2b74699cecaeaed0869ec6478251a68edb641f6bf | MATLAB | 13,653 | 554 |
% method that is called to load files
function loadFile(self,src,~)
if self.verbosity > 9
disp(mfilename)
end
if ~isempty(self.handles)
if isfield(self.handles,'main_fig')
set(self.handles.main_fig, 'pointer', 'watch')
drawnow
end
end
channel = self.channel_to_work_with;
% are we ... |
0beced4f6b0cd3bea2a2575eb2a51a63c456dee7c93126001800fd56b8b57240 | MATLAB | 13,676 | 335 | classdef ilastikDetectorMultiSurf < surfaceDetection.surfaceDetector
% Segmentation based on prediction maps from ilastik.
%
%
% options: channel : channel of the stack to use
% ssfactor : sub-sampling factor used in the ilastik
% classifier.
% thresh : thre... |
3f9ee56a82e3ead8d054e26c4d07a41c72f99a579f61b79be4caf0dea929d79f | MATLAB | 13,701 | 304 |
fSiz = 15 ;
% ModularBeh.factors contains behavioral factors preprocessed after boxcox correction
% Here, we also normalize the factors between 1 and 100
ModularBeh.factorsNorm = normalize ( ModularBeh.factors , 'range' , [1 100] ) ;
ModularBeh.factorsLong = repmat ( ModularBeh.factorsNorm, NumRest , 1 ) ;
NumFa... |
69254fbcf18d8387b3f535b3863019ee55b15fbb7163e2b69e9ba729c55d1205 | MATLAB | 13,706 | 403 | if ~exist('rosette_calibration', 'var')
rosette_calibration = 0;
end;
if (rosette_calibration)
% Guesses for the intrinsic parameters.
fg = [ 2300.044453320904 2304.757690230091 ]';
cg = [924.743157649778 1282.463968890109 ]';
kg = [-0.443251898487364 0.247922214991804 -0.000682045390384 0... |
27a9b8e8c4ffb8c9b08a3f05fbc9c701af5726724fb946cb2288a7b0a3742cc3 | MATLAB | 13,707 | 358 | %% Overview
%
% Our preprocessing will take place within a specified analysis directory and
% will process data using three sub-directories.
% raw_data - containing the fif files (after Maxfilter SSS has been applied)
% spm_sss - contains a the raw data imported into an SPM object with minimal processing (artefact chan... |
1baeea81b4cab99a5c4c13f6cb9ba46adeb74ec82add14935098c1fb5259d415 | MATLAB | 13,714 | 466 | % run_paper_nov27.m
% producing four figures for the final paper data
% see rough-params.xlsx for more param details
% clear workspace
clear;
% define the number of runs for each parameter
runs = 1:5;
% define static params
dt = 0.01;
ttot = 1000;
% define data directory
save_dir = fullfile('paper_data2');
[~, ~, ... |
788db09745bb2f1e72d17fc38ba9bebbdf26f0d33f18c8a9128957a564900f25 | MATLAB | 13,720 | 346 | classdef planarIlastikDetector < surfaceDetection.surfaceDetector
% Segmentation based on prediction maps from ilastik.
%
%
% options: channel : channel of the stack to use
% sigma : width of the Gaussian
% ssfactor : sub-sampling factor used in the ilastik
% ... |
a3b71d1d4dddde58737575100650bd4bf6ae8fdb7b91d34730464395fa433345 | MATLAB | 13,727 | 378 | % plot_Figure5
% Plot behavioral correlations based on Ariel's calculations
%% Load data
% medA = load(fullfile(saveLoc, 'for_plots_mediation_norm_to_se'));
% medA = load(fullfile(saveLoc, 'for_plots_mediation_norm_to_se_test'));
medA = load(fullfile(saveLoc, 'for_plots_mediation_norm_to_se_MinCI_BL'));
% n... |
a2b0b6981adb06908ad9a3d2f93f01b97c01b4c5e7527fccaa83a0218f3528af | MATLAB | 13,744 | 262 | % This script inverts the FHN model for the given fluorescence trace using
% CaBBI method: [ Rahmati. et al. 2016, PLoS Comput Biol 12(2) ]
%
% To user:
% I) in Step 1, determine the directory to the fluorescence trace (a real row vector);
% as default the code will download and use our published data for CaBBI
% I... |
6a8079e9ba2d3aebe1970a98dac54ed99bec8fbcf4c0751188d161cb5b3f54d6 | MATLAB | 13,757 | 365 | classdef RegionOfInterest < handle_light
% Define Cartesian coordinate system and coordinate ranges in 3d, this
% is used in PointCloud to define a transformation between the
% frame of detected points and the raw data
%
% ROI.translation, rotation take the basis (and origin) into the
% stack c... |
b3e42ce8ab59c6d0b697469b9b13de6bc0cd3dee8a905b2cb51932ca37a84f2b | MATLAB | 13,760 | 310 | function NMJ_BoutonRegion_Selector(StackSaveName,BoutonSelectionDisplayImage, AllBoutonsRegion1)
OS=computer;
if strcmp(OS,'MACI64')
dc='/';
else
dc='\';
end
pwd;
currentFolder = pwd;
[upperPath, deepestFolder] = fileparts(currentFolder);
[ret, compName] = system('hostnam... |
9b3bfe30b9d793f5da0d8badf43ad8f6dc5ff0a8f88c50d26896640b4360249d | MATLAB | 13,764 | 314 | function SleepState = SleepScoreMaster(basePath,varargin)
%SleepScoreMaster(basePath,<options>)
%This is the master function for sleep state scoring.
%
%It's strongly recommended that you
% 1) indicate bad (noisy) channels using bz_getSessionInfo(basePath,'editGUI',true)
% before running SleepScoreMaster.
% 2... |
c9ec23ceae69b642a3d9c8dfc5469aaec9f30b2774b94aa12ab8329f4b3d5ff8 | MATLAB | 13,768 | 289 | function [b_OLS_brain, t_OLS_brain, TF_ForContrast_brain, r_OLS_brain, Header, SSE_OLS_brain, Cohen_f2_brain] = y_GroupAnalysis_Image(DependentVolume,Predictor,OutputName,MaskFile,CovVolume,Contrast,TF_Flag,IsOutputResidual,Header)
% function [b_OLS_brain, t_OLS_brain, TF_ForContrast_brain, r_OLS_brain, Header, SSE_OL... |
826af99bb737aa984db6b0933f18b149cae6cf9cc65ce6fcc947741d5a118bb5 | MATLAB | 13,776 | 429 | classdef PlayAudio < handle
%
% Class for playing and visualizing audio files
%
% Brian Moore
% brimoor@umich.edu
%
% November 10, 2016
%
%
% Private constants
%
properties (GetAccess = private, Constant = true)
% Audio
FPS = 15; % Graphics playback, frames/sec
... |
d29e261912bae28d299c5ada5dbb59065b2659f8d07a8a327fa702cff3806822 | MATLAB | 13,784 | 365 | %% Analyze the JS single-day W-track decodes
% exptAnalysisPlaceFields.m
%
% Outline of script from exptAnalysisSwrSpiking.m
%
% Runs through all animals
myPlotSettings
%% Set up for analysis
addpath(fullfile("..", "src"))
Config = utils.setConfig;
animalprefixArray = Config.animalPrefixes;
dataDir = Config.exptData... |
4407a802dea955b282652851e9433a6841f833ba5ce109ae6fbafd62057f68e6 | MATLAB | 13,799 | 313 | function [coord_snapped] = warp_dykstra2012(cfg, elec, surf)
% WARP_DYKSTRA2012 projects the ECoG grid / strip onto a cortex hull
% using the algorithm described in Dykstra et al. (2012, Neuroimage) in
% which the distance from original positions and the deformation of the
% grid are minimized. This function relies ... |
fdf1f57bdeb9c66702c9d6d8b120a8dfec3ca344e647bfd5f66e38f8ad2a33de | MATLAB | 13,810 | 203 | function [warped] = ft_warp_apply(M, input, method, tol)
% FT_WARP_APPLY performs a 3D linear or nonlinear transformation on the input
% coordinates, similar to those in AIR. You can find technical documentation
% on warping in general at http://air.bmap.ucla.edu/AIR5
%
% Use as
% [warped] = ft_warp_apply(M, input, ... |
e7dbc24380edd44550567081be97daaf6ad74d398eed98562da356cd072f0e03 | MATLAB | 13,819 | 203 | function [warped] = ft_warp_apply(M, input, method, tol)
% FT_WARP_APPLY performs a 3D linear or nonlinear transformation on the input
% coordinates, similar to those in AIR 3.08. You can find technical
% documentation on warping in general at http://bishopw.loni.ucla.edu/AIR3
%
% Use as
% [warped] = ft_warp_apply(M... |
73b9f2a30c3f09f88f41061b8888106bd43cd991b3a196d7f0b68cd5c8cbd47a | MATLAB | 13,848 | 381 | function [wbest,hbest,normbest] = nnmf(a,k,varargin)
%NNMF Non-negative matrix factorization.
% [W,H] = NNMF(A,K) factors the N-by-M matrix A into non-negative factors
% W (N-by-K) and H (K-by-M). The result is not an exact factorization,
% but W*H is a lower-rank approximation to the original matrix A. The... |
34dac417a9322115581625cce8907d4103a1aed64dad042ee7b0fd894146cdce | MATLAB | 13,856 | 238 | %% RELAX EEG CLEANING PIPELINE, Copyright (C) (2024) Aron Hill & Neil Bailey
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% any later... |
ebf6f4ab04daae0f8ccfc8937d48450b8cc4dfe2412f566704881bccd23b961c | MATLAB | 13,860 | 334 |
clear
close all hidden
clc
IdProcedure = 99 ;
% load best clustering
load('PipeC_Id99_Out_Consensus_Ncycles100_Dim2_epochs200.mat')
load('C:\Users\Hp\Desktop\PostDoc2023\ResearchTopic_BRAINBEHAVIOR_Frontiers\BrainGame_Reloaded\BrainGame_2024\RealData_MultiRest\RESULTS_DEFINITIVI\PipeB_Id99_Out_Parametrizati... |
fd979a177110218de7c5c9e229bb60bf1b298c33cb351fa6301cdbf6f75f565f | MATLAB | 13,860 | 406 | function nuisance_cov_estimates(X, images, SETUP, varargin)
% Estimates F-map for model parameters of interest
% Writes to disk:
% 'F_cols_of_interest.img' 'p_cols_of_interest.img' (3-D images)
% 'resid_full_model.img' (a 4-D image)
%
% Locates voxels whose activity is unrelated to the model
%
% Extracts principal comp... |
729d3d4029c9d1af61e0b3933229640c30074132e8a3c1c6469ac5b99d2f7d4b | MATLAB | 13,865 | 389 | function [np_info] = np_read_splitted_fileinfo (filename, option)
%
% function [np_info] = np_read_splitted_fileinfo (filename, option)
%
% This function is necessary for np_readfileinfo.m.
%
% eldith GmbH
% Gustav-Kirchhoff-Str. 5
% D-98693 Ilmenau
% Germany
% 02.02.2005
% ------------------------------------------... |
32ba8b11a347f109104e88870bae548204cc865a8bef86940ef1ed49391825bb | MATLAB | 13,879 | 359 | function dataOut=fcBx_Chi_McNemar_TwoGroups(fc,Bx,IM,params)
% Perform the correlation analysis (type = {Pearson, Spearman}),
% and enrichment analyses using Chi-square and Hypergeometric stats.
% fc is the Fisher-z fc-data; Nseeds-Nseeds-Nsubj
% Bx is the behavior data; Nsubj
% IM is the ROI-to-module key.
% ... |
f903304906df64ce7f00f6fa3e7a963d8a60c822d08340362639b543878caf34 | MATLAB | 13,879 | 350 | function A = behaviorData( action, fName, nFrame1 )
% Retrieve and manipulate behavior annotation of a video.
%
% Overview: A behavior annotation assigns every frame of a video to one of
% k behaviors. Each consecutive set of frames is a single behavior
% instance, the video is divided into n such behavior instances ea... |
6bb97b1595d62b690edab606460fc70687850b71e99524136aaf54f711b7b495 | MATLAB | 13,885 | 356 | function [x, cost, info, options] = barzilaiborwein(problem, x, options)
% Riemannian Barzilai-Borwein solver with non-monotone line-search.
%
% function [x, cost, info, options] = barzilaiborwein(problem)
% function [x, cost, info, options] = barzilaiborwein(problem, x0)
% function [x, cost, info, options] = barz... |
9e93e49b578169d7b93c8e48d41c93e2aa66b041e4a49bf559e38ef3b201d2e5 | MATLAB | 13,887 | 322 | %{
Copyright (c) 2025 Axion BioSystems, Inc.
Contact: support@axion-biosystems.com
All Rights Reserved
%}
classdef PlateTypes
%PlateTypes finds dimentions for known plate types
% This class has to be modified every time a new plate type is added
% to AxIS
properties(Constant, Access=pub... |
cb49f61e343fddc5fbcb02e8dd1d4264b2df69027e6e853701a91c1cc3f47725 | MATLAB | 13,892 | 441 | function A = teneye(M,N)
%TENEYE Create identity tensor of specified size.
%
% We say E is the "identity tensor" if TTSV(E,X,-1) = X for all X such
% that NORM(X) = 1.
%
% TENEYE(M,N) returns a (dense) identity tensor of order M and size N.
% The identity tensor only exists when M is even and returns an error
%... |
0cb6a71142518e5fade48c0df3b6b844a491da7f7f07afca8c48d8c6410dd7bd | MATLAB | 13,921 | 253 | function [ExportFig,ExportFigAxes]=Trace_Plotter(FigName,TraceDir,TraceData,TraceInfo,Highlights,HorzScaleBuffer,VertScaleBuffer,TraceFigSize,ExportOption)
fprintf(['Exporting: ',FigName,'...'])
warningstatus=warning;
warning off
NumRows=size(TraceData,1);
if ~isfield(TraceInfo,'PlotRange... |
95314c8a8a9de40c3928b96a237f7912fea3f34215c9c1634b57bed847a812bf | MATLAB | 13,924 | 388 | function params = metamerAnalysisColor(oim,m,opts)
%
%-----------------------------------------
% params = metamerAnalysis(oim,m,opts)
%
% computes statistical parameters of an image
% within a family of overlapping, tiling
% regions defined by windows
% (see metamerParams.m and metamerSynthesis.m)
%
% oim: original i... |
0bdf977332a3345ceef203f12ac224a317546762aa4a0a46a2e61eaef7805f64 | MATLAB | 13,933 | 357 | classdef PreProcDB < handle
% Preprocessed DB for DL
%
% We are forking this off the CPR/old .preProcData stuff in Labeler b/c:
% 1) of rotated cache needs (potentially an imposition on CPR, and
% ideally we don't touch CPR for now)
% 1a) existing diffs in preproc pipelines for CPR and DL will probably
... |
108d1069b566d313142e6d28c1baea2bc687e82540fa5dcf194ee01246bac066 | MATLAB | 13,936 | 380 | % Plot the prediction performance of the communication subspace as a
% function of the difference in PR in Sender and Receiver, as well as other
% related plots concerning interplay between E/I balance destabilization,
% size of disc radius from which neurons are sampled, prediction
% performance and dimensionality of ... |
425da98d6beaa3990e33c77129e6a00209c3062164edfb4cbff29571b768a85b | MATLAB | 13,936 | 433 | function [options] = VBA_initDisplay(options,priors)
% initialize VBA graphical output display
% function [options] = VBA_initDisplay(options,priors)
% This function is typically called when initializing VBA's graphical
% output display (e.g., at the begining of VBA inversion if
% options.DisplayWin=1). In this case, a... |
73113f4e1954e84831861ec5e6d061f9ac6ade29cc1d67cc75b423e9d690baac | MATLAB | 13,947 | 380 | function edited = SpectrogramSettings(spectrogramPanel, varargin)
handles.spectrogramPanel = spectrogramPanel;
handles.figure = dialog(...
'Units', 'points', ...
'Name', 'Spectrogram Settings', ...
'Position', [100, 100, 350, 325], ...
'Visible', 'off', ...
'WindowKe... |
38747e14c84222fee02f3ee516b7407b0c4996262a4f2b183128e16ee073c2eb | MATLAB | 13,950 | 333 | function modelParam = initialize_parameters(paramSet, simParam, varargin)
% initialize_parameters.m
%
% Creates the baseline parameter structure, then original parameters are
% optionally overridden based on paramSet.
%
% Input:
% paramSet: String choice of parameter set {'default', '7_22', or '10_18'}
% simParam: ... |
d4ac5a4bb4e541449c149669692cf0e8b38ec6e86bfd4126694ce15de5669799 | MATLAB | 13,950 | 482 | function [varargout] = ft_notification(varargin)
% FT_NOTIFICATION works mostly like the WARNING and ERROR commands in MATLAB and
% is called by FT_ERROR, FT_WARNING, FT_NOTICE, FT_INFO, FT_DEBUG. Note that you
% should not call this function directly.
%
% Some examples:
% ft_info on
% ft_info on msgId
% ft_info of... |
08e5eb15e92945b65d370602bee1c0cc08738f37c69046a6f8c6a4bd4a96d89e | MATLAB | 13,953 | 489 | clear
clc
% f = gcf;
% exportgraphics(f,'Fig1_Original.png','Resolution',600)
MotionData = load('MotionData.mat');
MusculoskeletalData = load('MusculoskeletalData.mat');
%% Motion Data
MotionData = MotionData.MotionData;
% Joint Angles
SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180);
ELBa = MotionData.Ge... |
baf99495f48da2922d2787ce315d2d59986aa841ac8b78682808aba2bfc12b70 | MATLAB | 13,955 | 250 | function [BH, H, FFN] = readIBWheaders(FFN);
% readIBWheaders - read BinHeader & WaveHeader segments of Igor IBW file
% [BH, WH, FFN] = readIBWheaders('foo') reads BinHeader & WaveHeader of
% file Foo.ibw - Versions 2 and 5 only. FFN is full filename.
% % 1 byte char
% % 2 bytes short
% % 4 bytes int, long, ... |
a4a0af83b74a650f789838629d520ba36ffe516c22c8ab674f29cf0f9a991a79 | MATLAB | 13,965 | 489 | clear
clc
% f = gcf;
% exportgraphics(f,'Fig1_Original.png','Resolution',600)
MotionData = load('MotionData.mat');
MusculoskeletalData = load('MusculoskeletalData.mat');
%% Motion Data
MotionData = MotionData.MotionData;
% Joint Angles
SHLa = MotionData.GenericCat.Angles.AngShou.Total*(pi/180);
ELBa = MotionData.Ge... |
fa0274c516e249b37979e26139bd92685d0ef213b455352bef65c1deff70b40f | MATLAB | 13,966 | 450 | classdef LabelCoreModel < handle
% Labeling model base class
%
% Owns labeling state: current coordinates, occluded/selected flags,
% and the labeling state machine. Communicates state changes to
% controllers via obj.notify_() events. Does not own any graphics handles.
%
% This is the model half of the LabelCore MVC s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.