sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
540de5167304f8d03a5aed50b8bb9b182f41cc300e4475d3cba67bdef374751e | MATLAB | 2,504 | 73 | function TR_OverlayDisplay(app, displayH)
% Loop through all records of a group. Set start point as (0,0)
% Plot all paths, each in a different color
% Note that TREX X,Y is in cm!
MarkerSize = 10;
% Ttotal = Param.Ttotal; % total duration (sec)
dT = app.Experiment.Specs.Display.Parameters.dT; % interval between di... |
c33920041ee8c87d6132eaf2d1b78c76e7e21e8c11db704ed7ff7ee221f4737e | MATLAB | 2,505 | 83 | % mglTestStencil
%
% $Id: mglTestStencil.m 380 2008-12-31 04:39:55Z justin $
% usage: mglTestStencil(screenNumber)
% by: justin gardner
% date: 05/26/2006
% copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING)
% purpose: test stencils
%
% e.g.:
%
function mg... |
332dcc03881a3a08b3460dd75c44af54edfce9b193fd3a43d1ce430921496c4b | MATLAB | 2,507 | 81 | % getParameterTrace.m
%
% usage: getParameterTrace(myscreen,task,varname,[usenum],[segnum])
% by: justin gardner
% date: 02/05/07
% purpose: creates a parameter trace from a saved
% myscreen variable
% e.g.: myscreen.traces(task.myParameter1Trace,:) = getParameterTrace(myscreen,t... |
60f7cb5602f779cdf1549845fc5ff9a2de395c9d3303bbaab7118554fb408ff6 | MATLAB | 2,508 | 67 | %----FUNCTION:
% extract statistical color histogram using integral histogram(RGB, HSV, LAB, Opponent color space)
function [colorArr] = sp_find_colorHist_grid(chns, grid_x, grid_y, patch_size)
nPatch = numel(grid_x);
colorArr.RGBHist = zeros(nPatch, chns.nRGBHist);
colorArr.LABHist = zeros(nPatch, chns.nLABHi... |
2a23593aee79e20475d46ec4df012f52f9a4ff2767c813c7b348e534b169d468 | MATLAB | 2,510 | 100 | %{
For the mean ROI fMRI timeseries for each run and each participant, conduct
LEiDA. Adapts code from:
https://github.com/juanitacabral/LEiDA
Output:
LE_dFC.h5 Phase dFC(t) and LE(t) for all time points.
%}
%Define command line arguments.
function [] = LE_dFC(run,subject)
%run = run_label
%subject = subject_ID
dis... |
33e5dd87724c605e2d3e77f36c6581c719fc834c3f99b617958456f4a0d6c79e | MATLAB | 2,510 | 97 | function [clusinfo, sp, emptyclus] = RemovingEmptyClusters(clusinfo,sp)
%% Due to merging/ splitting etc. there are empty clusters. Remove these
% Convert sp data accordingly
% Initialize new vectors
nclus = length(clusinfo.cluster_id);
temps = nan(nclus,size(sp.temps,2),size(sp.temps,3));
pcFeatInd = nan(nclus,siz... |
7654d7349850e9461f0ccf8d89bc8dd39dee541d96f700d5eba39ff8d1e9ae94 | MATLAB | 2,511 | 68 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
function [R, success] = compute_normal_bfo90_table(PerCell, BFO90_FILTER_MIN_MAPS, BFO90_FILTER_MIN_TRIAL_CORRELATION)
BFO90_ROTATIONS_TO_CHECK = [0, 90, 180, 270];
fieldSets = helper_load_bfo90_fieldsets_to_record();
... |
be82bf961e7e770ee7bae0112c20ddf202142e18c5948c1f6da3d2d9ffb887ac | MATLAB | 2,511 | 84 | function [meg] = read_ctf_dat(filename);
% READ_CTF_DAT reads MEG data from an ascii format CTF file
%
% meg = read_ctf_dat(filename)
%
% returns a structure with the following fields:
% meg.data Nchans x Ntime
% meg.time 1xNtime in miliseconds
% meg.trigger 1xNtime with trigger values
% meg... |
d27e73ba2a6185d64df7f5f4e8452b370e5de9384c3d3334df1b73af1412d60f | MATLAB | 2,511 | 79 | % visstimEphys.m
%
% Trial Type Function
% Presents visual stimuli on G3 panels. Records electrophysiology data. No
% current/voltage injection
%
% INPUTS:
% settings - struct of ephys setup settings, from ephysSettings()
% duration - duration of trial, in seconds
%
% OUTPUTS:
% rawData - raw data measured by D... |
959f3425611487cb7f810469b329e882a66a69411216e20d0c4b4ad2367cdf10 | MATLAB | 2,512 | 62 | function Vtear = teardrop_poj(V, varargin)
% Vtear = teardrop_poj(V)
%
% Project a series of points on a sphere to points on a tear-drop shape.
% The projection for each point is given by
%
% [cos(\phi)sin(\theta)sin^m(\theta/2)]
% Vtear = [sin(\phi)sin(\theta)sin^m(\theta/2)]
% [cos(\theta)... |
d152b70ccd04b50117ba1262f32d1077f09a73099e044501b371588c78101f34 | MATLAB | 2,512 | 103 | function spectrsum(DATA,fpath)
% SPECTRSUM -
%
%
% Synopsis:
%
% Description:
%
% Examples:
%
% See also:
%
% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskanen@uku.fi>
%
% Department of Physics, Department of Neurobiology
% University of Kuopio, FINLAND
%
% This program may be used under the terms of t... |
929595cbae6888730675eb2f2ec28179da5d966cd72c9f628eecfdc5a7fe41d5 | MATLAB | 2,513 | 58 | %% Generate null distribution by permuting the time series data and re-calculating the difference of influence term
%% Parameters
num_permutations = 1000;
ntrials = 1; % number of trials
nobs = 706; % number of observations per trial
regmode = 'LWR'; % VAR model estimation regression mode ('OLS', 'LWR'... |
a9cc57a8cd29498fa137fa0b0e1a6964df479227ba8cd3902dbe3205102bff85 | MATLAB | 2,514 | 65 | function [] = plot_worm_frame(I, center_lines, centerline_color, UncertainTips, centerline_stimulus, debugimage, additional_text)
% IWFig = findobj('Tag', ['IWFig', num2str(plotting_index)]);
% if isempty(IWFig)
% IWFig = figure('Tag', ['IWFig', num2str(plotting_index)]);
% else
% figure(IWF... |
f69b6437e6495f7cd58e3fd79678b0bacf29e73291c8e686f6bc1eb1937d550f | MATLAB | 2,514 | 89 | function [swf] = read_besa_swf(filename)
% READ_BESA_SWF
%
% Use as
% [swf] = read_besa_swf(filename)
%
% This will return a structure with the header information in
% swf.label cell array with labels
% swf.data data matrix, Nchan X Npnts
% swf.npnt
% swf.tsb
% swf.di
% swf.sb
% Copyright (C) 2... |
5c8ca7353d2198ed5e039679d1810fb755596021a277020388c3ff0af4571ea5 | MATLAB | 2,515 | 82 | function [data_corr_rs] = corr_MAwavelet(data)
% CORR_MAWAVELET
% This function corrects the motion artifacts with a wavelet function. This
% is an adapted version of the Homer 3 function:
% hmrR_MotionCorrectWavelet. It first downsamples the data to 10 Hz to
% fasten the processing and then reupsamples it to 60 Hz.
%
... |
197514bcdc2595d0f3d992bfc672acc8402252f3ae91ac82118ba6e6553d0cda | MATLAB | 2,516 | 71 | function cvLBF_meta_batch(stud_dir, subj_file, MS_file, mod_vec, LME_img, LBF_name)
% _
% cvLBF meta batch for analysis of the FADE data set
% stud_dir - study directory in data/analyses are located
% subj_file - an XLS file containing subject IDs and covariates
% MS_file - a MAT file containg model spa... |
b41308899d5b67e10a30194f9ac893b619d7bf4d8e88cd3df73b004e6ec1adda | MATLAB | 2,516 | 77 | % readNTFlyWire.m
%
% Function to read neurotransmitter text file created using
% getNTpredFlywire.r. Takes in path to folder containing all NT text files
% and neuron ID and returns number of output synapses, predicted NT, and
% the percentage of synapses predicted for the 6 NT types (ACh, Glu, GABA,
% octopamine,... |
bdb5aad58d8c2f09aa5114a468be9b4fa5e812368182f2245b9fe22a65249c22 | MATLAB | 2,516 | 84 | % mglTestStencil
%
% $Id: mglTestStencil.m 380 2008-12-31 04:39:55Z justin $
% usage: mglTestStencil(screenNumber)
% by: justin gardner
% date: 05/26/2006
% copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING)
% purpose: test stencils
%
% e.g.:
%
function mg... |
28f9bd5e9a48df0f65498b7452e7eb031384e9fb5916daa8edf972cdbbb320ea | MATLAB | 2,518 | 79 | %% Set up and perform Monte Carlo simulation of diffusion in randomly positioned, randomly oriented sticks
clear
restoredefaultpath
filePath = matlab.desktop.editor.getActiveFilename;
root0 = fileparts(filePath);
addpath(genpath(fullfile(root0,'lib')));
root = fullfile(root0,'data');
%% Generate geometry
rs = randstic... |
c68f961d9f770e5683fd00a2cc87135a1a45c5d3d98ea5a6d4578abbbd7131df | MATLAB | 2,518 | 56 | %% This is the improved loader for an experiment.
% It allows us to associate the information such as digs, contexts,
% and whether or not to skip a particular trials dataset (for instances
% such as corruption, or that we have darkframes, etc.
%sessionsRecordingParentFolder = pwd;
%sessionsAnalysisParentFolder = f... |
5c42a243e573783cc07a83780087ea9a69537c085cc4b0130ce2311a8a04c944 | MATLAB | 2,519 | 69 | % VL_SIFT Scale-Invariant Feature Transform
% F = VL_SIFT(I) computes the SIFT frames [1] (keypoints) F of the
% image I. I is a gray-scale image in single precision. Each column
% of F is a feature frame and has the format [X;Y;S;TH], where X,Y
% is the (fractional) center of the frame, S is the scale and TH ... |
a1d4c3d8ed0334c8d04ee96690f43eeab76f623a0a107f32ca7b7a1391971794 | MATLAB | 2,519 | 85 | function [] = plotModule(probe)
%PLOTMODULE Plot the module in a figure
% Plots the perimeter of the defined module. If no optodes are defined,
% only the perimeter is plotted, else, the optodes are also plotted.
module = probe.module;
hold on
% Plot the perimeter
first_xycoor = module.perimeter(1,:); % Add t... |
b4389ac70940d3f63fc766bfb18deff81e648a041c03137ec263b3c4c2ce784f | MATLAB | 2,519 | 65 | % groupStepParamsBySwingStance.m
%
% Function that takes in step parameter, swing/stance calls, whether to
% return swing/stance and returns parameter only for that type of leg
% movement
%
% INPUTS:
% stepParam - step parameter values for each half step, as n x 1, 2, or 3
% matrix
% stepSwingStance - swing... |
9065103b2f858b88b2692454e3cb4ceec442c4a7e78a4994e0cfc9f4a23bb572 | MATLAB | 2,521 | 68 | %VL_KMEANS Cluster data using k-means
% [C, A] = VL_KMEANS(X, NUMCENTERS) clusters the columns of the
% matrix X in NUMCENTERS centers C using k-means. X may be either
% SINGLE or DOUBLE. C has the same number of rows of X and NUMCENTER
% columns, with one column per center. A is a UINT32 row vector
% specif... |
f8a04a70bf114ece372d702800a3705422e233880dabd434f764e57183eaaadc | MATLAB | 2,521 | 63 | % Vl_GMM Learn a Gaussian Mixture Model using EM
% [MEANS, COVARIANCES, PRIORS] = VL_GMM(X, NUMCLUSTERS) fits a GMM with
% NUMCLUSTERS components to the data X. Each column of X represent a
% sample point. X may be either SINGLE or DOUBLE. MEANS, COVARIANCES, and
% PRIORS are respectively the means, the diagon... |
66e515ef6947a2e51c76bb7656c6485582300261a7f7048662b738a360e82408 | MATLAB | 2,522 | 96 | function TR=SubdivideSphericalMesh(TR,k,opt)
% Subdivide triangular/quadrilateral mesh representing the surface of a
% unit sphere k times using triangular/quadrilateral quadrisection (see
% function 'TriQuad'/'QuadQuad' for more info).
%
% INPUT ARGUMENTS:
% - TR : input mesh. TR must be specified as a TriRep obj... |
ec4e99f6f909bb17a902e55fb4f820d6e19758464d81f8bf5dbaa71614ed2ed2 | MATLAB | 2,523 | 111 | function [a, b] = isintent(this,intent)
% Correspondance between fieldnames and NIfTI intent codes
% FORMAT ind = isintent(this,intent)
% this - GIfTI object
% intent - fieldnames
% a - indices of found intent(s)
% b - indices of dataarrays of found intent(s)
%_______________________________________... |
c395475cf2818d2f9ffb0c17b4f4a4e358b5d6b98bc21b88a5e4970e2c903696 | MATLAB | 2,525 | 75 | function [signalData,signalAmps,signalIndecies] = findTemplatesFromData(...
signalData,yData,signalAmps,numPerDataSet,parameters,signalIndecies)
%findTemplatesFromData finds the training set contributions
%from a single file (called by runEmbeddingSubSampling.m)
if nargin < 6
sign... |
e3bbec72924338e7edab345b36397578f1fa1282fdb250e0ee3f6bb2a1b6ed09 | MATLAB | 2,525 | 58 | %% Function to create randomized groups by mixing patients with different
%% diagnoses or group membership
% Copyright (C) 2023 University of Seville
% Written by Natalia García San Martín (ngarcia1@us.es)
% This file is part of Neurobiology Centiles Psychosis toolkit.
%
% Neurobiology Centiles Mapping too... |
131ea25caf488ce7a5efab530877497b82862f80e8dcf41a9901f13164ad4316 | MATLAB | 2,526 | 87 | % this is a script so that the scope is global
% please set the following variables:
% tags,matnames,movienames,annnames,fixedmatnames
% optional:
% DISPLAYAREAS
required = {'tags','matnames','movienames','annnames','fixedmatnames'};
optional = {'DISPLAYAREAS'};
default = {false};
for i = 1:length(required),
if ~ex... |
a67fa7ee8fabbd3dd0beefe1cde501795edff0837c35eb8b099120c987829d9c | MATLAB | 2,528 | 62 | function metaStruct = TDMS_getGroupChanNames(metaStruct)
%TDMS_getGroupChanNames Small function to get group/channel names from paths
%
% metaStruct = TDMS_getGroupChanNames(metaStruct)
%
% INPUT
% =======================================================================
% metaStruct (structure) containing field... |
a4710a026fbac515bd8cd7d5e34acdf4c38ef647c14dc010bc85f5d5784fff2c | MATLAB | 2,530 | 66 | clear;
close all;
clc;
initime = clock;
addpath('funcs');
%% changeable parameter settings
Delta_e_start = 0; % cannot equal to 0
Delta_e_end = 0.5; % can equal to 0.5
Delta_e_steps = 200;
Delta_i_start = 0; % cannot equal to 0
Delta_i_end = 0.05; % can equal to 0.05
Delta_i_steps = 200;
Iattn = 0.03;
alltime = 40... |
f47b7f58b2db98fcd86f6a59c335b4eaf60344bb26987cbe8cd9bda8a8fe4711 | MATLAB | 2,530 | 66 | %% Script to merge regional brain maps of empirical centile/effect sizes
%% with each regional brain map of their respective significant regions and
%% predicted centiles/effect sizes into a single figure
% Copyright (C) 2023 University of Seville
% Written by Natalia García San Martín (ngarcia1@us.es)
% T... |
17274fab246d56b4debdd53a3d751e88161ac456fc2fbd89e5edd57db4365ef5 | MATLAB | 2,531 | 74 | function DLDA_pipeline(stg,prf)
% gets the setting and profile variables and performs DLDA.
%
% DLDA_PIPELINE(STG,PRF) gets the setting STG and profile PRF and performs
% all the necessary steps for direct linear discriminant analysis (DLDA).
%
% Ehsan Kakaei, Jochen Braun 2022
% (https://github.com/cognitiv... |
17be831c36a74af7f973691d33f45a25cb82c7ba594d0612a03cac4c1d9fffd5 | MATLAB | 2,531 | 71 | % mglTestMetalBatch: an automated and/or interactive test for rendering.
%
% usage: mglTestMetalBatch(isInteractive)
% by: Benjamin Heasly
% date: 12 Jan 2024
% copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING)
% purpose: Test multiple flushes, repeated by the Metal app.
% ... |
373529553dea434bda3fa434be02fa458fc399eb08a4c797b37eb4e8205baa9c | MATLAB | 2,531 | 67 | % f_waitmsg.m [As Part of HFO Detection Project]
% Written by:
% Miguel G. Navarrete Mejia
% Electrical Engineering MS candidate
% UNIVERSIDAD DE LOS ANDES
% Colombia, 2012
% mnavarretem@gmail.com
function st_handle = f_waitmsg(varargin)
switch nargin
case 0
pstr_String = [];
st_hand... |
1ae2d2cd9ec9deea75f77441f32e57b5748f8e8dd1d1b357f030f3da8b824360 | MATLAB | 2,533 | 77 | function [fig] = specStatQuad(xcData,sData,rData,quadopt)
oti = optCheck(quadopt,'oti','acf + original, corrected PSDs',[]);
XL = optCheck(quadopt,'XL',[0 500],[]);
XTdt = optCheck(quadopt,'XTdt',50,[]);
axftsz = optCheck(quadopt,'axftsz',[],[]);
figopt.axftsz = axftsz;
lw = optCheck(quadopt,'... |
3bd9cd48500f797e56a3d03d72c3ec02e8402f67db360498fa6344bb11ff449a | MATLAB | 2,534 | 74 | function [dat] = ft_preproc_hilbert(dat, option)
% FT_PREPROC_HILBERT computes the Hilbert transpose of the data and optionally
% performs post-processing on the complex representation, e.g. the absolute
% value of the Hilbert transform of a band-pass filtered signal corresponds
% with the amplitude envelope.
%
% Use ... |
af8e558e2985314a27ec5e5cb60437ad2dc59f51b82019c44af1c08aa6f78083 | MATLAB | 2,534 | 68 | %%Loading files with binned neural activity for 7 stimuli used to select
%%face neurons (AllTrialsBins7Stim.mat). Also load the file with the result of the face-neuron
%%selection (FNAnovaAllreal1000.mat)
clearvars
load("AllTrialsBins7Stim.mat")
load('FNAnovaAllreal1000.mat')
FNposCells.UnitID = strcat(FNpo... |
66bfca1a6ec8a55db7234eba8c269e9c8f3397ba2b9fecc19c39ea39351fe79b | MATLAB | 2,541 | 70 | function x = calc_FD(prefix,brain_radius_in_mm)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% VERSION: SPI April 10th 2014, commented by Eric Earl 9/8/2015
%
% INPUTS:
% prefix is the directory and file name of ... |
9e7ffab271a91384ef2819418b59eaa9cd373e2b41df4164c4be7ed17b5267f8 | MATLAB | 2,543 | 80 | function [hdr] = neuralynx_getheader(filename)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SUBFUNCTION for reading the 16384 byte header from any Neuralynx file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 2007, Robert Oostenve... |
f26193877d15044c45564bb8b2137ca1544b616e930af1dca80e19c8f17dfe32 | MATLAB | 2,543 | 66 | % mglSetScreenParams.m
%
% $Id:$
% usage: mglSetScreenParams(screenParams)
% by: justin gardner
% date: 07/17/09
% purpose: Save screen params structure. This will get saved
% by default into the file ~/.mglScreenParams.mat
% you can reset the location where this i... |
d14d8d9b1807c413bf13ce5cc6374d8a2ebadba90bfc21481abf19359a3a41d0 | MATLAB | 2,546 | 91 | % Function File: [slope, intervals, P] = edge (x, y, L, U)
%
% Calculates the x and y intervals and slope of an edge between
% the fractional lower and upper limits of y, which are referenced
% to the first and final points of the y vector. Therefore, the
% input must represent monotonically in... |
eba0bc7c026b2a9919ee796cf852a3d5bbbcfec45c8481c312f9ba90130d1890 | MATLAB | 2,547 | 95 | function [] = ExtDataFig06_AveImgEachStim()
% Code for plotting the images for the difference in F between pre- and during-stimulation in Extended Data Fig. 6f,g.
%% parameters
GT = 'dPR1_nsyb'; % Extended Data Fig. 6f
% GT = 'TN1A_nsyb'; % Extended Data Fig. 6g
TargetStim = [1:6];
zVentral = [1:15];
zDorsal = [16:3... |
ade8ac087e21b3f8b909aa468ca48109ad11e8bd04c1db8573c5dbe6aa57ea4a | MATLAB | 2,548 | 69 | %2022-01-04. This function is called after the DLC python scripts have
%already made the behavCam#DLC_resetnet50_*.h5 files in the recordings_sep
%folders.
% Written for CMG129_CA1 session 4 because I couldn't find the other
% script!!!
close all
clear all
clc
config = mulana_json_read(fullfile('R:\chengs_task_2c\co... |
f3b67754c63b8df8dde640bdf011b0dc2eb73e29ab045eda5824dcaf49e2d022 | MATLAB | 2,549 | 81 | % testUserDAQ.m
%
% Very basic script to test input and output from User DAQ to coordinate
% experiment
%
% Created: 7/21/18
% Updated: 7/24/18
close all
clearvars
% set up DAQ
daqreset % reset data acquisition toolbox
userDAQ = daq.createSession('ni'); % start new session
devID = 'PXI1Slot5';
% configure session p... |
3019e46015db3212fd63a9bcb8adf086fcbe408fe6c3b84f275f6634bee4ae99 | MATLAB | 2,551 | 79 | function plot_hypnogram(y_trues, y_preds1, y_preds2)
%simple function to plot the hypnogram alone based on the scoringindex
disp('Plotting hypnogram');
timemax=length(y_trues);
figure;
subplot(3,1,1);
axis ([0 timemax+20 0 3])
set(gca,'YTick',[0.5 1.5 2.5])
set(gca,'YTickLabel',{'Wakefulness','NREM','REM'},'F... |
aaa9a6333b820a3d9963c6d9fb75d719d8b407670f12a2e46e323ee998edf99c | MATLAB | 2,551 | 51 | % Get measured data
% [ Yokogawa MEG Reader toolbox for MATLAB ]
%
% brief:
% This function retrieves the measurement data of whole channel by the specified file and sample range.
%
% usage:
% data = getYkgwData(filepath, start_sample, sample_length)
%
% arguments:
% filepath : file path
%
% start_sample... |
79c84d3138ed020b6223f5af0ae7c72f4903331eb6044a2e9c7bce6b9851e660 | MATLAB | 2,552 | 73 | % mglTestLUTAnimation.m
%
% $Id: mglTestLUTAnimation.m 380 2008-12-31 04:39:55Z justin $
% usage: mglTestLUTAnimation(screenNumber)
% by: justin gardner
% date: 05/27/06
% copyright: (c) 2006 Justin Gardner, Jonas Larsson (GPL see mgl/COPYING)
% purpose: do a LUT animation using gammaTable... |
dfd76790106723ce4cfc47efbd2c97fcc53eb00be58a1f6aa41bc7b8067f5d9b | MATLAB | 2,552 | 62 | function st_Handles = p_LoadFigure()
% This function displays an animated gif during the data load. This process is
% based on the information provided by the Yair Altman webpage.
% Staed by Altmans: 'As with other internal Matlab components, ...
% this feature has a “High risk of breaking in a future release“, theref... |
fabb7e0eddda2770c820dd6e901207970d3eb0defb49de32deab5ad474fca64f | MATLAB | 2,552 | 110 | function my_export_fig(varargin)
% my_export_fig
% my_export_fig((f_handle), (savename), (type), (pad))
%
% Make matlab print to the correct size of the figure on the screen
%
% pad can be positive or negative to either increase or decrease the
% whitespace around the figure
%
% type is usually unnecessary (leave empty... |
001a1ec35808e0f21d4a431623adb6544c59c58a88e11e48862f6d195aa7c645 | MATLAB | 2,554 | 81 | function mglEyelinkSetup(displayNumber, targetParams)
% MGLEYELINKSETUP Enters the Eyelink setup mode.
%
% Syntax:
% mglEyelinkSetup
% mglEyelinkSetup(displayNumber)
% mglEyelinkSetup(displayNumber, targetParams)
%
% Description:
% Switch into the EyeLink setup mode (for camera setup, calibration,
% validation, etc.... |
58eb3d79e2c3c5ebe8adf7dae52e2b202ac2e99bcace7a727f92bff877971f8f | MATLAB | 2,554 | 69 | classdef CorrectedImageStack < types.core.NWBDataInterface & types.untyped.GroupClass
% CORRECTEDIMAGESTACK Reuslts from motion correction of an image stack.
% REQUIRED PROPERTIES
properties
corrected; % REQUIRED (ImageSeries) Image stack with frames shifted to the common coordinates.
xy_translation; % REQUIR... |
7e64c2681e5431579a92adf61d3871d2aeddb8a027de0f3f2d6aa7cd4a8bae0b | MATLAB | 2,554 | 63 | function [] = behavior_explorer(curDir)
% displays a GUI to view the timing of behavior annotations
behavior_watershed_index = 15;
%if nargin == 0
%allow user to select directory
curDir = uigetdir
%end
if exist([curDir, '\tracks.mat'], 'file') == 2
load([curDir, '\track... |
e1a12c62a763645b4733490394da0459b28e58f4308e6fe9985a96bd2ba13245 | MATLAB | 2,554 | 71 | % data_ind = 4;
%%
% name of the videos
list_data_names={'blood_vessel_10Hz','PFC4_15Hz','bma22_epm','CaMKII_120_TMT Exposure_5fps'};
list_ID_part = {'_part11', '_part12', '_part21', '_part22'};
data_name = list_data_names{data_ind};
list_Exp_ID = cellfun(@(x) [data_name,x], list_ID_part,'UniformOutput',false);
num_Ex... |
0ae762fc7daff72d33c66ca372d5851d1dd62e26ad578f3e487ddae35b3d0464 | MATLAB | 2,556 | 60 | function SONLoad()
% SONLOAD loads the son32.dll library and defines global constants
%
% Version 32 of the SON library works only under Windows and requires
% version 7 of MATALAB and a copy of CED's son32.dll.
%
% The routines use CEDs son32.dll to provide I/O. This file must be present
% in a 'c:\Spike5' dire... |
4748b5ed77fa884bfeb970bdb3f7bafaabda8552731fc6fb4b38b95b7bd9d16e | MATLAB | 2,557 | 85 | function [acc,left_num,right_num] = FBCSP_SVM(MIEEGData,label,Fs,LowFreq,UpFreq)
% Filter Bank Common Spatial Pattern + Support Vector Machine
% Input:
% MIEEGData:The raw motor imagery data
% label: motor imagery data label, 1 and 2
% Fs: the sampling frequency (in Hz)
% LowFreq: High pass filtering parame... |
59be465b76d53839dcaf1a5483d1412e2150ba295d0dc66ac592cc2a1d2699b6 | MATLAB | 2,557 | 44 | clear
stable=load('stable.mat') ;uncertain=load('uncertain.mat') ;reverse=load('reverse.mat') ;restable=load('restable.mat') ;
for i=1:493
go=[stable.population.goHit.eachDF{i} stable.population.goMiss.eachDF{i}];%cue resposne time
Sgo{i}=(go-mean(go(1:60,:)))./std(go(1:60,:));
goR.stableZ(i,:)=mean(me... |
10cb5aee1077b0f1ad397de19b8c9df758811f076be744f90e8cb92b7d7ff147 | MATLAB | 2,559 | 72 | %get statistics from Amo data
%First time learining
%Only first 40 trials, or less if there are less type 1 trials are used
%This is because ther seems to be a habituation of US response for a larger
%number of trials
% single animal comparison between days, based on multiple trials in each
% day
Cell_number=446; %437... |
8c6849ddbde3fe0d12d86365c8a87f3e56356ba02687ce90373464f432d35710 | MATLAB | 2,559 | 90 | % endTask.m
%
% $Id$
% usage: myscreen = endTask(myscreen,task)
% by: justin gardner
% date: 09/18/06
% purpose: packages all variables into myscreen
% and reports any thrown errors
% copyright: (c) 2006 Justin Gardner (GPL see mgl/COPYING)
%
function myscreen = endTask(myscree... |
bd5e5d2334f2d92ea1d4012c09904c34f34be26cb28920035478a92dd7de51a8 | MATLAB | 2,560 | 99 | %
% Compute the hop distribution over time.
%
% PARAMETERS
% $network
% $type The data to use, "full" or "split"
%
% INPUT FILES
% dat/info.$network
% dat/data.$network.mat (only full)
% dat/split.$network.mat (only split)
% dat/stepsi.$network (only full)
% dat/steps.$network.mat (only split)
%
% OUTPUT FILES
% ... |
c06f2d809cb166eef7ffb18709e6b569f2633367616a470552fa90efdd8765b1 | MATLAB | 2,561 | 49 | classdef BehavioralEpochs < types.core.NWBDataInterface & types.untyped.GroupClass
% BEHAVIORALEPOCHS TimeSeries for storing behavioral epochs. The objective of this and the other two Behavioral interfaces (e.g. BehavioralEvents and BehavioralTimeSeries) is to provide generic hooks for software tools/scripts. This all... |
aee4d9d02ff3633ca846d1d38d16bae10a3be0604c5818a9c6fe6860ec604324 | MATLAB | 2,567 | 66 | %Calculate Fmax corrected F-test.
%
%EXAMPLE USAGE
% >> test_results = calc_Fmax(data, [], [3, 4], 1e4, 0.05)
%
%REQUIRED INPUTS
% data - An electrode x time points x conditions x subjects array of ERP
% data. Array will vary in number of dimensions based on how many
% f... |
c28aa81fe606ebd9132a611ef31e6cae8c3bbe5013f35fec3b32f7d3fb26737c | MATLAB | 2,567 | 57 | classdef CBIG_hMRF_unit_test < matlab.unittest.TestCase
% Written by Xiaoxuan Yan and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
methods (Test)
function test_example(testCase)
% create output folder
CBIG_CODE_DIR = getenv('CBIG_CODE_DIR');
load(fullfi... |
36e51525662a13d166f9bbf6804fb174bbf2b5d90acad239a1687f1167ff6938 | MATLAB | 2,568 | 92 | % mglMakeGrating.m
%
% usage: mglMakeGrating(width,height,sf,angle,phase,<xDeg2pix>,<yDeg2pix>)
% by: justin gardner
% date: 09/14/06
% purpose: create a 2D grating. You should start mgl
% and use mglVisualAngleCoordinates before using.
%
% width and height are in degrees o... |
79c1d83f6e4f537d2ac4f52cf51918956a344746aa3ca46fa03e456c8280d524 | MATLAB | 2,568 | 60 | function [descPara, opts] = makeDefaultParameters()
%%%%%%%%%%%%%%%%%%FCN setup%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
addpath(genpath('./toolboxes/piotr_toolbox')); % download from http://vision.ucsd.edu/~pdollar/toolbox/doc/
p = './toolboxes/vlfeat-0.9.20/toolbox/vl_setup.m';
run(p);
addpath('./r... |
3a313324d4cf76d1ad1d627be31e120a2a528d65e6f2739492ecbed2e51336d7 | MATLAB | 2,569 | 55 | function [ dest ] = drawRect( src, pt, wSize, lineSize, color )
%¼ò½é£º
%½«Í¼Ïñ»ÉÏÓÐÑÕÉ«µÄ¿òͼ£¬Èç¹ûÊäÈëÊǻҶÈͼ£¬ÏÈת»»Îª²ÊɫͼÏñ£¬ÔÙ»¿òͼ
% ͼÏñ¾ØÕó
% ÐÐÏòÁ¿·½Ïò ÊÇ y
% ÁÐÏòÁ¿·½Ïò ÊÇ x
%----------------------------------------------------------------------
%ÊäÈ룺
% src£º ÔʼͼÏñ£¬¿ÉÒÔΪ»Ò¶Èͼ£¬¿ÉΪ... |
8c357bf05ec1a1cbca032decf072dc9291ccaacc67c515263ba4c2cd6de35220 | MATLAB | 2,570 | 59 | %first download and add GLM toolbox: https://github.com/benengx
%Engelhard, B., Finkelstein, J., Cox, J. et al. Specialized coding of sensory, motor and cognitive variables in VTA dopamine neurons. Nature 570, 509–513 (2019).
clear
file=dir('ACC*uncertain*.mat');
k=1;
for jj=1:length(file)
load(file(jj).name)... |
03c437838496063b4279453f419daac19ae646d8e9ae32ee540d79962c753bda | MATLAB | 2,571 | 84 | function [HDR]=bni2hdr(arg1,arg3,arg4,arg5,arg6)
% BNI2HDR converts BNI header information into BioSig Header information
% HDR = BNI2HDR(HDR)
%
% INPUT:
% HDR.H1 contains ascii header
%
% OUTPUT:
% HDR.Label
% HDR.T0
% ...
%
% see also: SOPEN
% $Id: bni2hdr.m 8776 2013-11-14 09:04:48Z roboos $
% Copyri... |
723029e41c20cdcc2255f11b2d365cf8e0727a47317b7a0b004d4e1199e08fef | MATLAB | 2,572 | 67 | function c = InvProbV1Cons(x,Imat_t,tn,ni,nh,no,at_C_in_t,at_H_in_t,at_O_in_t,fv_in_t,V,CAf_in_t,CBf_in_t,CDf_in_t,mol_W_in_t,delta,data)
wh = reshape(x(1:ni*nh),[ni,nh]);
wo = reshape(x(ni*nh+1:ni*nh+nh*no),[nh,no]);
bh = (x(ni*nh+nh*no+1:ni*nh+nh*no+nh))';
bo = (x(ni*nh+nh*no+nh+1:ni*nh+nh*no+nh+no))';
y_r = r... |
d7b1d21cc0f8b7f765d5c36692124f7bfc0d0dc89e66ed1f958080586784d062 | MATLAB | 2,572 | 83 | function [paths, ids, visit_folder, pipeline, full_path] = read_participants_and_paths(filename, startRow, endRow)
%IMPORTFILE Import numeric data from a text file as column vectors.
% VARNAME2 = IMPORTFILE(FILENAME) Reads data from text file FILENAME for
% the default selection.
%
% VARNAME2 = IMPORTFILE(FILENAM... |
ecde05ca259aa030cbfc8991441f82c5587791e0199368b699172d3259448668 | MATLAB | 2,572 | 94 | % This script performs behavioral analysis without a cluster
% analysis options
decode_camera_video = 0;
saving_individual_image = 0;
finding_centerline = 0;
resolving_problems = 0;
calculate_behavior = 0;
stimulus_realignment = 0;
plotting = 1;
parameters = load_parameters(); %load default parameters
%% STEP 1: Get... |
a85c975980714ec7da413dd17797e7513fec322fecb1128ff63bf7f2e183b57e | MATLAB | 2,574 | 100 | %% data init
numClusters = 30;
dimension = 2;
cc=hsv(numClusters);
X = [];
a = 0.9;
t = linspace(0,4*pi,numClusters);
x = a*(t.*cos(t));
y = a*(t.*sin(t));
mu = [x;y];
Ns = linspace(1,numClusters,numClusters) * 20;
for i=1:numClusters
add = randn(dimension,Ns(i)) + repmat(mu(:,i),1,Ns(i));
X = [X, add*50];
e... |
8b485b4219f21591df74aa6e8fe7fa3ac19364c1a8c013db887239125c61645d | MATLAB | 2,575 | 108 | function [] = ExtDataFig10_Connectivity_All()
% Code for making the color plots of synaptic input/output in Extended Data Fig. 10e,f.
%% parameters
pIP10 = [13417,13038]; % pIP10 (L, R)
pMP2 = [11977,11987];
dPR1 = [10267,10300]; % dPR1
TN1A = [15521,16465,15148,12883,16207,...
16113,14581,14810,15387,17640,...
... |
171ebafd1a21168cfa2e681c0c40295768249622f4dfaf6b11c21f80cd8b8fa0 | MATLAB | 2,576 | 76 | function [A_params,paramsM] = profile2params(A,z_tilt)
% profile2params(A)
%
% Function to extract the position parameters from spatial profiles. The
% inputs to this function are
% A: The 3D matrix of spatial profiles
% z-tilt: An optional input indicating the conversion ratio of px/um
% for ... |
7d8f635ef96382695b358d0b92be415abc4b7872f2eead7d8734b7187744ac70 | MATLAB | 2,576 | 95 | %
% Compute the matrix decomposition by time.
%
% PARAMETERS
% $NETWORK
% $DECOMPOSITION
% $TYPE The data to use, "full" or "split"
%
% INPUT
% dat/info.$NETWORK
% dat/data.$NETWORK.mat (only full)
% dat/split.$NETWORK.mat (only split)
% dat/stepsi.$NETWORK (only full)
% dat/steps.$NETWORK.mat (only split)
% dat... |
1847a6c444c84ab88026e1b8a1a377ddc828cdb521f8e6d89cc2199417156a64 | MATLAB | 2,578 | 100 | %{
Visualize Hilbert transform for sample fMRI timeseries for the methods
description.
Adapts code from:
https://github.com/juanitacabral/LEiDA_Psilocybin
Output:
fMRI_hilbert_1.jpg Hilbert transform plot for one ROI.
fMRI_hilbert_2.jpg Hilbert transform plot for a second ROI.
%}
%Define command line arguments.
func... |
6a555ff542b36d0a046da529470515ddc0ba1049c4ddb8744c6f1dd2926acb0e | MATLAB | 2,578 | 82 | function [y,w] = ccabss(x)
% CCABSS - Blind Source Separation by Canonical Correlation Analysis
%
% Y = CCABSS(X) is the BSS of X=A*S where S is a set of unknown source signals
% and A is an unknown mixing matrix. The components in S are supposed to
% be independent. Y is an estimate of S appart from permutation and s... |
c94d378b24a373934a0a9c6242df023d135edc8e1ae20c85c7d5c26fdc69f933 | MATLAB | 2,579 | 63 | classdef ToUint8Test < matlab.unittest.TestCase
% Tests for webupload.toUint8, which is pure (no files, no JPEG).
% Run: runtests(fullfile(<repo>, 'upload_core', 'tests'))
methods (TestClassSetup)
function addPackageToPath(tc)
root = fileparts(fileparts(mfilename('fullpath')));
... |
07a945509feecad1604fe81b975742f6eb3aa7dc09d09f79d9fd2abe7063c0ba | MATLAB | 2,580 | 71 | function [abo mabo boScores avgNumSegments] = BlobAverageBestOverlap(gtBlobs, gtNrs, blobIndIm, blobBoxes, hierarchy, minWidth)
% [abo mabo boScores avgNumSegments] = BlobAverageBestOverlap(gtBlobs,
% gtNrs, blobIndIm, blobBoxes, hierarchy, minWidth)
%
% Calculate Average Best Overlap scores
%
% gtBlo... |
0907f7e5bda5717cfdc9b53b8714d2e28978e896b3b20f8d2e13381f2d687a64 | MATLAB | 2,581 | 86 | function CBIG_ASDf_plotCmp(A, xlimCmd, isSex, output_name)
% CBIG_ASDf_plotCmp(A, xlimCmd, isSex, output_name)
%
% This function plots GLM results (estimated difference between factors and
% standard error). If output_name is specified, the plot will be saved.
%
% Input:
% - A:
% Outputs from hypothesis ... |
afb3a82af92a932b389e70e33211ee463f26016ce2d3a344ea1282d3479cca36 | MATLAB | 2,581 | 82 | function [R,eff]=fcn_randmio_und(R, ITER)
%RANDMIO_UND Random graph with preserved degree distribution
% This is the randmio_und function from Brain COnnectivity Toolbox,
% provided for ease of use
%
% R = randmio_und(W,ITER);
% [R eff]=randmio_und(W, ITER);
%
% This function randomizes an undirec... |
e77c94f87065b921d175aa4e34ed51f539e51e0efed573b66b4d9a75b031e09a | MATLAB | 2,582 | 93 | function [] = Fig01_Example_TimeCourse_OptStim_Song_Intact
% Code for plotting the example song trace during optogenetic stimulation of the song driver in Fig. 1f.
TargetFileID = 7;
load('Mic_20210318_01.mat')
load('EthogramComb')
TargetTrial = 6;
TargetStim = 5;
DAQrate = 10000;
Opt_onset = [5+10:30:5+10+5*30]*DAQr... |
687b79b8de2ef0f10d1d6df1919a10f319eacf06607d5b6fa3dcb04dc6002406 | MATLAB | 2,583 | 40 | tic
options
filenames = [
%"Z:\1_Maxwell_Gagnon\hannahProjectData\smrFiles\20170810_JC6_ephys_cell2\20170810_JC6_ephys_cell2_MS.smr",
%"Z:\1_Maxwell_Gagnon\hannahProjectData\smrFiles\20170810_JC6_ephys_cell3\20170810_JC6_ephys_cell3_MS.smr",
%"Z:\1_Maxwell_Gagnon\hannahProjectData\smrFiles\20170817_JC6_e... |
d71c88522622487915e0a13318df064682d33c709dcaebf95229d1001c096ee7 | MATLAB | 2,585 | 75 | function []=plot_mask_boundaries(backgroundImage,img_brightness,stat,index,color,varargin)
% Function that takes the mask coordinates and x/y shift if they are needed
% and plots them over a background image
%stat should be the subselection of cells you want to plot
% IF PLOTTING ON FUNCTIONAL DATA AND NOT W-SERIES... |
8b1739290c63596540f7ffa99ad12cb8d3a3ff8fdc03c0794a720aa686667e28 | MATLAB | 2,586 | 69 | % 20230608 parameter search in 2D space
clear;
close all;
clc;
initime = clock;
addpath('..\funcs');
%% changeable parameter settings
Delta_e_start = 0; % cannot equal to 0
Delta_e_end = 0.5; % can equal to 0.5
Delta_e_steps = 200;
Delta_i_start = 0; % cannot equal to 0
Delta_i_end = 0.05; % can equal to 0.05
Delta_... |
e92f5398604aeaddcabbfdf5c6c3ccc7336657ee0f8f431c47ad340b2f273b85 | MATLAB | 2,586 | 76 | % oneStepOpto.m
%
% Optogenetic Stimulation Function. Opens up shutter in front of mercury
% lamp for one duration specified by user, with shutter closed duration
% b/w steps also user specified
% Returns vector of to feed to digital output of DAQ (series of 0 and 1s)
% Starts with space
%
% INPUTS:
% settings - s... |
fa8c02499406c06ac810e0e5214e18dd8183cdfae8de15e26e992458ab4a80b3 | MATLAB | 2,586 | 88 | function [neuronmasks,times] = piece_neurons_IOU(neuronmasks,thresh_mask,thresh_IOU,times)
% Combine masks with large IOU or consume.
% thresh_IOU=0.5;
% thresh_consume=0.8;
% thresh_consume should be larger than 2*thresh_IOU/(1+thresh_IOU) to avoid
% two masks consuming each other.
% [Lx,Ly,n] = size(neuronmasks... |
09a3d512df152c5b1dc62e92a242fb1ec5bc1d88fec5d05cde19addbde63ecbb | MATLAB | 2,587 | 84 | function subj_power_DelayResponse(sn)
% get time-frequency power of each trial
load('subs.mat');
subname = subs.name{sn};
set_name = fullfile(Dir.prepro,[subname,'_clean.set']);
EEG = pop_loadset('filename',set_name);
EEG = pop_select(EEG,'nochannel',{'LHEOG','RHEOG','BVEOG','TVEOG'});
X = [EEG.chanlocs.... |
6a1d7a8233994c1cccad921846178f8e08f1f4512b3ad13be1594c72ba244d69 | MATLAB | 2,587 | 76 | function getCensorsCYA(working_dir,project_dir,fd_thresh,dvar_thresh)
%% Script to extract censor vectors for fMRI analyses [Created by Marc Rudolph. Oregon Health & Science University 2014]
% Update 9/30/2014 MR: Now can select which motion correction .mat file to use (Current FD.mat (FD Only) or Power2014.mat (FD + ... |
d9f40a423b4b3511f513413bc682c47f2b01c028d030ac141f94d0a77710aa1b | MATLAB | 2,590 | 71 | % Marc Normandin, Muzzio Lab, Psychological & Brain Sciences, University of Iowa, 2024
function [hFig] = plot_stability_bfo180_average_similarity_curves_per_period(DaysToSessions, StableBFO180Similarity, UnstableBFO180Similarity)
TStable = compute_bfo180_average_similarity_curves_per_period_table(DaysToSessions, St... |
0fa8c7454400a134a90184ee62e5d33b63fd0627827183be7a1fde97eb5af157 | MATLAB | 2,593 | 70 | function [TagUnitNames, actUnitNames, oUnitNames, skipMovies, badFrames] = getUnitNames(Sesname)
%returns unitnames per session
% Detailed explanation goes here
badFrames = [];
skipMovies = [];
TagUnitNames = [];
oUnitNames = [];
actUnitNames = [];
switch Sesname,
case 'POm36', LATENCY=15; TagUnitNames... |
13ac849faa952e65bd85ca1cb845c9103affeb86b7d4478cbc4c41217ec8f15e | MATLAB | 2,594 | 76 | function smt_compute_p2(pathSMT,pathS2,pathScheme,folderOut)
% compute FOD rotational invariants from kernel obtained with SMT ( fit with l=0 )
% Sl(b) = pl * Kl(b,smt)
% pl = "Sl(b)./Kl(b)"
%
% pathSMT = path to SMT results file (.nii)
% pathS2 = path to Signals Second Order Rotational Invariant (.ni... |
670f5de27f4bf1d5f79ee36bddc6dee9c5cf24e2e7e3c3df987d720dbe294a15 | MATLAB | 2,594 | 76 | function getCensorsCYA(working_dir,project_dir,pipeline,fd_thresh,dvar_thresh)
%% Script to extract censor vectors for fMRI analyses [Created by Marc Rudolph. Oregon Health & Science University 2014]
% Update 9/30/2014 MR: Now can select which motion correction .mat file to use (Current FD.mat (FD Only) or Power2014.m... |
234b11e046d571e360a252eef9a1d7fa3c516635faeb2f7fc51ac2b4b17239cd | MATLAB | 2,596 | 80 | %% Start the main pipeline
filenames = {'sim_0','sim_1','sim_2','sim_3','sim_4','sim_5','sim_6','sim_7','sim_8','sim_9'};
load('EXTRACT/eval.mat')
% radii = [4:8];
% SNRs = [3:4:23];
output_folder = ['./EXTRACT_CV/'];
if ~exist(output_folder,'dir')
mkdir(output_folder);
end
CV_times = zeros(length(filenames),1);
f... |
c2442a11aca4357876fc5e4dee644c7e3d494557360c7c327228d4d2d37376bd | MATLAB | 2,597 | 69 | % 20230608 parameter search in 2D space
clear;
close all;
clc;
initime = clock;
addpath('..\funcs');
%% changeable parameter settings
Delta_e_start = 0; % cannot equal to 0
Delta_e_end = 0.5; % can equal to 0.5
Delta_e_steps = 200;
Delta_i_start = 0; % cannot equal to 0
Delta_i_end = 0.05; % can equal to 0.05
Delta_... |
2925c772ab4655db78600216afad76dd4b57a2c5e9f38c616f514548780d3082 | MATLAB | 2,598 | 93 | %% merge trained trees to a single output
function model = mergeTrees( opts )
% accumulate trees and merge into final model
nTrees=opts.nTrees;
gtWidth=opts.gtWidth;
treeFn = [opts.modelDir 'tree/' opts.modelFnm '_tree'];
for i=1:nTrees
t=load([treeFn int2str2(i,3) '.mat'],'tree');
t=t.tree;
if(i... |
763a56f3fd5718b19b261d031c7ee7126ab7ee9b0527237f77616c1dcddfe9e8 | MATLAB | 2,599 | 127 | function filtered_data_out = fmri_filter(data,TR,varargin)
% Defaults
hipass = [];
lowpass = [];
detrending = false;
smoothpr = false;
reserve_mean = true;
out_file = '';
% Parse varargin
for ii=1:2:length(varargin)
param = varargin{ii};
value = varargin{ii+1};
switch lower(param)
case 'hipass'
hipass = val... |
f56f8099ebd9ede10756e0485a5db4f905bc6a731fef4fd5930f1c82dd1a48e8 | MATLAB | 2,600 | 73 | function [params, s_new] = denoise_energy(params, s, state)
% Energy based DSS denoising function
% [params, s_new] = denoise_energy(params, s, state)
% params Function specific modifiable parameters
% params.usepow ... (default: 1.3)
% params.c ... (default: ?)
% params.var_noise Initi... |
d1b20673db32bcf7bfa98b5ab14dabe7afe14c92b8ce098ab5dc36a9152fdf46 | MATLAB | 2,601 | 46 | function fH = plotLMMRegressionSlopes_v_pRFCSTExp(lmmResults,resampled_medianCSTExp,roisToPlot, cmapROIs, saveFigs,saveFigDir)
fH = figure; set(gcf,'Position',[889,294,963,604]); hold all;
for idx = 1:length(roisToPlot)
% Compute group average and SEM - CST exp
currGroupMeanOfMedianExp = mean(resampled_media... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.