sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
13ae3a39b562513a861d4440016f386db7ba39195a4973e671bb0d91dba031b0 | MATLAB | 1,874 | 83 | function [h,hdl] = fcn_boxpts(x,lab,cmap,samenum,names)
% clear all
% close all
% clc
% load boxdata.mat
% x = mu;
if ~exist('samenum','var')
samenum = 0;
end
h = hist(lab,1:max(lab));
sz = size(x);
if sz(2) > 1
lab = repmat(1:sz(2),sz(1),1);
x = x(:);
lab = lab(:);
end
if isempty(cmap)
cmap = j... |
9f65b312243894a8b6eef00a2377368e4f732e979f4ba97e114600d5839866c6 | MATLAB | 1,874 | 58 | function out = convert_6x6_to_1x21(in)
% function convert_6x6_to_1x21
%
% converts a tensor from a 6x6 to a 1x21 representation
% picks up the upper triangular elements to be used in the Cholesky
% formulation
%
% in_6x6 =
% [ xx*xx xx*yy xx*zz sqrt(2)*xx*xy sqrt(2)*xx*xz ... |
988a61bcdc8cca9e8bbe7d7d51e2dd0d39ea7456480864a4fea0f4c59ba89dfd | MATLAB | 1,880 | 52 | function dat = getEyeData(db,P)
n = 1;
Blink = db.blinkData;
Blink(:) = nanzscore(Blink(:));
threshBlink = double(Blink<-10); % arbitrary here but seems to fit quite well when manually checking the videos
if all(isnan(threshBlink(:)))
threshBlink(:) = 0;
end
threshBlink(isnan(Bl... |
eac3d32f51e9fa05c4055df297e5f1f51d5a83e43798769ccb88fefb6f102c32 | MATLAB | 1,882 | 66 | % clear all
clc;
clear;
close all;
%% Light microscopy data
% load full data set using bioformats
data_folder = 'W:\Image Processing Projects\Wojciech\data\20191002 - Data transfer + scripts\191002_3DFusion\Hyperspectral';
czi_name = 'G1_6_bottom.czi';
czi_path = [data_folder filesep czi_name];
data = bfopen(czi_path... |
bd2d24d9db7c6d1aeb44c3be55704c42ea258de181b8499a4405dede5001465a | MATLAB | 1,883 | 61 | function R = CAMcompute(Data,inputSize,net,netName,layerName,Dmat,Sample);
% R = CAMcomputeR(classActivationMap);
im = Data.XTrain(:,:,:,Sample); %cat(3,Data.XTrain(:,:,:,Sample),Data.XTrain(:,:,:,Sample),Data.XTrain(:,:,:,Sample));%imread('ngc6543a.jpg');
if inputSize(3)==3
if size(im,3)==1
im=cat(3,im,im... |
ced5287ad45545be883548966c5f9b930fc5210e61569617d7e7ab66ec8598eb | MATLAB | 1,883 | 60 | % File: ReadImage6D.m
% Author: Sebastian Rhode
% Date: 19.09.2016
% Version: 1.2
% Read CZI image data into image6d array
function out = ReadImage6D(filename)
% Get OME Meta-Information
MetaData = GetOMEData(filename);
% The main inconvenience of the bfopen.m function is that it loads all the content of an image ... |
436f74c8c5e6c7666adb9382e79e60d37b418d3fa0042e05bf549339ba7366e4 | MATLAB | 1,884 | 60 | clc; clear; close all
Fig3c = figure();
Ntrials_2 = 10000;
%Ntrials_2: number of learning cycles to learn the background containing the embedded pattern (step 2).
xax = 1:1:Ntrials_2;
N_mu=500; %There are \mu independent embedded patterns, 500 simulations (number of simulations)
%%%%%%%%%%%%%%%%%%%%%%%%%... |
2e1f6fba6cb946c1a3d87bd0c81984f55609a0d83e2c2fbd1b865c0202822af0 | MATLAB | 1,885 | 46 | function [maxCompsV, varargout] = max_v_comps(compartsV, nNodesMax, nCompartsPerSect)
% MAX_V_COMPS selects the voltage value of the node on or next to the
% highest voltage provided, together with as many compartments as possible
% up to the amount corresponding to the maximum number of nodes.
% maxCompsV = MAX_V_C... |
e7dfd397defc609bb4d4e60825e9590c3f13cab2dccca3c728866dc657455503 | MATLAB | 1,886 | 53 | function [handles,AX] = initializePhysiology_SanesLab(handles,AX)
%handles = initializePhysiology_SanesLab(handles,AX)
%
%Custom function for SanesLab epsych
%
%This function creates an initial weight matrix for common average
%referencing of multi-channel recordings. This initial matrix is unweighted
%(i.e. no common ... |
ecc62d7ab5c601102646ebf7e72973573593bece56ecee8889c850ef746ad0b5 | MATLAB | 1,890 | 82 | function [maxD,meanD,K] = genmodel_dist_wei(aij,bij,d_aij,d_bij)
% the distance function from generative modeling paper
% note the binary functions
evalfuncs = cell(4,1) ;
evalfuncs{1} = @(a_) sum(a_,2) ;
evalfuncs{2} = @(a_) clustering_coef_wu(a_);
evalfuncs{3} = @(a_) my_btwn_cent(a_)';
evalfuncs{4} = @(a_,d_) d_(tr... |
155500297bca8c022bf9cd88968a3c52da7067a36ef971dfda5f7ad65c2cd487 | MATLAB | 1,894 | 81 | function handles = capturesound_SanesLab(handles)
%handles = capturesound_SanesLab(handles)
%
%Custom function for SanesLab epsych
%
%This function captures sound from a live microphone and plots the voltage
%in the GUI display. Compatible with RPVds parameter tags that do or do not
%begin with '~'.
%
%Inputs: GUI hand... |
216c03dff1700b3900d7fd3f5fdb2e867c1cd47bf7c04a2d30f07b2b12b2e44d | MATLAB | 1,895 | 63 | function Dab = f_lap_dist(aij,bij,nComps)
% https://github.com/aiavenak/matlab_code/blob/master/f_lap_dist.m
% calculate the edit distance between two graphs A and B
% reference: Thomas Thorne and Michael P. H. Stumpf
% evolution Graph spectral analysis of
% protein interaction network
% ... |
42aa15b7ab56c598e4832940649db7bd68c3f0c812875a3ec8eb85631443a633 | MATLAB | 1,898 | 60 | function reset_slider(h)
% sliderFigure tool by Hill DN - 07/12/2010
%
% reset_slider - reset controls on a sliderFigure figure
%
% Usage:
% reset_slider(h)
%
% Description:
% Utility to reset the controls on a sliderFigure. This should be called
% if sliderFigure gets into a bad state, or whenever new axes ... |
bd8b73e84fbb5531777fb1fb5d18290868a0a112c870329acf9a158ac1b66253 | MATLAB | 1,898 | 57 | % DEPRECATED...
%
%
%
% Simple function to squeeze your EEG event codes.
%
% Author: Javier Lopez-Calderon
% Center for Mind and Brain
% University of California, Davis,
% Davis, CA
% 2009
%b8d3721ed219e65100184c6b95db209bb8d3721ed219e65100184c6b95db209b
%
% ERPLAB Toolbox
% Copyright © 2007 The Regents... |
4e5602a16e8d034c960ad83cb0ca79e087d6590b841237fc88f4ccdf64d8213a | MATLAB | 1,900 | 63 | function d=compute_normalized_dist(tli,tlj,cost)
% d=spkd(tli,tlj,cost) calculates the "spike time" distance
% (Victor & Purpura 1996) for a single cost
% tli: vector of spike times for first spike train
% tlj: vector of spike times for second spike train
% cost: cost per unit time to move a spike
% Modified by L... |
3ea114812d74daeeb386d55ffb00a39726846730d55e4f07e35fabda360f3d5e | MATLAB | 1,901 | 76 | function clipT = LoadAnnotations(self, clipT)
if self.VerboseLevel > 1
fprintf(' - Loading annotations... ')
end
clipTCollapsed = CollapseSequences(clipT);
Annotations = cell(size(clipT,1), 1);
for i = 1:size(clipTCollapsed,1)
vidName = clipTCollapsed.Video{i};
vidRows = clipTCollapsed.Rows{i};
cu... |
8db856c51f2207ae44ec708bb7316d9f14019ef327e17fb7afbe8c51731ace1b | MATLAB | 1,902 | 33 | % REMOVE BAD CHANNELS - CONSISTENCY METHOD Formula %
function [channel_amp_data_HighCutoff_logical, channel_grad_data_HighCutoff_logical, low_sig_range_all_channels_val_logical] = ...
bst_ast_remove_bad_channels_consistency_formula(all_amp_data, all_grad_data, chanAmpDevThreshold, chanGradDevThreshold, method)
... |
c9d5fedafcbf0099c3bfb578d06e4e3e28bcd99a1bbae8fc63612e9de7309617 | MATLAB | 1,902 | 69 | function e = UpdateRPtags(RP,TRIALS)
% e = UpdateRPtags(RP,TRIALS)
%
% RP is a handle (or array of handles) to the RPco.x returned from a call
% to SetupRPexp.
%
%
% TRIALS.NextIndex is the trial index which will be used to update parameter tags
% running on RPvds circuits
%
%
% See also, ReadRPtags, ... |
48fb096f4ee429b333883e7882a5a4bbbc57dc7f8708c8b75a269473bf08b661 | MATLAB | 1,903 | 63 | classdef Panel < matlab.ui.container.Panel & uix.mixin.Panel
%uix.Panel Standard panel
%
% b = uix.Panel(p1,v1,p2,v2,...) constructs a standard panel and sets
% parameter p1 to value v1, etc.
%
% A card panel is a standard panel (uipanel) that shows one its
% contents and hides t... |
50505975340bfd5595cc9744fd72722c66391c39edc283d687581c642f75579b | MATLAB | 1,905 | 60 | function varargout = myms(str,conn,DataReturnFormat)
% varargout = myms(str); % use mym
% varargout = myms(str,conn); % use Matlab Database Toolbox
% varargout = myms(str,conn,DataReturnFormat); % use Matlab Database Toolbox
%
% Wrapper function for mym and Matlab Database Toolbox
%
% Returns individu... |
a84db88e195a8666660837ff71d36313eeebbb4128f611c3055049c970f65657 | MATLAB | 1,905 | 65 | function motif = two_neuron_motif_classification(n1, n2, t1, t2)
% Two neurons are the same (two distinct neurons involved)
% Assume t1 <= t2
vec = [0,t1,t2];
n_distinct_times = length(unique(vec));
if n_distinct_times == 1
% Two neurons are the same, all times are the same
... |
20e44096134a963eacfcd9b7d766b2fde457ad4aaa94efefa69ee28011d79b9a | MATLAB | 1,909 | 71 | function TwoPhotonInit
TwoPhotonPath = which('TwoPhotonInit');
pi = find(TwoPhotonPath==filesep);
TwoPhotonPath = [TwoPhotonPath(1:pi(end)) ];
global TwoPhotonPlatform TwoPhotonSynchronization
TwoPhotonConfigurationSuccessful = 0;
try,
TwoPhotonConfiguration;
TwoPhotonConfigurationSuccessful = 1;
catch,
% either... |
294c3c2ce598fb2f6fc996a32e612e6879996ea9d8c46132e65164f7e26342ab | MATLAB | 1,911 | 58 |
classdef weightedClassificationLayer < nnet.layer.ClassificationLayer
properties
% Row vector of weights corresponding to the classes in the
% training data.
ClassWeights
end
methods
function layer = weightedClassificationLayer(classWeights, name)
% lay... |
4c371bf43a377800eaeb885fd9154e428e5f772f399b5c0b279df90987a6acc3 | MATLAB | 1,912 | 80 | function [figh, S] = setgcf(figname, action, varargin);
% SETGCF - find/create a named figure
% figh = setgcf(figname, action);
% Looks for/generates a named figure performes the requested action
% and returns the figure handle. If a figure of this name is not
% found a new one is created and its handle returned.
%
% ... |
6fb1d298e455f190561b6cbaecdf14ce1326e9f754a3fdb3d32c02bb552ee1d4 | MATLAB | 1,917 | 60 | function [Z,Z_mat]=plot_JSD2(Full_Parameters,Colors, parameters,subjects,simulations,plot)
% This function plots the JSD against the uniform distribution as grouped boxplots
paramnames= {
'h_{e}^{rest}' ,'h_{i}^{rest}','N_{ee}^{\beta}','N_{ei}^{\beta}','N_{ie}^{\beta}','N_{ii}^{\beta}','\Gamma_e',...
'\Gamma_i'... |
cd56d3bf7e4766c65019c96f25902f45734039aebcd63400edd7a3b943978bd4 | MATLAB | 1,918 | 52 | % movetype 1=append marks structure to the data array.
% 2=take appended marks from data array back to marks structure.
function EEG=marks_moveflags(EEG,movetype)
switch movetype
case 1
if ~isfield(EEG,'marks')
if isempty(EEG.icaweights);
EEG.marks=marks_init(si... |
3745e398cd14391102b0f1a0794cb0f825ef2382d06017185e96f89c2b3788ba | MATLAB | 1,920 | 40 | function result = CreateStructureForODataResult( odata_struct, odata_locations, odata_location_links )
%CreateStructureForODataResult Convert OData result to a structure
if(isempty(odata_locations))
loc_result = struct('ID', [], ...
'ParentID', [], ...
'X', [... |
5e060719e81ea2ff4b29632a67a6b47aefd4963e7812b0340a26fc0ee7dfd1e9 | MATLAB | 1,922 | 97 | %% some parameters to generate signal
dur = 10; % total stimulus duration (seconds)
nChan = 17;
speaker_separation = 15; % deg
Fs = 48848.125;
% Fs = 24424.0625;
ampScale = 0.6;
%% generate click train
click_dur = 0.005; % seconds
click_isi = 0.05; % seconds
clicksamps = round(click_dur*Fs);
isisamps = round(cl... |
30c1919077e52797abdbbefa3441aa4307f04eb94dfe166f4adefa8e1e5168e8 | MATLAB | 1,925 | 69 | function PlotDataRasters_OnvsOffTask
% Created 29 Nov 2017 JDY
% Edited 22 Jan 2018 JDY
close all
clc
%---FLAGS---%
subject = '253888';
% subject = '255183';
% subject = '255184';
session = 'WA';
OnBlock = '51';
OffBlock = '52';
Chans = [6];
Path = '/Volumes/YAO EXHD 2/PROJECTS/AM Discrim... |
866b0b55d8d1511d190e63a366753bacb059ca136be691ddca0550b778b00b7e | MATLAB | 1,925 | 66 | function plot_cross_section(model, args, plotArgs)
arguments
model Model = select_and_load_model();
args.AS = [];
args.Fasc = [];
args.Fibers = [];
args.SavePlot = true;
args.showTitle = true;
args.ShowSubTitle = true;
plotArgs.?CrossPlotProps;
plotArgs.logScale logic... |
67a10e35051002d21dec1c4048edf8772ac15ac6f082fee6f68d7b009a233849 | MATLAB | 1,926 | 40 | %%% To plot Arnold tongues, mean instantaneous frequency, and PLV of the
%%% Kuramoto model (potentially with dithering) based on data generated
%%% using code in the folder KM_genData
%%% 26-01-23 first commit
close all
clearvars
fpath_read = ['..' filesep 'KM_genData' filesep 'test' filesep 'workspace']; %pat... |
7f7a3d3a05b7fd4f157d8b31b0d00222a967113a9c3f1b91bcb48480dd7671e7 | MATLAB | 1,926 | 48 | %% Setup
util.clearAll;
outdir = fullfile(util.get_paths().figs,'Suppl_Fig_3');
util.mkdir(outdir)
c = util.plot.getColors();
%% Get the correlations of insular regions with the different communities
beta_tables_taste = util.load.all_taste_betas();
taste_names = beta_tables_taste.sep_table.Properties.VariableNames;
% N... |
5df9378796006b3f8699cd95a87b3ca2e21bb85cef9003e5604315abb08d9725 | MATLAB | 1,929 | 92 | % fresh start
clearvars
close all
%% run config
config_file='config_mammals_1.m';
addpath(strcat(pwd,'/config'))
run(config_file);
%% load data
filename = [ DD_INTERM '/con_mat_gn_kperm_stack.mat' ] ;
ll = load(filename) ;
allCon = ll.data ; clear ll ;
%%
n_animals = size(allCon,3) ;
allComms = cell(n_animals,1) ... |
0d531e8db109f7b9cd8140eebbba166ad4de475bd45382240a20db3522e055de | MATLAB | 1,930 | 59 | function TPPreviewImageFunctionListCompute(dirname)
% TPPREVIEWIMAGEFUNCTIONLISTCOMPUTE - Compute preview images for a directory
%
% TPPREVIEWIMAGEFUNCTIONLISTCOMPUTE(DIRNAME)
%
% runs all TPPREVIEWIMAGEFUNCTIONs in the list on the 2-photon data associated with the directory
% DIRNAME and saves the results to th... |
3235cab725f4ce91a14de9cf1348e9e4dc8947b13a511f9e509e2dd131636d0a | MATLAB | 1,930 | 46 | function [maxCompsV, varargout] = max_v_comps(compartsV, nNodesMax, ...
nCompartsPerSect)
% MAX_V_COMPS selects the voltage value of the node on or next to the
% highest voltage provided, together with as many compartments as possible
% up to the amount corresponding to the maximum number of nodes.
% maxCompsV... |
4b3e2fb3d25b3a77738938066c3266255514e5cf8bdd5a38fa8d63b6dab4042f | MATLAB | 1,931 | 55 | % *** This function is part of ERPLAB Toolbox ***
% Author: Javier Lopez-Calderon
% Center for Mind and Brain
% University of California, Davis,
% Davis, CA
% 2009
%b8d3721ed219e65100184c6b95db209bb8d3721ed219e65100184c6b95db209b
%
% ERPLAB Toolbox
% Copyright © 2007 The Regents of the University of California
% Creat... |
fec89be4ea00732fa32f53ab5bdfa5db83ee31dd6369b1e5c120ffe811a29eac | MATLAB | 1,931 | 47 | function [Y,LP]=ZeroMean(X,type)
% function Y=ZeroMeanCol(X,type) subtracts mean from all subsignals of the given type
% X 2-D or 3-D matrix
% type One of 4 options: 'col', 'row', 'both', 'CFA'
% Usage: Y=ZeroMean(X,'col') ... Y will have all columns with mean 0.
% Y=ZeroMean(X,'CFA') ... Y will have... |
ae5949afb1d0f9e70f4f6bd9d3cf924676938b9baf6a0f99fb9361100befd905 | MATLAB | 1,933 | 60 | function suite2p_importcells2stack(suite2p_Fall_file,lead_t,tpstack_file)
% SUITE2P_IMPORTCELLS2STACK - import cell drawings from Suite2p to vhlab-TwoPhoton-matlab
%
% SUITE2P_IMPORTCELLS2STACK(SUITE2P_Fall_FILE, LEAD_T_DIR, TPSTACK_FILE)
%
% Imports SUITE2P cell ROIs into vhalb-TwoPhoton-matlab stacks
%
% SUITE2P_FALL... |
f79b5d595494893aefb696ab1156c2f8a1c7606d6f2238ecc11b37d602b343d2 | MATLAB | 1,935 | 30 | function [WAKE_AllConditions,NREM_AllConditions,REM_AllConditions,WAKErel_AllConditions,NREMrel_AllConditions,REMrelTot_AllConditions,REMrelSleeptime_AllConditions,REMrelNREM_AllConditions]...
=VSamountTimewindow(VsTimecourseAnim, maxep,TimeWindow)
WindowLength=length([TimeWindow(1):TimeWindow(2)])/900;%length ... |
7f37a62e548ddfe676a42072db6b93f8306208b78fd2576e06f5ed69eef30761 | MATLAB | 1,940 | 68 | function [ ChildIDs ] = FetchODataChildStructures( endpoint, cellIDs, recurse )
%FETCHODATACHILDSTRUCTURES Return a list of the IDs of all child structures
%of cellIDs, including the passed IDs
if isempty(cellIDs)
ChildIDs = [];
return
end
options = ODataWebOptions();
numIDs = length(ce... |
732c8cb4b7edc730d2856d37cc08f0bbe4974803b94c34ca7eaf5eac2852ab24 | MATLAB | 1,941 | 62 | %SORT_TRIALS given a set of trials loaded from zip_load this will sort the
% trials based on the criteria you specify.
%
% sorted = sort_trials(zip_load()) Will sort the trials based on the
% execution order.
%
% sorted = sort_trials(zip_load(), [type], [method]). Type is one of:
% 'execution' - execut... |
0a29da2b916690b5155b9bfe5e7afb6b4fb7f8f48c9b05467916fabbde4503f4 | MATLAB | 1,943 | 52 | clear all
close all
target= 'PreSleep';
if ispc
home = 'C:\'; % [getenv('HOMEDRIVE') getenv('HOMEPATH')];
pat = [home 'Analysis\AssemblyAnalysis\Sleep'];
separator='\';
elseif ismac
path(path,'/Users/aleksanderdomanski/Documents/Bristol_work/assembly_analysis/MichalDataAna')
home = getenv('... |
51020f58057bf0376736a60dba90dcaa202b615ba7f33c5081dedb66ef0d534c | MATLAB | 1,944 | 48 | %
% Retrieve the color codes for a given (string) list of annotation areas
% fsAreaColorCodes = fsRetrieveColorCodes(fsAreas, annotColortable)
%
% fsAreas = a string cell array of the areas to look up
% annotColortable = the color table, read in using freesurfer's read_annotation
%
%
% R... |
87b296f3950667acf047e168fbbc48891d3bbf19c2db5ce4038eb03c8d684b3d | MATLAB | 1,947 | 93 | function [x, y] = organizeData(HT, DATA)
% [x, y] = organizeData(HT, DATA)
%
%Takes in HeadTracker(HT) and Data(DATA) variables from a given day and
%parses out the useful information, putting it all into one raw data matrix
%and one simplified matrix.
%
%x = [nTrial RespWin Target SecondsFromZero Azi Ele Roll]
% A... |
560fc95187397ac8609c3d6ef3c230f4f784dc6012b70c6462186cb949777748 | MATLAB | 1,948 | 77 | function U2=watsons_U2(A1,A2)
%
% U2=watsons_U2(A1,A2)
%
% Computes Watson's U2 statistic for nonparametric 2-sample testing of
% circular data, accommodating ties. The code is derived from eq. 27.17
% Zar (1999) and its performance was verified using the numerical examples
% 27.10 and 27.11 from that reference.... |
1bc8b299429ec70549dab4f06fe262c1db8581b1adab9791937ffa1ab4940335 | MATLAB | 1,949 | 59 | function [subject, session, channel, Spikes] = pp_launch_manual_sort( subject, session, channel, Spikes )
%
% pp_launch_manual_sort( subject, session, channel )
% Basically just launches the splitmerge tool from UMS. But if called
% with output arugments, will add all relevant variable to workspace,
% which f... |
bc4f646b69e3d599c63ae35b836bf4a986e1988e3f9f847f498815e590a28bfa | MATLAB | 1,949 | 78 | function [gfx, gfy, badChannels] = phasegradient(f, badChannels, angleFlag, surroundLocs)
% Calculates the phase gradient of complex matrix F
%
% Rory Townsend, Aug 2017
% rory.townsend@sydney.edu.au
sf = size(f);
f = f(:,:,:);
% Set default inputs
if nargin < 2
badChannels = find(isnan(sum(f, 3)));
end
if nargin... |
fb8891f486a45d6b58b637dfcc8f881536d639e1ae03efffcfee65bfbc50dc5c | MATLAB | 1,949 | 92 | function [x, y] = organizeData_2016(HT, DATA)
% [x, y] = organizeData(HT, DATA)
%
%Takes in HeadTracker(HT) and Data(DATA) variables from a given day and
%parses out the useful information, putting it all into one raw data matrix
%and one simplified matrix.
%
%x = [nTrial RespWin Target SecondsFromZero Azi Ele Roll]
%... |
0248097ad46caa5f5c42553684186e54cf60cd28dc32e64d07c5f374af8b9be4 | MATLAB | 1,950 | 42 | function save2ONE(dataPath,expRef,dat)
%%% This function will save the data in the ONE format.
savePath = fullfile(dataPath,expRef);
mkdir(savePath)
%%
% trials
saveONEFormat(dat.audiovisuoCode(1,:)',savePath,'_cb_trials','_cb_videoID','npy',expRef);
saveONEFormat(dat.audiovisuoCode(2,:)'... |
800e669490b70fa070180fa5ef3e054bbdacb93b931bc2822c6ceecdec24798a | MATLAB | 1,950 | 65 | function G = HVG_alg2(ts,left,right,G,t,weight)
% Code edited from the following: https://www.mathworks.com/matlabcentral/fileexchange/72889-fast-horizontal-visibility-graph-hvg-for-matlab
% Fast Horizontal visibility algorithm based on:
% Lan, X., Mo, H., Chen, S., Liu, Q., & Deng, Y. (2015).
% Fast tra... |
2ba0546f8fe90ac582f6ecf79522497f7e10874cfd2a2a818d3a5909e326f6e4 | MATLAB | 1,952 | 81 | %% Calibration Testing
clear all
%handles.RPfile = 'C:\gits\epsych\UserFiles\SanesLab\RPVdsCircuits\Cal_wave_test.rcx';
handles.RPfile = 'C:\gits\epsych\UserFiles\SanesLab\RPVdsCircuits\FM_sweep_test.rcx';
%Load in speaker calibration file
% [fn,pn,fidx] = uigetfile('C:\gits\epsych\UserFiles\SanesLab\SpeakerCalibrat... |
86b0661382a649d93b4cb040029b065a998c67a5dca40cf70eae7c277296426a | MATLAB | 1,955 | 40 | function ecog_ViewLight(th, phi)
%function loc_view(theta, phi)
%this function orients the brain and always puts the lighting behind you
%theta and phi are in degrees, not radians
%make sure the brain plot is your current axis
%this function rotates the brain and lighting to the spherical angle
%inputted. it ... |
c2b60c358fa987d40035073c50ba8f3c2f735f95eca77f49f939db37f3ee454a | MATLAB | 1,958 | 60 | function model = qtipm_pipe_SDPdcmSL(model,data,btensors,D0,mask,nvox,ind,parallel,cvxsolver)
% function model = qtipm_pipe_SDPdcmSL()
%
% reshape data and retain voxels within the mask
siz = size(data);
sizm = size(model);
data = reshape(data, prod(siz(1:3)), siz(4))';
model = reshape(model, prod(sizm(1:3)), sizm(4)... |
d3eb48ad4467718b5ef979cf6eb6370d0fe978aa41c0d9c31fa12bfc2bb1e398 | MATLAB | 1,958 | 70 |
function reformat_tank_data_jy(BLKS)
%reformat_tank_data
% Function to reformat and save ephys data from epsych program.
%
% Program prompts user to select TANK, then cycles through each BLOCK,
% calls TDT2mat (@DJS) to reformat tank data to a matlab struct, then
% saves as a -mat file in google drive folde... |
e77639b6c8818e3642efc064a353e5162246fc360e1ed0e68df2f72af7e1bfb1 | MATLAB | 1,958 | 40 | function b = TPPreviewImageFunctionListAdd(functionName, shortname, parameters)
% TPPREVIEWIMAGEFUNCTIONLISTADD - Add a 2-photon preview image function to the list
%
% B = TPPREVIEWIMAGEFUNCTIONLISTADD(FUNCTIONNAME, SHORTNAME, PARAMETERS)
%
% Adds the function FUNCTIONNAME to the list of 2-photon preview image fun... |
182f4db213beca5a414adf388d449964b735ad2c3767ba2dca1abd28cdf0a7c8 | MATLAB | 1,961 | 31 |
function PARAMETERS=set_PARAMETERS()
%parameters that apply to both study and test phases:
PARAMETERS.fix_cross_duration.averageTime=1;
PARAMETERS.fix_cross_duration.randomVariation=0.5;
PARAMETERS.font_size=40;
PARAMETERS.end_instruct = 'Task finished! Please press any key to exit.';
... |
11edd074a24372c80bfd6b1f099ea01336422038d5e46f3a6c09e46d0225995e | MATLAB | 1,962 | 61 | function plot_endoneuria(endosData, colorMode)
% PLOT_ENDONEURIA Plot the extracted geometry from STL files. When coloMode
% is 'branch' the plot is color coded based on the identified branches. If
% colorMode is a integer array the the plot is going to color code in blue
% only the fascicles whos IDs are in the ... |
7b458db15641de0e3f1022ddae2f64882968959f711b08f43cb1a1d1ab2c435b | MATLAB | 1,963 | 108 | function PlotBehaviorEphysFunctions
clear all
close all
clc
% Created 20 June 2017 JDY
%---FLAGS---%
NH = [{'236397'}];
CHL = [{'239151'}];
if( isunix )
Path = '/Volumes/JUSTIN EXHD/DataStore/';
else
Path = 'E:\PROJECTS\DataStore\';
end
%---Plot Control Data---%
nh = getdata(Path,NH);
plotdata... |
2c76b3c21ad1405f11c99073125c6bee445d4c041cd1374a3ace67d91cfbb99a | MATLAB | 1,970 | 58 | function [year1,VarName2] = import_json(filename, startRow, endRow)
%IMPORTFILE Import numeric data from a text file as column vectors.
% [YEAR1,VARNAME2] = IMPORTFILE(FILENAME) Reads data from text file
% FILENAME for the default selection.
%
% [YEAR1,VARNAME2] = IMPORTFILE(FILENAME, STARTROW, ENDROW) Reads data... |
3468a2f3986ac49c8e3edc62a44b2dc71ee590ecc8aadff42f905b6666c3ff10 | MATLAB | 1,971 | 55 | %This is a function that calculates cluster types for neuronal data.
%Created by Haleh Fotowat
function [CCStimMot,trial_ave_mat,stim_mat] = ClusterTypes(repse,stim_type_cnt,F_dff_pool_all,ISI,Motor,fn,fps,per2p,stim_size_degrees)
%This is a function that clusters data through first dividing into cells
%with different ... |
53bbdc2c6c2d9aac827ef73b9f1aeeed9c35d31cbc5c4a1f20dfab06ae56c2c6 | MATLAB | 1,972 | 29 | function [input, targetF, targetV,label,time] = LSTM_Separate_trials (DataL,SF,pattern)
Ind = find(contains(SF,pattern)); % creat a list of SF elements that belong to the specific Surface-Foot combination (pattern)
input = cell(1,numel(Ind)); % creating input cell for SRS values for trials corresponding to the sp... |
2e5ced01793a46443d467536525adbbde4bc1355d8dec1b31b34df9f45593535 | MATLAB | 1,973 | 21 | % To plot the overlaid connectivity maps of all cells for one cell type,
% load the corresponding .mat file of that cell type located in this folder,
% and then run the this code.
anat_figure = figure; subplot(1,2,1); hold on
scatter(dML_spiking_cells_masked(~isConn_spiking_cells_masked),-dDV_spiking_cells_masked(~isCo... |
fc219c06d152ce5e4102b9d54f171b1d48b6ad91391f7bc2db033631a5458873 | MATLAB | 1,973 | 60 | function [AUC,C,Accuracy,ValErr] = DeepInsight3D(DSETnum,Parm)
%[AUC,C,Accuracy,ValErr] = DeepInsight3D(DSETnum)
% DeepInsight3D function
% DSETnum is the number of dataset; e.g. dataset1.mat. dataset2.mat,...
%
% AUC (for 2-class problem) otherwise returns an empty matrix
% C is the confusion matrix of the test set
% ... |
2b8217b00ab7117ef77edabc5c070c220f018eac7cba271368dcc64906ed887f | MATLAB | 1,976 | 54 | function ieeg_label(els,varargin)
%
%
% Examples:
% 1) ieeg_label(els)
% 3) ieeg_label(els,20,10,electrode_names)
%
% 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 Softwar... |
56e4599454a15aea05386ad06b9f59d5bbc0b1a518db85b18b02a770832ec473 | MATLAB | 1,977 | 64 | function [sX,sY,ni,ssID] = sortData(X,tcol,Y,sID)
% [sX,sy,ni,ssID] = sortData(X,tcol,y,sID)
%
% This function sorts the design matrix X and the data Y according to
% subject's ID (sID) and according to time within each subject.
%
% Input
% X: Design Matrix (nmxp, nm total # of measurements, p #of fixed effects).
% ... |
4b6a692655fdb8f58c0d5208675b67057473dd90b2617aabce9c7eee5b8fa64a | MATLAB | 1,979 | 75 | % Convert PLX file to Matlab file for Uploading using DB_UploadUtility
plxdir = 'D:\DataProcessing\HANSOLO\HANSOLO_20160519\plx\rep\preproc\presort\sorted\REWARM';
minSpikes = 50;
make_all_MUA = false;
allchannels = true;
% trodes = num2cell(1:32);
% trodes = num2cell([1 3 4 7 9 13 18 19 22 25 26 31]);
plxes = d... |
a45fc45ebb769b6dd076c94c05dac431d3691638c5701541aa9a4dd8f5262f32 | MATLAB | 1,985 | 80 | function seqT = SplitClipDataIntoSequences(self, clipT)
seqLen = self.ConfigFile.GetParams('SequenceLength');
ClipNumber = [];
Video = {};
Type = [];
colNames = clipT.Properties.VariableNames;
singleValPerClipVars = {};
for i = 1:length(colNames)
currVar = colNames{i};
if iscell(clipT.(currVar))
if ... |
4e71933e3da0117a1bad727e5f4f86303d7c7eb11dad408eefcadc6a027fde5b | MATLAB | 1,990 | 50 | tic
fslDirectory = '/home/project/fsl/bin'
referenceGroupList = textread('reference_group_list.txt','%s')
comparisonGroupList = textread('comparison_group_list.txt','%s')
meanRefImageName = 'mean_ref_fish_image.nii'
sdImageName = 'std_fish_image.nii'
referenceFishImage = 'standard_ref_dis.nii';
%% Set the FSL ... |
9b3559de0ac99ad448b2c0035b30d6c72506f4b99e5381c89727c09370ee89d0 | MATLAB | 1,990 | 72 | %%
clear all
close all
run(['..' filesep 'def_local'])
addpath(path_fieldtrip)
ft_defaults
%%
allfiles={'405','406','407','408','409','410','411','412','413','414','415','416','417','418','419','420','421','422','423'};
% TFR params
tlen = 1;
fres = 1/tlen;
minf = fres;
maxf = 30;
tstep = tlen/10;
twin = [-2, 12];
... |
85c5930a0763dce1327812990032d6882cfeee3097b662702b50804b7f93cf74 | MATLAB | 1,991 | 84 | % PURPOSE: subroutine for ploterpGUI.m
% Creates default X ticks for ERPLAB's plotting GUI
%
% FORMAT
%
% def = default_time_ticks(ERP, trange)
%
% INPUTS
%
% ERP - ERPset
% trange - min and max ERP window time in ms
%
% OUTPUT
%
% def - tick values to show in x axis
%
% *** This function is par... |
26ebc3b99a5e2876a88deb4cf4f22c788fcce19d638e5742faf1deb4d90ad418 | MATLAB | 1,992 | 85 | %% NBRIF
tank = 'ZAZU_2';
block = 11;
win = [0 0.1];
data = TDT2mat(tank,sprintf('Block-%d',block),'type',[2 3],'silent',true);
%
emap = [17 31 19 29 21 27 23 25 18 32 20 30 22 28 24 26 1 15 3 13 5 11 7 9 2 16 4 14 6 12 8 10];
chans = data.snips.eNeu.chan;
levels = data.epocs.Levl.data;
ulevel = unique(levels);
on... |
2182beffccc8cd98baa66ae640ce61884dda22ed74db2c1809426ccd17c2ecb5 | MATLAB | 1,993 | 88 | %% Prepare Psychtoolbox
Screen('Preference', 'SkipSyncTests', 0);
PsychImaging('PrepareConfiguration');
PsychImaging('AddTask', 'General', 'FloatingPoint32Bit');
PsychImaging('AddTask', 'FinalFormatting', 'DisplayColorCorrection', 'ClampOnly');
PsychImaging('AddTask', 'General', 'EnableBits++Mono++Output');
rc = Ps... |
233279818d224035b30a543d807dbfc5c351c29e91169ab1d7efd90eeec89031 | MATLAB | 1,993 | 96 | function gseq = randGellerman(n,plotseq)
% gseq = randGellerman([n],[plot_sequence])
%
% Returns randomized trials for two-alternative forced choice task based on
% the rules outlined by Gellerman, 1933.
%
% n ... scalar integer value determines length of sequences
% Note that not all values will ... |
73d0b300116b1c33afcfd52192c55ca22afb6f74c332f19117e81d7574229a0e | MATLAB | 1,993 | 47 | function [ projectHome, CUDAdirectory, CUDAlibSubdirectory, MATLABdirectory, sourceDir, objDir, mexDir, mexSourceDir ] = myCUDAPaths( )
%MYPATHS this function contains path information to the CUDA and MATLAB folders.
% This is used for compiling CUDA files into mex files.
%% 1. Set absolute path to the base dir... |
c2f39c7b3c4b033a08f8c6c691668c2b9d68ca89a91d10a771e55f3150646556 | MATLAB | 1,994 | 64 | %% Code which contains the parameters:
function [x,v,s,h,f] = parameters
curdir = pwd;
init;
cd(curdir);
%% Control the fine tuning of the bifurcation here:
% you can increase or decrease the step size, total number of points etc
% here:
opt = contset;
opt=contset(opt,'Singularities',1);
opt=contset(opt,'MaxNumPoints'... |
b0e06206e43908ad8d662268726135af8a182c5e760351ff66008cdde968571c | MATLAB | 1,996 | 50 | tic
fslDirectory = '/home/ejh22/project/fsl/bin'
referenceGroupList = textread('reference_group_list.txt','%s')
comparisonGroupList = textread('comparison_group_list.txt','%s')
meanRefImageName = 'mean_ref_fish_image.nii'
sdImageName = 'std_fish_image.nii'
referenceFishImage = 'standard_ref_dis.nii';
%% Set th... |
bbe785953a3e8d0f7375c022aa4a249e39e8e0ec53f6b931141b90c03876adf8 | MATLAB | 1,996 | 64 | %% Code which contains the parameters:
function [x,v,s,h,f] = parameters
curdir = pwd;
init;
cd(curdir);
%% Control the fine tuning of the bifurcation here:
% you can increase or decrease the step size, total number of points etc
% here:
opt = contset;
opt=contset(opt,'Singularities',1);
opt=contset(opt,'MaxNumPoints'... |
de4041e097e0779a51547b4976ca870ff2893a6783dfb7e3f8fa4ccf9f34daba | MATLAB | 1,996 | 54 | function index = windingNumberAngles(vx, vy, loc, radius, type)
% Estimate the winding number (Poincare index) around a circle of radius
% RADIUS centred on the the row and column coordinates in LOC in the vector
% field defined by VX and VY, by computing the angular differences between
% all consecutive vectors. TYPE ... |
f8dca4783186930b4ef657cb41c20ab3192b668ef4995c079161f6d6e9b79a75 | MATLAB | 1,996 | 116 | function C = TrialFcn_TemporalSlewingPTB(C)
% C = TrialFcn_TemporalSlewingPTB(C)
%
% Noise/Flash temporal slewing. Uses the PhotodiodeMarker to initiate a
% 'trial'. TDT generates noise stimulus with some specified delay
% following photodiode onset. PTB generates a screen flash at a specified
% delay.
%
% Stim.Flas... |
81547528fbb76dde297d450a66cef4557e008c7450dc621285ae47c7db51db31 | MATLAB | 1,997 | 62 | function [evtB,Clr]=ShowM_ASSEM(Tmtx,iFR,CL,iFRred,ret,TrCol,sc)
% Plot a heatmap timeseries showing the activation pattern of lots of assemblies
%
% Aleksander PF Domanski PhD UoB 2015
% aleks.domanski@bristol.ac.uk
if nargin<4, iFRred=[]; end;
if nargin<5, ret=0; end;
if nargin<6 || isempty(TrCol), TrCol='k'... |
d82550115c2fa7a7fbf71f48bdb489b9b086fce56ec9e051770307bd7edeaa0a | MATLAB | 1,998 | 64 | %% Code which contains the parameters:
function [x,v,s,h,f] = parameters
curdir = pwd;
init;
cd(curdir);
%% Control the fine tuning of the bifurcation here:
% you can increase or decrease the step size, total number of points etc
% here:
opt = contset;
opt=contset(opt,'Singularities',1);
opt=contset(opt,'MaxNumPoints'... |
dd38bc32be5d2c7e35c277d33ff18e81c29295b590e3c68c4c7784737ee98894 | MATLAB | 1,998 | 64 | %% Code which contains the parameters:
function [x,v,s,h,f] = parameters
curdir = pwd;
init;
cd(curdir);
%% Control the fine tuning of the bifurcation here:
% you can increase or decrease the step size, total number of points etc
% here:
opt = contset;
opt=contset(opt,'Singularities',1);
opt=contset(opt,'MaxNumPoints'... |
676b56a42c8f0a7605e5f15d39ab94aec07ef568c7e81b1eb107826da0836b99 | MATLAB | 2,001 | 51 | function matrix = get_pce_matrix_iterate(res_list, cluster_list_with_image_idx, merged_cluster_num, img_dim, dir, iter)
% This function compute PCE matrix which includes pairwise PCE correlation among all current clusters.
% INPUT:
% res_list A list of residual paths
% cluster_list_with_image_idx A list o... |
8e4c958131cf1b5dfe904f1e865017b14ce7ea4828ee51ed62cde22ed18b6cce | MATLAB | 2,001 | 46 | %PAL_arbLogistic Evaluation of an arbitrary Logistic Psychometric
% Function. The "arbitrary" refers to the fact that the location (aka threshold)
% parameter is flexible. It does not have to correspond to the midpoint between
% the upper and lower asymptotes. Instead, it can be any arbitrary proportion.
% ... |
187119407b636ceded6d4ac80e57fc36429e45cbfe4f12105dba2d7b66a98e53 | MATLAB | 2,005 | 80 | clc; clear; close all
Fig5c=figure();
NN = 500; %number of afferents
N_mu=500; %There are \mu independent embedded patterns, 500 simulations (number of simulations)
Results1=zeros(N_mu,NN); % w_{\itBP}
Results2=zeros(N_mu,NN); % w_{\itBPB}
Results3=zeros(N_mu,NN); % w_{\itBPBP}
Results4=zeros(N_mu,NN); %... |
4b916e62f8075934a164143642826d50f2c5992172302e99cec19f77680616bb | MATLAB | 2,006 | 41 | function spikes = merge_clusters(spikes, to, from)
% UltraMegaSort2000 by Hill DN, Mehta SB, & Kleinfeld D - 07/09/2010
%
% merge_clusters - Merge two clusters after automatic hierarchical aggregation.
%
% Usage:
% spikes = merge_clusters(spikes, to, from)
%
% Description:
% SPIKES = MERGE_CLUSTERS(SPIKES, TO... |
81da3e5a0843e23177bc33217af4c3afdd335dfc3a417e90facecc6517c8c8c1 | MATLAB | 2,006 | 62 | %% Reorder channels according to the standard 10/20 (and extended 10-10) system.
%
% Channels whose labels match the canonical list are placed first, in
% front-to-back / left-to-right order. Non-matching channels (eye
% channels, mastoid references, bipolar derivations, etc.) are appended
% at the end in their origin... |
1f0e5d65f536015bb8657eb1862149f2c03bf18d9a50648bc9fe557b390f99e2 | MATLAB | 2,007 | 56 | clear all
close all
target= 'Task';
if ispc
home = 'C:\'; % [getenv('HOMEDRIVE') getenv('HOMEPATH')];
pat = [home 'Analysis\AssemblyAnalysis\Sleep'];
separator='\';
elseif ismac
path(path,'/Users/aleksanderdomanski/Documents/Bristol_work/assembly_analysis/MichalDataAna')
home = getenv('HOME... |
e99b99d4e77bf9f68469391f261bec43c98860bdd6b3369c3b480667a015603e | MATLAB | 2,007 | 48 | clear
subjfolder = dir('F:\fMRI_QC\fmri-open-qc-rest_bias_corrected\sub*');
for subji = 91:length(subjfolder)
fprintf('extracting pca components for subject %d',subji)
% load masks
v_WM = spm_vol(fullfile('F:\fMRI_QC\fmri-open-qc-rest_bias_corrected', subjfolder(subji).name, 'masks', 'mask_WM_99.nii'... |
80913cf6bc5bdbc3f4fee439b68c61153c2fe920179f374a127818b179bbaf01 | MATLAB | 2,008 | 63 | function decoder = train_pattern(cfg0, X, Y)
% [decoder] = train_pattern(cfg, X, Y)
% Linearly estimates the feature pattern corresponding to activity in a latent component as
% prescribed in X. Several patterns may be trained indepedently, corresponding to several
% latent components.
%
% X Vecto... |
9c7e789b61fe58424dda5e43af52b8e637c3cdf85e8971cd19237602b2524bc6 | MATLAB | 2,009 | 76 | function decoder = train_LDA(cfg0, X, Y)
% [decoder] = train_LDA(cfg, X, Y)
% Trains a linear discriminant analysis decoder.
%
% X Array of length N, where N is the number of trials, that specifies the class
% label (0 or 1) for each trial.
% Y Matrix of size F x N, where F i... |
555791276c37713755f6cc6114029d4e8ed12b5beacf1ff76311ebb1e82f9c54 | MATLAB | 2,011 | 102 | %% ECoG Map
tank = 'THYME_ECog';
block = 3;
% emap = [1 5 9 13 20 24 28 32; 2 6 10 14 19 23 27 31; 3 7 11 15 18 22 26 30; 4 8 12 16 17 21 25 29]';
emap = [1:4;5:8;9:12;13:16;20:-1:17;24:-1:21;28:-1:25;32:-1:29];
win = [0.0 0.05];
denoise = 1;
scaleall = 0;
data = TDT2mat(tank,sprintf('Block-%d',block),'type'... |
ffbaf5671b1c6ceb13e117102e2c23cbe9d5e66a5bd693f6875cad1608eed9b9 | MATLAB | 2,015 | 57 | %% Setup
% This script is for checking the controls
% TODO: First step: keep the high and low betas separate and get the rinse
util.clearAll;
outdir = fullfile(util.get_paths().figs,'controls');
util.mkdir(outdir)
%% load the data and combine betas
% Read beta values and calculate their correlation
% TODO: First ste... |
20853118767dec635be57c2b702faa16c43e8059f67ded5ffa599e00c01747ef | MATLAB | 2,016 | 40 | function [new_positions,gfiltered_CSD] = gaussian_filtering(positions,unfiltered_CSD,gauss_sigma,filter_range)
%function [new_positions, gfiltered_CSD]= ...
%gaussian_filtering(positions,unfiltered_CSD,gauss_sigma,filter_range)
%
%This function filters the CSD using a gaussian filter.
%
%positions: The CSD position... |
58bb87e02e573ca1ce387936d093b3c2902cb56f32acb1824163a97fb4e679a3 | MATLAB | 2,016 | 84 | function varargout = DB_GetWave(channel_id,epoch)
% W = DB_GetWave(channel_id)
% W = DB_GetWave(channel_id,epoch)
% [W,T] = DB_GetWave(...)
% [W,T,P] = DB_GetWave(...)
%
% Retrieve wave data for channel_id bounded by the values in epoch. Epoch
% two scalar values in seconds (ex: [10 100]) restricting the data a... |
b2eb89b85c646053f74584951f3dafb41f20e66368012195782e98a16d896781 | MATLAB | 2,016 | 58 | clear all
close all
target= 'PostSleep';
if ispc
home = 'C:\'; % [getenv('HOMEDRIVE') getenv('HOMEPATH')];
pat = [home 'Analysis\AssemblyAnalysis\Sleep'];
separator='\';
elseif ismac
path(path,'/Users/aleksanderdomanski/Documents/Bristol_work/assembly_analysis/MichalDataAna')
home = getenv(... |
67333e2d6005b543cb0c18517e16c1dc4121324c9fd7409a3c5db583e2465d77 | MATLAB | 2,017 | 64 | function update_USERDATA_SanesLab(Next_trial_type,NextTrialID,TRIALS)
%update_USERDATA_SanesLab(Next_trial_type,NextTrialID,TRIALS)
%
%Custom function for SanesLab epsych
%
%This function updates the global variable USERDATA.
%
%Inputs:
% Next_trial_type: String indicating the type ('GO', 'NOGO' or 'REMIND") of
% ... |
92179a8ca614faf9236d633c8c1432602b3027798115ccddf1e5c418198cd0cf | MATLAB | 2,017 | 75 | function plot_LFP_rf(W,P,param,cfg)
% plot_LFP_rf(S,P,param,cfg)
%
% For use with DB_QuickPlot
%
% DJS 2013
win = [cfg.win_on cfg.win_off] / 1000; % ms -> s
svec = floor(win(1)*P.wave_fs):round(win(2)*P.wave_fs);
% Organize by stimulus onsets
onsamp = round(P.VALS.onset * P.wave_fs);
% Reorganize by s... |
b2a0614eb49c519a5e3a808fad315dddd6dda081b99875c9e668392fcb111e8f | MATLAB | 2,018 | 83 | function Y = signalPath(signal,modpath,C,gw_alpha,upsample)
% Y = signalPath(signal,modpath,C,[gw_alpha],[upsample])
%
% Apply gaussian kernel across channels following any arbitrary path.
%
% Input:
% signal ... 1xN signal to be spread across nChan channels
% modpath ... 1XN signal modulating signal across nCha... |
23e07a4fa506a1627b80071ae60cff29413cebeea1eed5a5ed4fbde9442e6341 | MATLAB | 2,019 | 43 | function PE=DecodePredErr(FR,evt0,reg)
% CVE decoding on erroroneous behavioural trials
%
% (c) 2014, Daniel Durstewitz, Dept. Theoretical Neuroscience, CIMH
% Mannheim/ Heidelberg University
% Edited by Aleksander PF Domanski PhD UoB 2015
% aleks.domanski@bristol.ac.uk
%
% Input Variables:
% FR: Firing rate matrix [... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.