sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
05d946d4700458f27c1275730657a710d227a78558616d313a02142eaef904ab | MATLAB | 7,057 | 214 | %% Continuous factor model
clear all; close all
set(0,'DefaultFigureWindowStyle','docked')
flags.plotIndividualChanges = true;
if ispc
% pat{1} = 'C:\Analysis\AssemblyAnalysis\Sleep\'; % location of the processed sleep assembly activations
% pat{1} = 'C:\Analysis\AssemblyAnalysis\Sleep\Decoding vs... |
ff61aa53bb7846d44b0a9705108a27e6005935295635a078847b6c0e805e1b73 | MATLAB | 7,078 | 248 | function [stats,st] = SStat_mass_CoxExt(sID_ext,X_ext,d_ext,t_ext,Y,maskvtx,prs,e)
% [stats,st] = SStat_mass_CoxExt(sID_ext,X_ext,d_ext,t_ext,Y,maskvtx,prs,e)
%
% Vertex/voxel-wise parameter estimation for the extended Cox model. This
% function uses as input the output of SStat_X_ext but with X_ext having
% new time... |
bb45be1020e242155404ded928bbf80e67126bd1a955ce00f531d4091a927c75 | MATLAB | 7,079 | 172 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Evaluation tool boxs for "Inf-Net: Automatic COVID-19 Lung Infection Segmentation from CT Scans" submit to Transactions on Medical Imaging2020.
%Author: Deng-Ping Fan, Tao Zhou, Ge-Peng Ji, Yi Zhou, Geng Chen, Huazhu Fu, Jianbing Shen, and L... |
61a1ca1df551431063faf0f5d48c8ebb2b824d872fa5a861e013c1ed198f2bed | MATLAB | 7,082 | 231 | classdef ConfigFile
properties
FilePath
Params
WriteToFile = true
end
methods
function self = ConfigFile(configFilePath)
self.FilePath = configFilePath;
if isfile(self.FilePath)
self = GenerateParams(self);
... |
c7db8b4705d1705ea81ff9dc8490a055730cf4ef2ca8655c6a7f1701f935b525 | MATLAB | 7,090 | 171 | function [ ] = display_graph(x_category, y_category, algorithm_list, w_list, info_list, scale, line, width)
% SHow graphs of optimizations
%
% Inputs:
% x_category "numofgrad" or "iter" or "epoch" or "grad_calc_count"
% y_category "cost" or "optimality_gap" or "gnorm"
% algorithms_li... |
7b24d942d2f6bb316463e7bf5bc145842adeb8815320a91e98636cc08932a957 | MATLAB | 7,100 | 145 | % %% Script to Rename according to Coco format
% clc;clear all;close all
%
%% Input Directory
% d1_ = '../Input/Skin_Datasets/Dataset1_HGR/';
% d1ori= imageDatastore(strcat(d1_,'original_images'),'IncludeSubfolders',true,'LabelSource','foldernames');
% d1mask= imageDatastore(strcat(d1_,'skin_masks'),'IncludeSubfolders... |
31357385a18880e4114e4dfad145fb2f2aed03918b455e2347a4c49232e6f831 | MATLAB | 7,110 | 169 | function AssemblyRasterPlotDiscreteJointOnly(Factor,Rates,Units,Events,plot_win)
% Make raster of units higlighting those tagged as assembly members
%
% Aleksander PF Domanski PhD UoB 2016
% aleks.domanski@bristol.ac.uk
threshold = 3; % Which level of scrutiny to apply to thresholding
colorscale{1} = zeros(size(Factor... |
4978a0c867c38291a484798b67125345cce2c286ef0660962872a1c879dbe846 | MATLAB | 7,112 | 198 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Script to employ for the sequence experiments:
% TCS2 with 2 NI devices.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
... |
588f704e69d71ddae9ed3d09a5f3b11c1dfd0ebba175a468aa1364adc66aa5f8 | MATLAB | 7,117 | 186 | % ALLSUBJECTS - load the data
global dirnamesLeft MVCsLeft dataLeft filteredLeft forcerateLeft timeLeft blacklistLeft mLeft;
global dirnamesRight MVCsRight dataRight filteredRight forcerateRight timeRight blacklistRight mRight;
global m
d = dir('results/left/');
count=0;dirnamesLeft = {};dataLeft = {};MVCsL... |
f38bdb91d9aaf018a4425c760683f28fd2a626b36aae4582be3ba7e42aac534a | MATLAB | 7,121 | 246 | %% load allen atlas2015, count ROI number of the whole brain
% load atlas matrix
load('/media/user/Elements/NC codes/023_2015_ROIsABM.mat');
myROI=ROI;
RC = [2 17 90 91 151 152 172 173 174 176 177 195 196 197 ...
198 199 200 209 224 297 298 358 359 379 380 381 ...
383 384 402 403 404 405 406 407];
% Removing ... |
561446b0009c875a79282321082d5f2e25f671c1eaa65df94dbd2aaaeffc70a2 | MATLAB | 7,126 | 227 | clear all
doSave = 1;
rdmPath = '/data/hammer/space2/mvpaGoals/data/golsaRSA/';
rdmFile = '11-Oct-2017.mat';
load([rdmPath rdmFile]);
clear rdm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Create Representation Distance Matrices %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if 1
%%% Setup %%%
... |
5c15a74cbd4cfff0eadfffbe9c46a362a24b45bd43ac637f31d8ef42ad2cd63d | MATLAB | 7,163 | 220 | function [h,MISE,CvBW,F]=UniKDE_AD(X,h0,Ef,Z,ub,noBlocks,usePSO)
% Fit spike train rate kernel: Univariate nonparametric density estimation with bandwidth selection
%
% Input arguements
% X - spike times
% h0 - inital guess for kernel density width
% Ef - choice of error function (1:3)
% Z - Optional time vect... |
a653d058bc2b73fe7c9fddc891783c54649eb88a90dc0dc45534d429eb61839a | MATLAB | 7,168 | 169 | function [I_ion, S, I_Na, I_CaL, I_Kr, I_Ks, I_to, I_K1, I_NaK, I_NaCa] = RLUpdateTT3epi(V, S, dt, I_stim, params)
% This function performs a Rush Larsen timestep of the specified length for
% the reduced Ten-Tusscher 2006 model for ventricular myocytes. The
% implementation is according to the online source code, exce... |
1768c27a406723323d787bbc1f7f6727967795f088c42b9eaf473e437ea788f1 | MATLAB | 7,174 | 152 | function [] = cr_check_per_patch(lmatrix, phase_patch,xfield, yfield, phase_pd, mean_phases, cv_phases, pos, PowerSpec, theta_all,magn_all, wave_length, magnitude, CBF)
% This function plots the underlying variables that make up the wave
% direction and wavelength
%% Set some variables
binEdges = 0:(2*pi)/12:2*pi... |
2116fd9734a1a4c1573ec87a6ebe54f88f75a2a9144d565c8d7d2c398e77eb1e | MATLAB | 7,181 | 170 | function [I_ion, S, I_Na, I_CaL, I_Kr, I_Ks, I_to, I_K1, I_NaK, I_NaCa] = RLUpdateTT3epi(V, S, dt, I_stim, params)
% This function performs a Rush Larsen timestep of the specified length for
% the reduced Ten-Tusscher 2006 model for ventricular myocytes. The
% implementation is according to the online source code, exce... |
8c8fd6827bb3ea9af34152f6c7ad1e00b3bc2a0097debfa7e16c6a898ee2d1f8 | MATLAB | 7,182 | 193 | % Usage: strvec = vect2colon(vec, options)
%
% Converts a vector into a string using MATLAB colon notation (single resolution).
%
% Options are:
%
% 'Delimiter' - 'on','yes','off','no' {default on} : Including square brackets []
% (or curly brackets {} when output's dime... |
67d82bfaa7f48d2af462cb5ca272ed927b0bdd4acd35f7f1cd53531251133fba | MATLAB | 7,229 | 216 |
%% large wave speed
explabel={[2,18],[2,7],[1,3],[1,3],[1,6]};
path={'2017 APR 19 publish','2018Feb 04 M2553M publish','2018Feb 04 M2555M publish','2018Feb 04 M2556M publish','2018Feb 04 M2560F publish'};
for M=1:5
for state=1:2
rsDatam=[];
exp=explabel{M}(state);
cd(['/media/user/Elements... |
9ac7b28cfb6c56acdc411088680c1b8912701913a2b29a9d4be1d8a5fded7a1c | MATLAB | 7,240 | 328 | function NeuralClassifierAnalysis_vanRossum
%-Stores Data for Classifier Analysis-%
%Metric: van-Rossum
%-Created 07/24/2017 JDY-%
clear all
close all
clc
tic
if( isunix )
Path = '/Volumes/JUSTIN EXHD/DataStore/';
else
% Path = 'E:\PROJECTS\DataStore\';
Path = 'C:\Users\sanesadmin\Desktop\JDYDataStor... |
c6318a6b9a5c30047a9337642c1da1d3f2a9e96ee73f4830260d7cf9f8c4c396 | MATLAB | 7,243 | 166 | function AssemblyPlotDiscrete(Factor,Rates,Units,Events,plot_win)
% Make raster of units higlighting those tagged as assembly members
%
% Aleksander PF Domanski PhD UoB 2016
% aleks.domanski@bristol.ac.uk
AreasToPlot = 3;%1:3
threshold = 3; % Which level of scrutiny to apply to thresholding
colorscale{1} = zeros(size(F... |
d51921c930eeb892670063b2b7351ce961d470c794e23b9d751813f32d0490e5 | MATLAB | 7,243 | 177 | function stimtrace(dirname,cellno)
% stimtrace(dirname,cellno)
%
% Extracts raw delta-F/F trace for each presentation of each stim, and
% plots. Must be run from 'analysis\scratch' folder, and requires
% tpreaddata (from standard bulkload analysis panel) to have been
% previously run (this can be acheived through Ana... |
57a4bb815eb7417ed2df270ab18dff4b72488bbaa92acdbfe5394250452d6725 | MATLAB | 7,247 | 237 | function [dx, dy, theta] = search_placement(nerveModel, electrodeType, placement, flipOrientation)
%SEARCH_PLACEMENT Summary of this function goes here
% search_placement(1, 1, '13');
% search_placement(1, 3, '14');
% search_placement(2, 1, '1', true);
% search_placement(2, 2, '5', true)
% search_plac... |
983b8ff0d2aa1430616c9ad03e37819d606a767ec58c1f5f07466cd04da10877 | MATLAB | 7,267 | 137 | function FreeEnergyAnalysis(lambda,Subregions,FolderPaths)
% Analysis of the Free Energy change estimated from ReML for different noise models
%
% INPUTS:
% - lambda: cell array of power values of the MDI, initialized in RunQUIQI.m
% - Subregions:cell array of regions of interests for the analysis. Initi... |
66b3fa92b2b99292a46895123e007a5782f95bb07e8279fccdf2f9a2333de7d3 | MATLAB | 7,270 | 249 | % PURPOSE : Checking if the number of bins/channels and data type for different ERPsets
%
% FORMAT :
%
% chkerp = f_checkerpsets(ALLERP,indexerp)
% INPUTS :
%
% ALLERP - structure array of ERP structures (ERPsets)
% To read the ERPset from a list in a text file,
% replace ALLERP b... |
add72f1f1996f1938ef7ecb81554f858a5c0c42d401f7a837a3eaa49e384efd4 | MATLAB | 7,283 | 156 | function AssemblyRasterPlotAll(Factor,Rates,Units,Events,plot_win)
% Make raster of units higlighting those tagged as assembly members
%
% Aleksander PF Domanski PhD UoB 2016
% aleks.domanski@bristol.ac.uk
threshold = 3;
colorscale{1} = zeros(size(Factor.FSC{1},2),3);
colorscale{1}(:,3) = 1-0.5*rand(size(Facto... |
fcc94507cff784505a185478c832b70dc9649dd415736ef18eb99110698235cd | MATLAB | 7,283 | 158 | %-----------------------------------------------------------------------
% Job saved on 15-Dec-2021 09:57:23 by cfg_util (rev $Rev: 7345 $)
% spm SPM - SPM12 (7771)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
restoredefaultpath
clc; clear; close all force;
% ... |
dd1a3d93f0495ade83ef99b91bb598858e5c4c983ee070849ee70a3dfb098b84 | MATLAB | 7,295 | 232 | function NextTrialID = TrialFcn_SanesLab(TRIALS)
%NextTrialID = TrialFcn_SanesLab(TRIALS)
%
%Custom function for SanesLab epsych
%
%This function first determines whether food or water reward will be used.
%
%This function then controls the order and selection of upcoming trials in
%appetitive or aversive go-nogo parad... |
ee7a339a447449a0a13826600fe81638035ca6823b87757690d58e6c65693ac8 | MATLAB | 7,311 | 249 | %% Tetrode Spike detection from raw signal procedure:
% 1. Retrieve raw stream data from specied blocks of a tank
% 2. Filter (700 - 8000 Hz) for spike signal
% 3. Make each tank 'block' a 'trial' using ULTRAMEGASORT2000 software
% https://physics.ucsd.edu/neurophysics/lab/UltraMegaSort2000%20Manual.pdf... |
a0b49158043c1eaa81a37b1b81324c8bd926a56987a991eee6efe455fd686e63 | MATLAB | 7,314 | 203 | clear
if ispc
pat = 'C:\Analysis\AssemblyAnalysis\raw\';
else
pat = '/Volumes/Akasa/Bristol/AssemblyAnalysis/raw/';
end
Target = 'LONG';
cd(pat);
fileList = dir([pat 'allTimestamps' filesep '*' Target '*.mat']);
reject_list={'MiroslawLONG1_Events.mat','IreneuszLONG1_Events.mat'}; %'ALL_events.mat'
... |
962e4305564df67dd7b87848e3e8cefbf772ddb3686b7191951a865341dc81eb | MATLAB | 7,315 | 317 | function varargout = ForwardMaskAversiveGUI(varargin)
% FORWARDMASKAVERSIVEGUI M-file for ForwardMaskAversiveGUI.fig
% FORWARDMASKAVERSIVEGUI, by itself, creates a new FORWARDMASKAVERSIVEGUI or raises the existing
% singleton*.
%
% H = FORWARDMASKAVERSIVEGUI returns the handle to a new FORWARDMASKAVERSIV... |
51895814c901ee829c548d349f8db31a431546c390f1ee8f1ed9647d35948d44 | MATLAB | 7,320 | 207 | % Calculate st-SCA using randomized spike times. Script is same as
% fx_calculate_spatiotemporal_sta except uses randomized spike times
% instead of results from spike detection
function fx_calculate_spatiotemporal_sta_randomized_spikes(...
index, tb, llfp_type,...
clip_length, downsample_factor)
fil... |
9438b122587282e4de9aae8b8db10fd415ebc2377e6f86d06db1ba5dea724017 | MATLAB | 7,326 | 209 | function direct_is_shortest_mask = calculate_direct_is_shortest_mask_sym(sc_avg,a,b,c,is_figures)
% OC - do not run Roshenthal anymore!
% Return mask in original order of data, NOT rosenthal!
% Original is
% /Users/ocivier/Dropbox/Data_Analyzed/Connectome/SCFC_4_runs-WITH_ORIGINAL_FC/direct_is_shortest_mask
dbstop ... |
b124898b2a902bf80cc74b42a31718de03a634608143f4aea5a67d2dd12bdd01 | MATLAB | 7,326 | 228 |
function [new_erp_data,Amp_out,Lat_out_trals,Amp,Lat]= f_ERP_plot_wav(ERPIN,offset,ChanArray,BinArray)
%%Parameter from bin and channel panel
ERP = ERPIN;
OutputViewerparerp = f_preparms_mtviewer_erptab(ERP,0);
[~, chanLabels, ~, ~, ~] = readlocs(ERP.chanlocs);
Yscale = OutputViewerparerp{6};
positive_up = OutputVie... |
18dcb193e30dbef8dd754e1c989f33b75a5d2e79f53d101b671324d7654978e1 | MATLAB | 7,331 | 189 | function violins = violinplot(data, cats, varargin)
%Violinplots plots violin plots of some data and categories
% VIOLINPLOT(DATA) plots a violin of a double vector DATA
%
% VIOLINPLOT(DATAMATRIX) plots violins for each column in
% DATAMATRIX.
%
% VIOLINPLOT(DATAMATRIX, CATEGORYNAMES) plots violins for each
% ... |
61d0fa0bc781b0c3e036f9ab192d9a687ca1c0e7dc206f0bb0eb4831cf6c1cb0 | MATLAB | 7,335 | 191 | function make_chord_plots
%
% Function to make mode chord plots
% Fran Hancock
% July 2022
% fran.hancock@kcl.ac.uk
%
PROJECT = '/Users/HDF/Dropbox/Fran/Academics/PhD/matlab/projects/HCPEP_COMPARE/';
Rmax=4;
CondMax=3;
N_areas=116;
Smax=5;
CON_PROJECT = '/Users/HDF/Dropbox/Fran/Academics/PhD/matlab/projects/HCPEP_CON... |
56d5aba97aa07c78e74fe7a3bd9bcdcee183a41839c7238b3dba02db36c40f14 | MATLAB | 7,375 | 197 | %% Setup
util.clearAll;
outdir = fullfile(util.get_paths().figs,'graph_centrality');
util.mkdir(outdir)
c = util.plot.getColors();
%% Setup graph
% Read beta values and calculate their correlation
beta_tables_taste = util.load.all_taste_betas();
[avg_corr, ~, corr_atanh] = connect.correlations(beta_tables_taste.combin... |
ee8a538adda66182266aad464d6117e20ec0b83b54fc55bd6f4a10e6b715ba38 | MATLAB | 7,383 | 160 | function [diam, diamCounts, nbFibers, nbPop, areaMinId] = ...
create_diam_pop(diamp, dmin, dmax, populations, ...
nbFibersMm, ratioFib, dist, multPop, smallR, medR, fascID)
% CREATE_DIAM_POP Computes random fiber population for each fa... |
02ea98ac6c2c1dcd6dffbb9ee8fb866568998ab27dc3f1f90fa47f1139951819 | MATLAB | 7,386 | 293 | function [sigma_sim, sigma_sim_include_burnin, sigma_sim_sub] = ...
simulate_neuron_glm(nNodes, tf, params, plotFlag)
% function [sigma_sim, sigma_sim_include_burnin, sigma_sim_sub] = ...
% simulate_neuron_glm(nNodes, tf, params, plotFlag).
%
% Simulate the GLM dynamics for a group of neurons.
%
% Input: 1. nNo... |
8ad51c7043d0af8a49eca034931a26a630baab4ceed0974a71cadfad1ec3f943 | MATLAB | 7,387 | 183 | function [ ] = draw_convergence_animation(problem, algorithms_list, w_history, max_epoch, varargin)
% Draw convergence animation.
%
% Inputs:
% problem function (cost/grad/hess)
% algorithms_list algorithms to be evaluated
% w_history solution history produced by each algori... |
715eddef11f39d51f14d9495daeee49860848a112d8cbe8d14e4fbc89fc61f7e | MATLAB | 7,393 | 321 | function gc_var_plus_correlated_noise
% GC is known to be sensitive to correlated noise. Here we visualize the effect.
% This correspond to Fig S4 S5 in the manuscript.
nNodes = 10;
maxLags = 2;
params.maxLags = 2;
plotFlag = 1;
tf = 2000;
gRefMat = zeros(nNodes);
links = [1 6; 1 3; 1 8; 6 7; 3 5; 5 8; ...
... |
df13f0f1f939ee67d5155ba1c1315bc50e00de14c595f534e31d45e73f458cce | MATLAB | 7,419 | 187 | %Author: Guanghui ZHANG & Steve Luck
%Center for Mind and Brain
%University of California, Davis
%Davis, CA, USA
%2024
% ERPLAB Studio
function varargout = f_decode_mvpclass_GUI(varargin)
global observe_DECODE;
addlistener(observe_DECODE,'Count_currentMVPC_changed',@Count_currentMVPC_changed);
addlistener(observe_DEC... |
40ad151b3b73d462cc3c1ba4c06c1c2ac07228036c21caa62def8a4a1b205609 | MATLAB | 7,427 | 200 | function level85
%
% Continuous noise
% This protocol for delivering stimulus leaves the spout completely open
% for a set amount of time with the assumption that the passive properties
% of the plumbing system have been optimized to delivery a slow continuous
% (~1/30 ml/s) stream of water.
%
% Tones are played on... |
4d844dfeaed77d1575aa0d4820206eca12df8356d0d6c661e6411199467e1d7c | MATLAB | 7,435 | 204 | function find_placement_cluster(iSubject, rootDir)
% find_placement_sens(1, rootDir)
% find_placement_sens(2, rootDir, 'gamma')
% iSubject = 1 for Subject1, 2 for Subject3
% Subject1, fascicles from 34 on are peroneal?
%% Load
[fibersAtPercep, fibersCenter, placements, endo, percepThresholds, expAS, sensati... |
923c7e269e93a741db03b1d6722dde67f2337b0895721658651a20915dc7d372 | MATLAB | 7,435 | 269 | function [stats,st,a,b] = lme_mass_RgFSfit(X,Zcols,Y,ni,Dist,model,prs,e)
% [stats,st,a,b] = lme_mass_RgFSfit(X,Zcols,Y,ni,Dist,model,prs,e)
%
% Linear mixed-effects estimation by the Fisher scoring algorithm for a
% whole region.
%
% Input
% X: Ordered (according to time for each subject) design matrix (nmxp, nm
% t... |
89b9dac8d82337547f206bc740f00ab02561940a7a874ac530b3bc310449f95b | MATLAB | 7,441 | 268 | % Analysis Script for experiments with four conditions or less, labeled
% with generic conditions that can keep track of in notebook and change
% titles for plotting if want
clear all; clc
root = 'C:\Daniela\Data\Ir68aKir_SD\'; %folder where angles of heading trajectory are save
% If you are using a mac, use... |
6f2d6ac772ac3ec01972345b96a13e75dd4d39add9fd373b2a279db45bd3d0b3 | MATLAB | 7,449 | 198 | function comparison = calculate_index(solutions, params)
% Script for the calculation of the indexes for the boundaries condition
% analysis using computed potentials
% The script cycle on the number of testing condition (points of
% stimulation) and calculate the indexes among the different boundaries
% conditi... |
c0277b68f6827b5b5d6c7f4e45be3a64ec9fe98b6a768a2acc31bdebb44eb61a | MATLAB | 7,476 | 153 | function AssemblyRasterPlot(Factor,Rates,Units,Events,plot_win,region)
% Make raster of units higlighting those tagged as assembly members
%
% Aleksander PF Domanski PhD UoB 2016
% aleks.domanski@bristol.ac.uk
threshold = 3;
colorscale = flipud(lines(size(Factor.FSC{region},2)));
lag = 0.5; % window ... |
686f9f847869a637e7953df53c91acbc884efa3a6dca0766468c5b5b25d0e361 | MATLAB | 7,482 | 96 | function [db,P] = loadData_paper(whichData,recompute)
fprintf('*** Loading data... ***\n')
if contains(whichData,'ephys')
n = 1;
switch whichData
case {'ephys', 'ephysNormal'}
% V1/HPF
normalColor = hot(16);
db(n).subject =... |
7301fd3f86ed15eef3bc8cdf09e1e380bf2c0d4751f7e1a89654e5e6fe6c6bd8 | MATLAB | 7,484 | 251 | % Magno Optogenetics Experiment Script
% Written by Sara Wasserman and Rachel Mernoff 2016.04.28
% Adapted by Sara Wasserman and Grace Turner June 2019 and again by Sara
% July 2021 for ACV and Water Plume Control Exp
% Last Updated by Daniela Limbania in April 2022
% put this in here to set up serial communicat... |
cdd2ea9d002bec07455bbe95c6811d344c30cf1c31dc70e45550e814c7b4e521 | MATLAB | 7,484 | 243 | function [P,fail] = ep_CompileProtocol(P)
% [P,fail] = ep_CompileProtocol(P)
%
% Takes protocol structure created by ExperimentDesign GUI and compiles the
% data for use by Psychophysics_GUI.
%
% Adds fields to the protocol structure:
% protocol.COMPILED.writeparams
% protocol.COMPILED.readparams
... |
84a8c96ef796f809c847984c8c31a799f4a20370b28406ec221944d9e2d2e351 | MATLAB | 7,487 | 265 | % PURPOSE : Remove linear trends from each epoch of an epoched EEG dataset.
%
% FORMAT :
%
% >> EEG = pop_eeglindetrend( EEG, 'Baseline',detwindow );
%
%
% INPUTS :
%
% EEG - epoched EEG dataset
% Interval - time window to estimate the trend. This trend will be
% subtracted from ... |
0cce3504c0f5ab5fe36c86a0f5e4f5b9be13961a504e38cb6ffcf13c16b6ec25 | MATLAB | 7,490 | 242 | function Out = Prepare_Data_norm(dset,NORM,Parm)
% Out = Prepare_Data_norm(dset,NORM,Parm)
if exist('Parm')==0
Parm.Method = ['tSNE']; % other methods 2) kpca or 3) pca
Parm.Max_Px_Size = 227;
Parm.MPS_Fix = 1; % if this val is 1 then screen will be Max_Px_Size x Max_Px_Size (eg 120x120 )
... |
39f902d119c5355d10c672374422ba70fae6473ec2615f46e75f09f5bf8d8673 | MATLAB | 7,490 | 263 | function step3c_getCoolingPerformance_SpatialMask_SNR
options = struct('coolThreshold', 11,...
'warmThreshold', 35);
% Lsit all cross referenced files
dataDir = Cloudstation('Vowels\Spatial_Unmasking\Cooling\Data\Cross-referenced Behavior');
files = dir( fullfile(dataDir,'*.mat'));
% ... |
a3bb061f541eb9777452d18583b074486e0665cb6ba6f5a9f2584c9839336aa5 | MATLAB | 7,499 | 244 | % PURPOSE : Create table of ERP artifact detection summary
%
% FORMAT :
%
% Pop_summary_AR_erp_detection(ERP, fname);
%
% EXAMPLE :
%
% Pop_summary_AR_erp_detection(ERP, 'C:\Users\Work\Documents\MATLAB\test.txt');
%
%
% INPUTS :
%
% Fname - File name and path
%
% OUTPUTS :
%
% Text file with saved ERP artif... |
7377d51875f25016132f35e8f3ad52d807b3e209f0c074f192221e3e85ffab14 | MATLAB | 7,500 | 240 | function handles = Apply_Callback_SanesLab(handles)
%handles = Apply_Callback_SanesLab(handles)
%
%Custom function for SanesLab epsych
%
%This function applies changes made by the user.
%Input:
% handles: GUI handles structure
%
%Updated by ML Caras 8.17.2016
global AX FUNCS TRIAL_STATUS RUNTIME AUTOSHOCK
%Determ... |
3f2c5cdd77ef4089e17e2bf7112cef9ee84276110b767e6ae3aa594239bc0859 | MATLAB | 7,509 | 192 | % eegplugin_PatID() - EEGLAB plugin for visually editing event markers and identifying bad channels using eegplot.
%
% Usage:
% >> eegplugin_PatID(fig, try_strings, catch_stringss);
%
% Inputs:
% fig - [integer] EEGLAB figure
% try_strings - [struct] "try" strings for menu callbacks.
% catch_stri... |
b5e493d2a027c3962c5a5b52ff4ae2bd145cd46da1eb504c7fd72f2ffc191900 | MATLAB | 7,513 | 192 | function violins = violinplot(data, cats, varargin)
%% This function has been adopted and edited from a Github repository. The original function is freely avalibale at the following: "https://github.com/bastibe/Violinplot-Matlab".
%Violinplots plots violin plots of some data and categories
% VIOLINPLOT(DATA) plots ... |
f4e12248ef500e5222aab52a41f63dba9a37de778aaec3f5083375dfcfa9d0d2 | MATLAB | 7,513 | 305 | % PURPOSE : Loads BESTset(s)
%
% FORMAT :
%
% BEST = pop_loadbest(parameters);
%
% PARAMETERS :
%
% 'filename' - BESTset filename
% 'filepath' - BESTset's filepath
% 'Warning' - 'on'/'off'(Def)
% 'UpdateMainGui' - 'on'/'off'(Def)
%
%
% OUTPUTS :
%
% BEST - output BESTset
%
%
% Example :... |
194a7faef5be026fb16d54088bc661b826b9a336db135f2c546f991ff3cdba6c | MATLAB | 7,516 | 196 | function act_map = makeActivationMap(problem, t_end)
% This function simulates the monodomain equation on a mesh where the
% volume fraction (fraction of accessible material, as opposed to say
% collagenous occlusions due to fibrosis) and conductivity tensor are
% allowed to vary between different elements. Completely ... |
78b5e6d350434d7ca55167d9b9b374d81a08ccd6389c459366a1a66ea4039b2f | MATLAB | 7,527 | 228 | function [indiv_frame_probability, pop_frame_probability, hrfilt_frame_probability] = DL_GetBarLocationCounts_frames (dirAng, dirAnaly, condition, bin_start, bin_end)
close all
% binEdg = round(linspace(0,360,361),2);
% binEdg = round(linspace(-180,180,360),2); % 1 degree bins. Wrapped to 180: -180 to 180 in 360 ... |
e7d9a0fea4ef5eda82ce6259b119882346a6a51cd408eb83d9231f51dde8784c | MATLAB | 7,538 | 169 | function simulate_behavior()
% Simulate behavior using a range of parameters consistent with the ones
% observed in our data set. Parameter recovery will be plotted in
% disp_param_recovery.m.
% Simulations are performed for the 6 models.
%
% Running this function may take a few minutes.
% =================... |
a72e369484681244ce9d0d0d5ba7c020b434e0c5c03a9669f2a3aad9001131e6 | MATLAB | 7,550 | 253 | % PURPOSE : Get the name of channels and bins for single and mutiple ERPsets
%
% FORMAT :
% f_geterpschanbin(ALLERP,SelectedERPIndex);
%
%
% INPUTS :
%
% ALLERP - structure array of ERP structures (ERPsets)
% To read the ERPset from a list in a text file,
% replace ALLERP by... |
c88f71d961bb70d7cc23a21df31a691ec0c9674a183409608fd7d752d05598a9 | MATLAB | 7,566 | 227 | function [ ] = display_classification_result(problem, algorithms_list, w_list, y_pred_list, accuracy_list, x_train, y_train, x_test, y_test)
% Display results of classification problem.
%
% Inputs:
% problem function (cost/grad/hess)
% algorithms_list algorithms to be evaluated
% w_lis... |
d4c2f93c3fb6ae966a5a573feb305dea8a4279fd294f46f5d6b04d08e1292846 | MATLAB | 7,566 | 224 | clear;
explabel={[2,18],[2,7],[1,3],[1,3],[1,6]};
path={'2017 APR 19 publish','2018Feb 04 M2553M publish','2018Feb 04 M2555M publish','2018Feb 04 M2556M publish','2018Feb 04 M2560F publish'};
%% Set pattern detection parameters
Fs=150;
params = setPatternParams(Fs);
mid_ver=26;
mid_hor=22;%26;
pn=zeros(2,6,5);% patt... |
7cbbe9b05c870e21ded08c6c10a5cbc05620acdaa098bf78cf13c3a17ca9a5f5 | MATLAB | 7,568 | 345 | function NeuralClassifierAnalysis_VictorPurpura
%-Stores Data for Classifier Analysis-%
%Metric: Victor-Purpura
%-Created 07/22/2017 JDY-%
clear all
close all
clc
if( isunix )
Path = '/Volumes/JUSTIN EXHD/DataStore/';
else
Path = 'E:\PROJECTS\DataStore\';
end
Gerbil = GetGerbilIDs(Path);
%---Run Analysis... |
b9a3494c120b9cf8b2c93f6f89e0d11e0c1fbe2b2fca805a55e83f71dbc609ee | MATLAB | 7,568 | 203 | % FORMAT:
%
% erplab(option)
%
% option:
%
% help : open ERPLAB TOOLBOX USER'S MANUAL
% manual : open ERPLAB TOOLBOX USER'S MANUAL
% tuto/tutorial : open ERPLAB TOOLBOX USER'S TUTORIAL
% script : open ERPLAB TOOLBOX USER'S SCRIPT TUTORIAL
% redraw : updates ERPset(s) on the GU... |
55158c75032c450a202e469e94f3c7553529741b97b2085ef0c9e14dffe2fc7d | MATLAB | 7,575 | 342 | function NeuralClassifierAnalysis_FiringRate
%-Stores Data for Classifier Analysis-%
%Metric: Firing Rate
%-Created 07/22/2017 JDY-%
clear all
close all force
clc
tic
if( isunix )
Path = '/Volumes/JUSTIN EXHD/DataStore/';
else
% Path = 'E:\DataStore\';
Path = 'C:\Users\sanesadmin\Desktop\JDYDataStore... |
6a4e088fed64845aa073da0b75f1f50f24524a0ea33b5b6b784fcb342370649d | MATLAB | 7,575 | 181 | % PURPOSE : Replaces string (alphanumeric) event codes with numeric ones, using an
% explicit mapping that you supply. Works directly on EEG.event, so it
% neither needs nor creates an EVENTLIST.
%
% FORMAT :
%
% EEG = pop_str2code(EEG, stringscode, numcode);
%
% INPUTS :
%... |
685f9cc942283502a9fcee88ab71b525a5e575efd1a49505286c8a8e2cb57384 | MATLAB | 7,582 | 265 | function [stats,st] = SStat_CoxStratPH(X,z,d,t,e)
% [stats,st] = SStat_CoxPH(X,z,d,t,e)
%
% Parameter estimation for the Stratified Cox proportional hazards model.
% Survival time ties are handled using Efron's method.
%
% Input
% X: Design Matrix with the time-independent covariates. (mxp, m # of
% subjects, p # of ... |
1284b255db588251359ac44e2f1ee00d20b57935b0c0ca62aa6b73df3eabdfcc | MATLAB | 7,592 | 146 | function [threshold,CI] = getThreshold(result, pCorrect, unscaled)
% function [threshold,CI] = getThreshold(result, pCorrect,unscaled)
% this function finds a threshold value for a given fit for different
% percent correct cutoffs
%
% result is a result struct from psignifit
%
% pCorrect is the percent correct at the t... |
f7e292fe15ae62d437b6900c5260d4664f1a450db97df05a43475c2b4da6622f | MATLAB | 7,643 | 220 | function [is_type,must_be_unique,must_ask,replace_existing] = fitzlabtestid(type, script, md, nameref, dirname, otherunlabeleddirs,ds)
% FITZLABTESTID - Identifies test directories for Fitzlab
%
% Conforms to the IDENTIFYTESTDIRGLOBALS standard.
%
% [IS_TYPE,MUST_BE_UNIQUE,MUST_ASK,REPLACE_EXISTING]=...
% ... |
2eef25b4652ba83366c502805a4537bea4b25fa3fcfb289699093af0e8093dc2 | MATLAB | 7,665 | 210 | function find_placement(iSubject, rootDir, method)
% iSubject = 1 for Subject1, 2 for Subject3
%
switch method
case 'relativeStd'
dispersion = true;
case 'norm'
dispersion = false;
case 'gamma'
dispersion = false;
otherwise
error('Invalid argument');
end
... |
3d761d602d0d9f749ac0be3de5710da83982b1cacc37f78418c5437291e22806 | MATLAB | 7,674 | 228 | function msg2endGUI(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @msg2endGUI_OpeningFcn, ...
'gui_OutputFcn', @msg2endGUI_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
i... |
cafc2eee5a4a2d0d907f4be68ec0b22c6c697981bca679ed8b65e949865d6dc3 | MATLAB | 7,698 | 234 |
%% get variables
if ~exist('repopulateDensity', 'var') || isempty(repopulateDensity)
repopulateDensity = 0.95;
end
if ~exist('minReturnTime', 'var') || isempty(minReturnTime)
minReturnTime = 10;
end
%%
thisDynamicsStream = timeSeriesData';
if size(thisDynamicsStream,2) >= 3
[pcaBas... |
3f262440bbefe82fbf54a62c9c1b1b3b78e50fa0da66be0705a36c48f32596f6 | MATLAB | 7,709 | 163 | function h = plotPsych(result,plotOptions)
% plot your data with the fitted function
%function plotPsych(result,plotOptions)
% This function produces a plot of the fitted psychometric function with
% the data.
% In the struct plotOptions you may set a lot of options, which are listed
% here with their default values:
... |
6eac4253dba012bfad3c0a73a9203a6d3328af87f404d3c64201e5751e28bd52 | MATLAB | 7,710 | 196 | function level84
% Level 95 - FRA
% This protocol for delivering stimulus leaves the spout completely open
% for a set amount of time with the assumption that the passive properties
% of the plumbing system have been optimized to delivery a slow continuous
% (~1/30 ml/s) stream of water.
%
% Tones are playe... |
1e96521d74c6831268216f8ba514f419df6494c4bd2d7a13708ba3dbd9d3c263 | MATLAB | 7,718 | 254 | %% BCI dataset, Ulster University
% Pipeline_group_avg_stat pipeline
% Writtern by Vahab Youssof Zadeh
% Update: 02/23/2022
clear, clc, close('all'); warning off
%% Initial settings
%- Brainstorm dir
bsdir = '/data/MEG/Research/BCI_Ulster/BCI5';
bs_path = '/opt/matlab_toolboxes/brainstorm3';
addpath ./functions
ft_p... |
6ee589a72abc5b0d4b8085a7207e4f0a638c8683e0289117419284fd20a8f8c4 | MATLAB | 7,726 | 206 | function [EEG,com]=pop_marks_flag_gap(EEG,mark_label,crit_dur_ms,new_label,new_color,varargin)
com = ''; % this initialization ensure that the function will return something
% if the user press the cancel button
% display help if not enough arguments
% ------------------------------------
if na... |
d74988c4da6273457a411fbbbfe122dd39d49a2fea14e5682ba8c535b04440c7 | MATLAB | 7,729 | 238 | classdef CDModel < handle
%CDMODEL Simplified version of the Competitive Dynamics model, similar to Layton, Mingolla & Browning (2012) JOV
properties
config
temps % MSTd templates. shape: MT rows, MT cols, FoE x, dx/dy
numTemplates
mt_ker_2d % MT spatial smoothing kernel
mstd_ker_1d % MSTd m... |
fc26d0596f482a3eda3e48e65a05b2825d264052755efd3699887122ea30bc50 | MATLAB | 7,737 | 275 | function plot_mode_eigenvectors
%
% Function to plot an individuals mode eigenvector trajectories over time
% and map to the k-means centoid assigned
%
% Fran Hancock
% Aug 2022
%
% fran.hancock@kcl.ac.uk
%
PROJECT = '/Users/HDF/Dropbox/Fran/Academics/PhD/matlab/projects/HCPEP_COMPARE/';
CON_PROJECT = '/Users/HDF/Dropb... |
eb85c66668e49634fcc80f6eef049cdf99f8a660d6d1610e82b4346a328145e8 | MATLAB | 7,758 | 213 | function varargout = shapedata_spikes(spiketimes,P,dimparams,varargin)
% data = shapedata_spikes(spiketimes,P,dimparams)
% data = shapedata_spikes(...,'PropertyName',PropertyValue)
% [data,vals] = shapedata_spikes(...)
% [data,vals,raster] = shapedata_spikes(...)
%
% Returns an N+1-dimensional matrix which can be use... |
476f47fd661541340d94b65b069921919036df26e994fe2dffc39658887e1ad0 | MATLAB | 7,762 | 215 | % calculates spatiotemporal spike-centered average (st-SCA)
% term spatiotemporal STA is used throughout--old naming convention
% Arguments
% file_id: patient id + recording id
% llfp_type: whitened or unwhitened
% data_site: Columbia or Harvard (for uploading the correct Utah map
% seizure_onset, seizure_end: seizure... |
11d71b7df7f8385bb77d84fd15357311e435ed2b8b602ed00fb64c0305fcac5e | MATLAB | 7,783 | 198 | function ObjFcn = makeObjFcn(XTrain,YTrain,XValidation,YValidation,Parm)
% the objective function is NOT based on Validation Error but on Other
% Measure (OthMes) such as sensitivity, specificty, auc etc.
%
% net: squeezenet, googlenet, efficientnetb0
net = Parm.net;% coder.loadDeepLearningNetwork(Parm.net);
measure=P... |
def302b77e9f64d95b4e62a4b582daa4813d143b2187a350a7b3a825126ac08e | MATLAB | 7,794 | 272 | function Normalised_objective_scores
% Script recreates figure 4 from the manuscript. This compares the normalised
% objecitve scores obtained from all algorithms, to data. Note, pseduodata
% is used in this repository, so minor differences in values between those
% caluclated here and displayed in the manuscript... |
65fe68d229ce4cf287db1b3df0f4fcc68b12ea46539b4b91f3f4c753e4e9bf56 | MATLAB | 7,796 | 233 | function [h, p, clusterinfo] = cluster_test(datobs, datrnd, tail, alpha,...
clusteralpha, clusterstat)
% CLUSTER_TEST performs a cluster-corrected test that datobs is higher/lower
% than the distribution as expected under the null hypothesis. The 'null'
% distribution should be pre-computed (manually or using CLUST... |
2e56d73e169c91dcf52b54fe3d580dad2020df65c94d3fcdb9119d576ef48eec | MATLAB | 7,801 | 264 | % PURPOSE : Calculates the FFT power spectrum of an ERP dataset
%
% FORMAT :
%
% pop_fourierp(ERP, chanArray, f1, f2)
%
%
% INPUTS :
%
% ERP - input ERPset
% chanArray - channels that need to be analyzed
% f1 - lower frequency range
% f2 - higher frequency range
%
% OUTPUTS :... |
305ec0bb4cc53d9b13dccae4009e8b751ca6e29124f82e4e59759a9cd9ea508c | MATLAB | 7,803 | 211 | function NextTrialID = TrialFcn_AversiveAnimalTrig_TrainTest(TRIALS)
% NextTrialID = TrialFcn_AversiveAnimalTrig_TrainTest(TRIALS)
%
% June 2015 RosenLab
% This is a modified trialfcn designed to run with FwdMask_AnimalTrig_ExpReady.prot
% It uses the custom boxfig GUI CondAversiveGUI.m, which has buttons to
% speci... |
07c62eaa2bbda64e09d159958ae9e3b8f3370e3d780c5ba6b50c8d4b1a8bc6fd | MATLAB | 7,809 | 349 | function NeuralClassifierAnalysis_kMeans
%-Stores Data for Classifier Analysis-%
%Metric: k-means
%-Created 07/24/2017 JDY-%
clear all
close all
clc
if( isunix )
Path = '/Volumes/JUSTIN EXHD/DataStore/';
else
Path = 'E:\PROJECTS\DataStore\';
end
Gerbil = GetGerbilIDs(Path);
%---Run Analysis---%
N = siz... |
1ee7e97f48abe0c22124145eadb00a6f37da13eea562f2d2dec47052af86cf27 | MATLAB | 7,817 | 262 | function varargout = external_stim_gui(varargin)
% BASIC_CHARACTERIZATION MATLAB code for basic_characterization.fig
% BASIC_CHARACTERIZATION, by itself, creates a new BASIC_CHARACTERIZATION or raises the existing
% singleton*.
%
% H = BASIC_CHARACTERIZATION returns the handle to a new BASIC_CHARACTERIZA... |
a8fb031ead2f45fcfdf7149ef793f180a9fe3a5a1c4ac7f17b424686b52e8c2a | MATLAB | 7,826 | 262 | function varargout = freq_tuning_gui(varargin)
% BASIC_CHARACTERIZATION MATLAB code for basic_characterization.fig
% BASIC_CHARACTERIZATION, by itself, creates a new BASIC_CHARACTERIZATION or raises the existing
% singleton*.
%
% H = BASIC_CHARACTERIZATION returns the handle to a new BASIC_CHARACTERIZATI... |
afa4ca2032916ff4809e6fa84eafcc982bf231af35562704a1a6fb5fb3be9dda | MATLAB | 7,830 | 186 | % PURPOSE : Export plotted figure to pdf
%
% FORMAT :
%
% pop_fig2pdf(fullname);
%
% INPUTS : NOTE: The plotted figure from ERPLAB must be open.
%
% Fullname - Pathname and filename, with .pdf extension
%
% OUTPUTS :
% .pdf - PDF
%
% EXAMPLE :
% pop_fig2pdf('C:\Users\etfoo\Desktop\S1\Figure_2_S1_ERPs... |
81542ace249ec32131900e05a5fd01d6b8d47bdebe229e9a6b85d1150e6494d1 | MATLAB | 7,848 | 220 | function fibers = place_fiber_cross_triangulation(endos, idFascicle, diam, ...
diamCounts, startCross, minFiberDist)
% PLACE_FIBERS Places fibers of each population in minimal cross-sectional
% area of the fascicle fascicles.
%
% [fiberPos] = place_fiber_cross(endos, idFascicle, diam, ...
% ... |
8743a151e5de8e209bbed84e4628714fb210cce6af10e37fd70c640410dad0ee | MATLAB | 7,859 | 249 |
function varargout = saveRTGUI(varargin)
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @saveRTGUI_OpeningFcn, ...
'gui_OutputFcn', @saveRTG... |
81c46cd045517d65fcad052ebabe9ed2d58c3251abe8d6c7c054b41b20ea880d | MATLAB | 7,877 | 201 | function ErrorFlag=MainFEM(Set)
% Computes FEM analsyis, writes VTK files and builds kimographs database.
% For plotting kymographs, see function:
%
% PlotFromKymo(dx,Ekimo,Skimo,Xkimo,Xkimo0,Velo)
%
ErrorFlag=0;
Set=SetDefaults(Set);
SetPaths();
fprintf('PIV File: %s\n',Set.DispFile);
fprintf('Reading Mesh\... |
3def03051f8d9f7084ef1c2623af40283bfe51dfe25612e92d0b606fa29136c6 | MATLAB | 7,881 | 286 | function [] = test_trace_norm_convex_clustering()
clc;
clear;
close all;
%% Set algorithms
weighted = 1;
lambda_weight = 300;
%dataset = 'synthetic';
dataset = 'synthetic_outlier';
%dataset = 'real';
%% prepare dataset
if strcmp(dataset, 'synthetic')
... |
8ba247ab1ad645925d3d6678f5ea33f3fa221cf6cea1a98367b7d454208f4367 | MATLAB | 7,885 | 238 |
% PURPOSE: subroutine for ploterpGUI.m
% identifies minimum and maximum values of ERP amplitudes for Y scaling for the selected single ERP or multi-ERPsets.
%
% FORMAT
%
% [yylim, serror] = erpAutoYLim(ALLERP,ERPsetArray, binArray, chanArray, xxlim)
%
% INPUTS
%
% ALLERP - ALLERPset
% ERPsetArray - in... |
821127a45c0e0cf46d0bdb608f85ca6de8a710af5460c7be1e27e2b18e2cb8c7 | MATLAB | 7,886 | 191 | function ObjFcn = makeObjFcn2(XTrain,YTrain,XValidation,YValidation,Parm)
measure=Parm.ObjFcnMeasure;
ObjFcn = @valErrorFun;
function [valError,cons,fileName] = valErrorFun(optVars)
imageSize = [size(XTrain,1) size(XTrain,2) size(XTrain,3)];
numClasses = numel(unique(YTrain));
%initialNumFil... |
9c490652f439971f783eb11b07c5bbf56343bfee928391fc96b2697da1bfec2e | MATLAB | 7,903 | 342 | clear all;
addpath('../');
% Gives me: X (labels), Y (data), time
tmp = load('../examples/testdata_2class.mat');
Y = tmp.Y; % Y: features x time x trials
X = tmp.X';
time = tmp.time;
label = tmp.label;
numF = size(Y, 1);
numT = size(Y, 2);
numN = size(Y, 3);
%% 1. No time dimension
sel_t = find(time >... |
6843301201af059f145af9c42622416aa882396ff38e08b3f16283b4339c1406 | MATLAB | 7,911 | 167 | % Package GMLM_dmc for dimensionality reduction of neural data.
%
% References
% Kenneth Latimer & David Freeedman (2021). Low-dimensional encoding of
% decisions in parietal cortex reflects long-term training history.
% bioRxiv
%
% Copyright (c) 2021 Kenneth Latimer
%
% This software is distributed unde... |
a61679d2737bf19da9a6fb1be6b01535a2005c61165938db8a796516235a18a8 | MATLAB | 7,928 | 190 | function ObjFcn = makeObjFcn2(XTrain,YTrain,XValidation,YValidation,Parm)
measure=Parm.ObjFcnMeasure;
ObjFcn = @valErrorFun;
function [valError,cons,fileName] = valErrorFun(optVars)
imageSize = [size(XTrain,1) size(XTrain,2) size(XTrain,3)];
numClasses = numel(unique(YTrain));
%initialNumFil... |
e86b3cc000bcaf1056c44a5fdd78e44523c1cd96c70ded9f142e41402afab89f | MATLAB | 7,934 | 264 | function varargout = jsonwrite(varargin)
% Serialize a JSON (JavaScript Object Notation) structure
% FORMAT jsonwrite(filename,json)
% filename - JSON filename
% json - JSON structure
%
% FORMAT S = jsonwrite(json)
% json - JSON structure
% S - serialized JSON structure (string)
%
% FORMAT [...] = jsonwr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.