sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
39b830ebc690e76ef1a5842b7706a33081ca39fe11f4177c217d65c4a22c3da1 | MATLAB | 1,864 | 46 | function mean_values = mean_percentile(data, lower_percentile, upper_percentile)
% Function to calculate the mean of the data within the specified percentile range for each column
% Input:
% data - a matrix where each column represents a separate dataset
% lower_percentile - the lower percentile (e... |
d7782e743ae3cdf2f6e2f66077063eed43dd485efcd2fb32c2014a35722ed626 | MATLAB | 1,866 | 61 | function [x2] = BaseLine2(x,L1,L2,approach)
%
% b = BaseLine2(x,L1,L2,approach),
% Baseline wander extraction from biomedical recordings, using two stages
% of median or moving average filtering.
%
% inputs:
% x: vector or matrix of noisy data (channels x samples)
% L1: first stage averaging window length (in samples)... |
4babcd5b96f1dc27a60007a126fe465265204f734ff8877b2fc50714ae42bbaa | MATLAB | 1,867 | 73 | % Use this to check the effects of the narrowband filtering on the EEG
% data.
clear
clc
close all
load("G:\Sara\Matlab\GIT\GitHub\Matcycle\example_data\EEGbroadband_fulltime.mat", "EEGbroadband")
DataBroadband = EEGbroadband.data(3, :);
SampleRate = EEGbroadband.srate;
t = linspace(0, numel(DataBroadband)/SampleRate,... |
b5e59ba8336b250c2db1da7be9405ddae0ccd94a0e62ce8be7ab57aa0538bc76 | MATLAB | 1,867 | 72 | function [S2, Q2, X_new3, qpc] = consensus_comm_wei_gplus(C,gplusValues)
% FUNCTION: To identify consistent communities in an ensemble
%
% OUTPUT:
% S2 is a pxn matrix of new community assignments
% Q2 is the associated modularity value
% X_new3 is the thresholded nodal association matrix
% qpc is the quality of the ... |
cb2a92d05d61a19c9b5ac7ea070f4b6cb0478dcfd453d28d6582ae21b6e108a7 | MATLAB | 1,868 | 59 | %% Plot Venn Diagram
% Input
% ActivityGroups
% Output
% Plot
function plotvennActivity(ActivityGroups)
% 3 main SEPARATED groups:
KeepDoPlot=true;
if isempty(intersect(intersect( ActivityGroups.Nfac, ActivityGroups.Nunc),...
ActivityGroups.Ndep))
fprintf('>>OK')
AllCells=union(union( ActivityGroups.Nfac, ... |
fddbddd8838d4d17e2ce4878aebd8fb1cfe021db7bd2b1b2d28f1d890392cf8d | MATLAB | 1,868 | 43 | % Computes the metastatic mass via a first order quadrature
% Growth PT follows model growth_model_PT (with parameters param_PT)
% Growth of Mets follows model growth_model_met (with parameter set param)
% flagNb = 0 or 1 depending on whether we want the number of mets to be
% computed or not
% Model is designed to be... |
026a39ea1d3f8fd032f5e59a780ecb3bd5616a44821fbbd738de1dd6d20c266a | MATLAB | 1,870 | 50 | function curate(obj)
%CURATE Spin up the manual GUI for curation
if isempty(obj.res)
obj.loadFiles();
end
obj.isCurate = 1;
if ~isfield(obj.res, 'spikeTimes') || isempty(obj.res.spikeTimes)
error('no spikes to curate');
end
if ~isfield(obj.res, 'hClust')
dlgAns = que... |
1498de4ba320cc51bda2927a986b773880f0b1f25be56aa4a93b54ad26fa9d03 | MATLAB | 1,870 | 61 | classdef IntanTest < matlab.unittest.TestCase
%INTANTEST Test Intan recordings
properties
hJRC;
intanRes;
end
properties (Dependent)
hCfg;
end
%% SETUP
methods (TestClassSetup)
function setupProps(obj)
hCfg_ = jrclust.Config(fullfile(getenv('... |
6fbda9ffe9366513385c5fc0e057d1f9b8ad95c7003c42cbbda3e6a4bc263c8c | MATLAB | 1,872 | 66 | function [icasig, W]=milcadelay(x,kneig,algo,emb_dim,emb_tau,harm,finetune,PCAflag)
% Mutual information based least dependent component analysis including
% additional the time structure of the input
% Output: most independent components under linear transformation and the transformation matrix
% x....input data mxn ... |
04414ab09fa1586af7ac778f9712cb0036f7256f56b76d1abdfa502ef9e26b97 | MATLAB | 1,874 | 31 | function out = retroMocoBoxVersion
out = '1.0.2dev';
% 1.0.2dev - Sep 26 - update the 'standard fatnav' to 2mm resolution,
% larger FOV. Also changed registration to standard
% from spm_realign to spm_coreg
% 1.0.1dev - Update how the circshift is handled
% 1.0.0dev - MAJOR OVERH... |
e86abbd7f0248a5f4f9a4abe38466b6d5edf45134df4baea65be01ce08a1a098 | MATLAB | 1,875 | 79 | %% Please first run s1_Predict_Rsp.py to generate PRsp.mat before run this code
load('PRsp.mat')
load('../../Additional_Data/ROI.mat')
%% Normalized each cortical pixel's responses to [0,1]
NRsp = zeros(size(PRsp));
tnum = 9;
for ii=1:128
for jj=1:128
if ROI(ii,jj)>0
tmp1 = PRsp(:,ii,j... |
f79734d7f4a4894cfb260d4d7f5126cd143c985debf0e4978a79b08024c49e2a | MATLAB | 1,878 | 54 | function [Data2]=mnl_ChromaticAbberationCorrectionZ4(Data,Scale,mValues,cValues)
%Function to correct for the chromatic abberation, based on bead data
%extracted from the codes 'mnl_Pipeline_MeasurePSFandCA' and
%'mnl_MergeBeadData'
%
% Inputs
% Data - Original Data (x*y*c*z)
% Scale - x*y*z Scale of the image
% WhichL... |
4dd5b75a290d63da6215f93e98699f0be8fe785ee064520720ca9fa30fb5ce6a | MATLAB | 1,882 | 48 | function [gam_grid_both, shuffle_both] = pyGAM_pyr_nogrid_shuffle(y_array_bvd, X_arrayboth_vel, x2shuffle, np, lams, shift)
% Perform Poisson GAM fitting and shuffling analysis
% Create a GAM model for original data
gamboth = np.GAM(pyargs('distribution', 'poisson', 'link', 'log'));
gamboth = gambo... |
29466713ed66679111f0a7359006f2ee49adfddb75a0bdc24f5adab4b8a31923 | MATLAB | 1,883 | 47 | % load data array
load('E:\Data_array\AllTrials_100bin_noSmooth\data_array.mat')
mainDir = 'E:\CM_Behavior_Analysis\firstHit_distribution';
recSites = {'left S1', 'left S2', 'left wM2','left ALM'};
B=2; % number of blocks: respond-to-touch and respond-to-light blocks
S=2; % number of stimuli: tactile and visual st... |
6ffd6031537c12ac44e11a873aef519b2c2f7cf976740baf6d85fea6c7eec266 | MATLAB | 1,883 | 47 | % rawDataFile = ''; % <-- this variable should now be set in calling script for cluster submission
% _skipMoCo version strips out all MoCo to speedup getting through ASPIRE
% pipeline for testing
if ~exist(rawDataFile,'file')
disp(['File ' rawDataFile ' not found, trying locally instead.'])
rawDataFile = full... |
a84ae2334ce94f97b008e908f0c64f32869aa048468848efc5e2304001729d2c | MATLAB | 1,884 | 65 | function EEG = manually_score_bursts(EEG, isBurst, WindowLength, Scale)
arguments
EEG
isBurst = true;
WindowLength = 20;
Scale = 20;
end
% requires EEGLAB function, and input EEG signal needs to be called "EEG"
if isBurst
CommandOnSave = 'EEG.ManualBurstWindows = TMPREJ(:, 1:2)';
else
CommandOn... |
7f27dd271defbe6b8308925f36ea7c920852c0d7dcb7abd8c978edb30ab7b36b | MATLAB | 1,885 | 51 | function [nLoads, nSamplesLoad, nSamplesFinal] = planLoad(obj, hRec)
%PLANLOAD Get number of samples to load in each chunk of a file
nBytesSubset = subsetBytes(hRec, obj.hCfg.loadTimeLimits*obj.hCfg.sampleRate);
bps = jrclust.utils.typeBytes(obj.hCfg.dataType);
% nColumns in data matrix
nSamples =... |
dc87579a4eea446be060a8661312651c1d297ae64f360b5941e2f736eee3ea99 | MATLAB | 1,885 | 56 | function [spec_integral posppm] = integrate_spec_mega(fids,ppm_bound,par)
% RETURNS: the integral and centroid of the peak (in ppm)
if ~exist('par'), par='';end
if ~isfield(par,'spect'), par.ref_metab = 'diff'; end %first second
if ~isfield(par,'spect_mod'), par.spect_mod='abs'; end % or 'real'
for nbser = 1:le... |
16b01a6fdf7c0bc1574af82874279c44d4dcb65c7e53e209c4ae026a213b8318 | MATLAB | 1,887 | 69 | function [Path,Cell_Body_Center] = Get_Cell_Body_Multiple(im,Path,Parameters1)
% 1---------2
% | | ------>
% 4---------3
figure(1), imshow(im);
set(gca,'YDir','normal');
Scale_Factor = Parameters1(1).General_Parameters(1).Scale_Factor;
Step_Length = Parameters1(1).Cell_Body(1).Step_Length;
% Rect_Width = ... |
f4d0ac144f45b661392c9b8df95328300cbdb28d21756f3ba0110c199be67d54 | MATLAB | 1,887 | 49 | function [y, e, P] = rls(x, d, p, lambda, delta)
% rls - Recursive Least Squares Algorithm for adaptive filtering.
%
% Syntax: [y, e, P] = rls(x, d, p, lambda, delta)
%
% Inputs:
% x: Input signal vector of length T.
% d: Desired signal vector of length T.
% p: Order of the filter.
% lambda: Forgetting factor (... |
b7cf29d252c0968e4f6858931412818af05b1f594d4668d12277330ea7f69a05 | MATLAB | 1,888 | 55 | function bData = band_spectrum(Data, Freqs, Bands, fDim)
% script for combining matrix of EEG power data into frequency bands. It's
% in this stupid format so that if I ever figure out a better way, I can
% change it all at once.
Dims = size(Data);
BandLabels = fieldnames(Bands);
FreqRes = Freqs(2)-Freqs(1);
switch f... |
eed57e11f354119c3ec9b4072d9319dc866a34bd70a1f538b4a73a3550aa1383 | MATLAB | 1,888 | 63 | function [ECGmean, ECGsd] = avg_beat_calculator(x, peaks, wlen, varargin)
% avg_beat_calculator - Calculation of the mean and standard deviation of ECG waveforms in different beats.
%
% Usage:
% [ECGmean, ECGsd] = avg_beat_calculator(x, peaks, wlen, offset_method)
%
% Inputs:
% x: Input ECG signal
% peaks: ECG pe... |
57f7fd42a17bccd6f7a89c95c17f9c6e989f9282f8842b8b91537489b96468dc | MATLAB | 1,889 | 23 | function structGAM=pyGAM2struct(pGAM)
stats=struct(pGAM.statistics_); % Convert the 'statistics_' property of pGAM to a MATLAB struct
stats.pseudo_r2=struct(stats.pseudo_r2); % Convert the 'pseudo_r2' field to a struct
% stats.cov=double(stats.cov); % (Commented out) Convert 'cov' field to double precision
stats... |
3c40cf905a74902decd41f5353e12b6d03694581a67ee955bc2709b9118f662e | MATLAB | 1,891 | 69 | close all;
clear;
clc;
% parameters
subject1 = 'Patient_1';
subject2 = 'Patient_1';
number1 = 9;
number2 = 9;
path1 = ['E:\Sameni\Projects\Seizure\' subject1 '\'];
path2 = ['E:\Sameni\Projects\Seizure\' subject2 '\'];
mode1 = 'interictal';%'preictal';
mode2 = 'preictal';%'interictal';
% epochlen = 30; % epoch length i... |
0c61a0105e010b356fbe59eab9a67cf9f37000309ec29fdd67a811087957f188 | MATLAB | 1,892 | 57 | function rmOutlierSpikes(obj)
%RMOUTLIERSPIKES Mahalanobis-distance based outlier removal
if obj.nEdits > obj.editPos % not at tip of edit history, back out
warning('cannot branch from history; use revert() first');
return;
end
if obj.hCfg.outlierThresh == 0
return;
end
... |
b9edf38e6dc00b25ee9dff01ba357a296cc1516b33b594508eb11e81bbedc984 | MATLAB | 1,893 | 95 | % test stability issues od the Kalman notch filter
% Reza Sameni, Copyright 2018
close all;
clear;
load('SampleECG1.mat'); %data = data';
% load('SampleECG2.mat'); data = data(1:15000,6)';
fs = 1000;
f0 = 50;
data = data - LPFilter(data,.7/fs);
n = (0:length(data)-1);
x = data + (.015 + .001*sin(2*pi*n*... |
1aa864d2d3735877f5fda0ffad1a90694cdc7fe1e1f7ddbf3a1b37d4fa518515 | MATLAB | 1,894 | 37 | function [mx,S,R,l,a,C,y,Y1_Y2,ellix,elliy] = pca(dataSet,probability) %in dati e prob
x = dataSet(:,1:end-1); %dati effettivi(dalla prima colonna alla penultima)
l = dataSet(:,end); %classe di appatenenza dei soggetti.ultima colonna.
ds = []; %inizializzazione a zero
numExamples = [];
numClasses = 0;
for ... |
614e473cf8d7f246a038ee6e5207bf01656b27a404bdeed86d5fbdf437108d2e | MATLAB | 1,894 | 57 | function keyPressFigTime(obj, ~, hEvent)
%KEYPRESSFIGTIME Handle callbacks for keys pressed in time view
if obj.isWorking
jrclust.utils.qMsgBox('An operation is in progress.');
return;
end
hFigTime = obj.hFigs('FigTime');
factor = 4^double(jrclust.utils.keyMod(hEvent, 'shift')); % 1... |
988401dac6186630c95f431a3424ec1f0143c58d6bd747b691d33a28fdc446f1 | MATLAB | 1,894 | 42 | %Recursive Zonal Equal Area Sphere Partitioning: Utilities
%
% Recursive Zonal Equal Area (EQ) Sphere Partitioning Toolbox.
% Release 1.10 2005-06-01
%
%Functions
%=========
%
% area_of_cap Area of spherical cap
% area_of_collar Area of spherical collar
% area_of_ideal_region Area of one region ... |
b4915722dafd17a4ee5eead9b12edd5e52e8f972a4011c2b86325830ca79ac9e | MATLAB | 1,897 | 50 | function [CyclesMeetCriteria, Diagnostics] = detect_cycles_that_meet_criteria( ...
CycleTable, CriteriaSet, KeepTimepoints)
% Creates a matrix (# criteria x # cycles) of booleans, indicating whether
% each cycle meets each criteria. Cycles and Criterias are structs, sich
% that all the fieldnames of Criterias shoul... |
c076662abafc39cfdbe112d2ee089ca3d78f2c2610303c6b2991743122f2f181 | MATLAB | 1,897 | 56 | function [ExcB,InhB,NB,ExcF,InhF,NF] = get_in_ex(Data,Onset,otrl,Thr)
% To generate
% Data : neurons x time x trials
% StringName : group variables
% Bst: baseline start point
% Bsp: baseline stop point
[Nnum,jump,Con] = size(Data);
Sdur= jump-Onset+1;
%------- choose Responsive cells --------------
% Thr =... |
f719ddc178956c954fedcbeae2649b991697f991aadfe5f66d9eb3a8d929003c | MATLAB | 1,898 | 62 | function n = colored_noise_gen(sd, Len, fs, beta)
% colored_noise_gen - Generate colored noise by frequency domain filtering of white noise.
%
% Usage:
% n = colored_noise_gen(sd, Len, fs, beta)
%
% Inputs:
% sd: Standard deviation of the generated noise.
% Len: Noise vector length.
% fs: Sampling rate.
% bet... |
d393d9ef6151b26c17151011df90415728018cdef71564d13b69d21890e68802 | MATLAB | 1,899 | 55 | %
% Test program for removing baseline wander from ECG signals using
% different techniques.
%
% Dependencies: The baseline wander toolbox of the Open Source ECG Toolbox
%
% Open Source ECG Toolbox, version 2.0, March 2008
% Released under the GNU General Public License
% Copyright (C) 2008 Reza Sameni
% Shar... |
165564333736ecee083448866bfaa7eaca05fec197c1ebe067214602509bc19c | MATLAB | 1,905 | 47 | classdef mat_conversion_options
%
% Class:
% adi.mat_conversion_options
properties
partial_read = false %Not Yet Implemented
%The goal was to partial read/writes of channels to disk
%rather than loading everything at once and dumping in one write.
version = '-v7.... |
d2df29d06f8fbe5f2436b6b7e83eda0c6a9ebd4051881e506cd841f6026c7719 | MATLAB | 1,905 | 48 | function [V, d, delta, similarity, epsilon] = laplacian_eigenmap(C, kappa)
% laplacian_eigenmap - Calculates Laplacian eigen-maps of positive semi-definite matrix pairs.
%
% Syntax: [V, d, delta, similarity, epsilon] = laplacian_eigenmap(C, kappa)
%
% Inputs:
% C: K semi-positive definite matrices of size NxN provide... |
d4d0f6293fe30495e6654070c236565b73560f5099fc8e60d93520cb2ac7872b | MATLAB | 1,906 | 55 | function [varargout] = phaseplot(LFP,st,Fs,binSize)
%phaseplot
%
% Description: This function performs a Hilbert Transformation of a LFP
% and uses that to find an LFP's instantaneous phase over time. Then it
% utilizes a cell of multiple spike times or a single vector of spikes
% times to create a phase ... |
2cb5ad26d8a393eb27827706a3e20b6a97a8dee7e86f34da26db3de0398a9e4f | MATLAB | 1,909 | 72 | function [pacOptAdj,optAdj] = adjustOptCon(optSol,pac,nstd,kRange)
% get pac for locally optimal solutions
tor = [];
for i = 1:size(pac,2)
if optSol(i) ~= 0
optAdj(i,1) = find(kRange == optSol(i));
pacOpt(i,1) = pac(optAdj(i),i);
else
pacOpt(i,1) = 0;
optAdj(i,1) = 0;
to... |
cea171f1e0fdf9dc35ca3d5581935c770818c2806ad149c53c437aad796fb7c9 | MATLAB | 1,910 | 56 | %% Setup for directories and specific map
close all; clear all;
main_indir='/xdisk/hutchinsone/cjoy1895/Data/Development/PM/TLobe/12_sample_dataset/ISMRM_data/';
main_outdir='/xdisk/hutchinsone/cjoy1895/Data/Development/PM/TLobe/12_sample_dataset/data_analysis/averaged_histograms/';
map = 'PA_';
%% Get data for hippoc... |
a789ac7dc5d46ae5c0169171cbdab3494ec97ebedb14301fda5d35e590ebc8be | MATLAB | 1,911 | 48 | function [ eventSnapshots ] = getEventSnapshots(events, traces, movie, filters)
[ areas,centroids,cvxHulls,cvxAreas,outlines ] = getFilterProps( filters );
% loop through cells
for i = 1:length(events)
if ~isempty(events{i})
w=15;
centroids(i,1)=min(centroids(i,1),size(mov... |
0f034f33f9ffdfd658c3b1d1a47d44ca293816262b94d645f20755dc46e96d84 | MATLAB | 1,914 | 67 | function coeff = point_set_dist_coeff(points)
%POINT_SET_DIST_COEFF Coefficient of minimum distance of a point set
%
%Syntax
% coeff = point_set_dist_coeff(points);
%
%Description
% COEFF = POINT_SET_DIST_COEFF(POINTS) does the following:
% 1) finds the minimum Euclidean distance between points of the point set
% PO... |
4e2a225b8fe41ed2525ca0480452125d7234977462a05c5d3a3956b8afc88bb7 | MATLAB | 1,914 | 49 | function [S,L,A3] = Vertices_Symmetry_Linearity(Junction_Angles)
% This function computes the symmetry and linearity indices.
% Symmetry is defined as the ratio between the two angles that are most similar to each other (smaller divided my the bigger).
% Linearity is defined as the angle closest to pi, divided by ... |
d8ad8b6892432e5a57f4792f01b95d76d1d0329f34d72d53e8135031fafb7134 | MATLAB | 1,915 | 74 | clear
clc
close all
load('D:\Data\LSM\Preprocessed\Clean\Waves\Game\P10_Game_Session2_Clean.mat')
%%
close all
% % Load EEG data
EEGData = EEG.data(11, :);
fs = EEG.srate;
% calculate power
WelchWindow = 4;
Overlap = 0.5;
% [Power, Frequencies] = cycy.utils.compute_power(EEGData, fs, WelchWindow, Overlap);
[Power... |
1c11b1417da0b2b3f8b0accc7c21c954f64c08826181e77daa2aef315c380bfa | MATLAB | 1,916 | 47 | function y = bp_filter_dft_windowed(x, fc, bw, wname)
% bp_filter_dft_windowed - Bandpass filter using windowed discrete Fourier transform (DFT) filtering
%
% Usage:
% y = bp_filter_dft_windowed(x, fc, bw, @wname)
%
% Inputs:
% x: vector or matrix of input data (channels x samples)
% fc: normalized center... |
da3fb3bfcf58ad710d0c5a4995824701e4e6d20f7f453f80c92bf6de5d641b95 | MATLAB | 1,916 | 53 | function layers = setweights(layers, weights)
n = numel(layers);
ind = 0;
for l = 1 : n % layer
if strcmp(layers{l}.type, 'i') % input
if (isfield(layers{l}, 'mean'))
curlen = length(layers{l}.mw(:));
%w_trans = permute(layers{l}.mw, [2 1 3 4]);
%w_trans(:) = weights(ind+1:ind+cur... |
a030f43ccc3c2606b90bc2e5d1207a8e41b7ee72e332dcb1edba1860e2be24ee | MATLAB | 1,918 | 74 | function out = fatrix2_subsref_dot(st, args)
%function out = fatrix2_subsref_dot(st, args)
% handle subscript references like ob.ref or ob.ref(arg[s])
% This will called from ../subsref with struct(ob)
% and it will have arg(1).type = '.'
% Based on @strum/subsref
% Copyright 2006-1-19, Jeff Fessler, University of Mic... |
1dab586e3f00ccddd9351b6f080908f9f0994f153c061a950f6acf9da0acb785 | MATLAB | 1,919 | 65 | function plotsingleEEGVRL2_pe (hdl,~)
D = get(hdl,'UserDat');
ecnt = D{1,1};
Cond1 = D{1,2}';
Cond2 = D{1,3}';
colrz = D{1,4};
time = D{1,5};
legendnoms = D{1,6};
eois = D{1,7};
topermut = D{1,8};
if size(eois,1)==1
eois =eois';
end
assignin('base','Cond1',Cond1)
assignin('base','Cond2',Cond2)
f1 = figure;
set... |
3e344d43cf27434a38370fe147bb775e534dfcce33ce8e9f9dc752301fe9918f | MATLAB | 1,919 | 75 | function do = r_movefile(d,new_dir,type)
%do = r_moverfile(d,new_dir,type)
%will move or copy or link files d in new_dir
%type can be 'copy' 'link' 'move'
if ~exist('type')
type = 'copy';
end
if isstr(d)
d = repmat({d},size(new_dir));
end
if isstr(new_dir)
new_dir = repmat({new_dir},size(d));
end
if ... |
0d0741dd4e14c558b7786e86822a3c9d91d20e5a3ca085a974f41904fa664f32 | MATLAB | 1,920 | 71 | % Copyright 2024 Eelke Spaak, Donders Institute.
% See https://github.com/Spaak/rift-phase-and-visibility for readme/license.
% Belongs with:
% Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension
% to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscie... |
738fabafba0bb8a50b08a13ad7d9a00b3debbfdf9092146b56c9ae1fbeb2af95 | MATLAB | 1,921 | 73 | function [AUC1, meanTIMESERIES1, maxTIMES1] = visualizeCBVresponses_madino(CBVresponse, ROIname, resultpath, colors, stim)
% This program is intended to visualize and calculate the CBV signal.
%
% input:
% CBVresponse1
% CBVresponse2
% ROIname
% resultpath: where you can save .png files/
% colors: colors of ... |
a598d937e6127a4384b67c4358175277032b5fcb0d2ca549767392af09b29c53 | MATLAB | 1,921 | 49 | function [av_x,av_no_x] = collect_t2_av_trials_x(p, traces, bvs, tis, speed_control)
spd_dims = 18:22; %dlc
pre_steps = 15;
post_steps = 5;
for sub = 1:p.nSubjects
av_x{sub} = [];
av_no_x{sub} = [];
for ses = 5:9
if any(ses == p.alignment.exclude{sub})
... |
585abe9c9da092f1ed1bd72fb83b8dc40749fe252d2ee2eed7ffadc82056a13c | MATLAB | 1,924 | 55 | function [x, fs, status] = read_binary_signal(ifname)
% read_binary_signal - Reads multichannel signal from a binary file (generated by write_binary_signal)
%
% Syntax: [x, fs, status] = read_binary_signal(ifname)
%
% Inputs:
% ifname: Input file name (including path and extension)
%
% Outputs:
% x: Matrix of input... |
c0fbb74effdec20a1c32925f6c6588ac9bdc7a4b0df30a6f03250eb0834899b9 | MATLAB | 1,926 | 87 | %%%Neurons count%%%
function [number] = count(image)
%gaussian
I_filter = im2double (image);
sigma = 0.2; %default parameters
hsize_r = 3;
hsize_c = 3;
imageycbcr = rgb2ycbcr (I_filter);
lum = imageycbcr (:, :, 1);
im_gaus = filter2 (fspecial ('gaussian', [hsize_r hsize_c] , sigma), lum);
imageycbcr (:, :... |
b4a0cf2fb4856edb8b181aafac11b7fa3d237f5dc0d81e7fd7246e7376fb0500 | MATLAB | 1,927 | 53 | function uInfo = exportUnitInfo(obj, iCluster)
%EXPORTUNITINFO Get all data pertinent to a cluster
if ~ismember(iCluster, 1:obj.nClusters)
uInfo = [];
return;
end
iSite = obj.clusterSites(iCluster);
iNeighbors = obj.hCfg.siteNeighbors(:, iSite);
pos = sprintf('Unit %d (x,y):(%0... |
e9fd0f497b3a06bded8310faf49d7e04e0eafad31158dbb3ac55069ec0a8c275 | MATLAB | 1,928 | 61 | function R_LPhase190513
%¶«Ì^b`ÌÔÉXpCNª Á½Æ«¶«Ì^b`ÌÅDZÉE^b`ª Á½©
%CxÆ98ÅÖð©é
cd('C:\Users\C238\Desktop\CheetahWRLV20180729\119\2017-6-7_20-8-33 11901-51\R_LPhaseFolder');
LS=ls;
R_LPhaseindexArray98=[];
R_LPhaseindexArrayCx=[];
for i=1:length(LS(:,1))
R_LPh... |
11d6d12eab914713812b23f256a1bfa84478ea4ae2c3e4d4ac56b3c232fb15a9 | MATLAB | 1,929 | 102 | function write_conc_res_summary_to_csv(conc,fid,field_list,std_abs)
if ~exist('std_abs')
std_abs=0;
end
fprintf(fid,'\n\n')
npool=1;
if isfield(conc(1),'suj_age')
fprintf(fid,'%s,Age',conc(npool).pool);
else
fprintf(fid,'%s',conc(npool).pool);
end
for kf = 1:length(field_list)
if ~strcmp(field_list{kf},'... |
7e6d8e9c982c2743542ea3bda28bad30179400a3620cf79ed12742e04008dcf0 | MATLAB | 1,930 | 52 | Import_FinderSpiker;
OddsMatrix=getoddmatrix(isSIGNALS,notSIGNALS);
Experiment=Experiment(Experiment~='\'); % NAMES PATCH
%% Plot Final Data
% GET Condition's Rasters & Whole RASTER
[~,Raster_Condition,RASTER_CONCAT]=SortNeuronsCondition(RASTER);
% Actual Active ROIs
TotalActiveNeurons=find(sum(RASTER_CONCAT,2)>0... |
555982d45e789052481c955700678b27977dde439e1dcc68a9eff5ec8910912a | MATLAB | 1,931 | 63 | % Raster Ensembles Using Images FAST
% Input
% R_Analysis: Raster Condition Structure
% Raster: Frames x Cells
% labels_frames
% ColorState: Ensemble Colors
% Output
% Image with colored ensembles
function ImageEnsembles(R_Analysis,plothebb,varargin)
%% Setup
if ~isempty(varargin)
ColorState=varargi... |
628bb47c43cf183471050cf9fb09527f284d8b36300a8d1dcdce346185bb71a8 | MATLAB | 1,931 | 50 | % *************************************************************************
% * Test program for calculating Phase Locking Value (PLV) matrix *
% * (Pairwise) using phase sequences. Refer to the User Guide for further *
% * details. *
% **************... |
7c1930b2efc6c6ae937ff5e490721c716333c00ea2ddf26dd4770e6b29508dcb | MATLAB | 1,931 | 68 | %Author: Tatjana Schmitt, 2019-2023
function stats = find_center_of_mass(BF, varargin)
% finds 1 or more centers of mass of chosen BF
narginchk(1,4)
if nargin >= 2; frequency_hub = varargin{1}; else; frequency_hub = 1; end
if nargin >= 3; se = varargin{2}; else; se = strel('disk', 3); end
if nargin >= 4; le... |
0e25c63f116f68633c8b88fd7d5c233dfe8518647caa780ae33f77e7624ce982 | MATLAB | 1,935 | 57 | function [Data2]=mnl_ChromaticAbberationCorrectionZ4(Data,Scale,mValues,cValues)
%Function to correct for the chromatic abberation, based on bead data
%extracted from the codes 'mnl_Pipeline_MeasurePSFandCA' and
%'mnl_MergeBeadData'
%
% Inputs
% Data - Original Data (x*y*c*z)
% Scale - x*y*z Scale of the image
% WhichL... |
377677aa4a15ee8233ff0d8975ea91bc5b2a160cd76c4cb7f565cb14d5b88f92 | MATLAB | 1,935 | 69 | function [dll_evolution, ids, delta] = get_s_dll_evolution()
% Plot delta log likelihood evolution of specific s-model for given trial
%
% Parameters
% ----------
%
delta = 75;
info = get_info();
filename = fullfile(...
info.folders.results, ...
sprintf('s_dll_... |
d6528640375084bd2f6637631a407be1dd38fd2487361f6bf70a0507ef9e362b | MATLAB | 1,935 | 76 | function plot_AG_trans_MSPoI_Mikael(FS,AG,FRP,NodeName,atlas,options,savepath,save)
atlas_name = options.atlas{atlas};
fg = 0;
for cm = 1:3
fg = fg + 1;
fig = figure(fg);
CF = AG{cm};
AM_diff = CF(:,:,2) - CF(:,:,1);
sig_AG = FS.RESULTS_PERMS.Pair_diff_FDR05{cm... |
11ec668028d8040d519ee02344fdaaa66afeaf0dffdeed7338d825561f0c6711 | MATLAB | 1,936 | 47 | function data_filtered = preprocess_for_ecg_angle_features(data, fs, low_pass_fre, high_pass_fre, median_window_coff, mean_window_coff)
% data_filtered = preprocess_for_ecg_angle_features(data, fs, low_pass_fre, high_pass_fre, median_window_coff, mean_window_coff)
% Preprocess ECG signal: NaN handling, notch f... |
8f043c6d1601b4826ffecad65e455e4ea7e8bc98f306e09fad459cc9af615ab6 | MATLAB | 1,938 | 64 | function x = powernoise(alpha, N, varargin)
% Generate samples of power law noise. The power spectrum
% of the signal scales as f^(-alpha).
%
% Useage:
% x = powernoise(alpha, N)
% x = powernoise(alpha, N, 'option1', 'option2', ...)
%
% Inputs:
% alpha - power law scaling exponent
% N - number of samp... |
bdeee24e3c2cbb756b8391e27950bafeb2683b3fe504d6466a98596f91262a6e | MATLAB | 1,939 | 96 | function y = reale(x, arg2, arg3)
%| Return real part of complex data (with error checking).
%function y = reale(x, arg2, arg3)
%|
%| y = reale(x)
%| y = reale(x, tol)
%| y = reale(x, 'warn', 'message')
%| y = reale(x, 'error')
%| y = reale(x, 'report')
%| y = reale(x, 'prompt')
%| y = reale(x, 'disp')
%|
%| Checks th... |
e0f20d5722768d75e0d3d415e4714d1f9f04f50bbc55eeea91191beb6c7ad2f3 | MATLAB | 1,939 | 61 | % 计算原型网络的损失
function loss = prototype_loss(support_set, query_set, num_classes, ~, num_query)
% 初始化原型张量
prototypes = zeros(num_classes, size(query_set, 2));
% 计算原型
for i = 1:num_classes
prototypes(i, :) = mean(support_set(i, :, :), 2);
end
% 计算距离矩阵
distances = zeros(num_cl... |
e389c8f07c3e4701ce60ba82c2cdef4331d5b7cfed6e64fafe740eff602148d1 | MATLAB | 1,939 | 68 | %% preparatory analyses
% Fig. S6: DR validation
disp([char(datetime('now')) ' starting a0_dr_validation']) %
a0_dr_validation
% Fig S7
disp([char(datetime('now')) ' starting a1_x1_ae_and_iti_speed']) %
a1_x1_ae_and_iti_speed
disp([char(datetime('now')) ' starting a1_x2_quantify_gaging']) %
a1_x2_quantify_gagi... |
29970ca63ac74092cb88256042b6bc9405bed5f453097c7cfc85a8f4e52fe009 | MATLAB | 1,941 | 64 | classdef (Hidden) mat_comment_handle < handle
%
% Class:
% adi.mat_comment_handle
%
% NOTE: This class is a quick hack to get the mat file sdk working
%
% This contains a handle that is needed by the SDK to get comments
% for a particular record. Methods in this class can be us... |
2e60eb6f7697c90e196bbfb08a219b43e02e52207d31ec983a26d48b0ef2dc95 | MATLAB | 1,942 | 83 | %% B52
% capacitance of B52
Cm_B52 = 0.01; % uF
% leaky conductance of B52
gL_B52 = 0.1; % uS
RL_B52 = 0; % uS
% reversal potential of the leaky channel of B52
EL_B52 = -62; % mV
% sodium currents to B52
% maximal conductance of the sodium channel of B52
gNa_B52 = 25; % uS
RNa_B52 = 0; % uS
% reversal potential of t... |
c99b65326b7c8ce6d1cccdce982a755bdc39de27b4319a1a5af52b2c4fbca5d9 | MATLAB | 1,943 | 75 | % Copyright 2024 Eelke Spaak, Donders Institute.
% See https://github.com/Spaak/rift-phase-and-visibility for readme/license.
% Belongs with:
% Spaak, E., Bouwkamp, F. G., & de Lange, F. P. (2024). Perceptual foundation and extension
% to phase tagging for rapid invisible frequency tagging (RIFT). Imaging Neuroscience,... |
8bc4f20c15d3887714fb92039cc84c4792affdc2f9e5a97d7b65669a76299481 | MATLAB | 1,944 | 66 | % A应当为测试所需的label图
A = imread('E:\Label_对比图8.png');
format='um';% 文件格式
Num = 200;
scale = 1.226994;
[x,y] = size(A);
for i = 1:x
for j = 1:y
if A(i,j) == 1
A(i,j) = 255;
else
A(i,j) = 0;
end
end
end
imshow(A)
[L,N] = bwlabel(A,8);
R = cell(N,1);%... |
ed4211fcccff596dbbc0ae598f66636f3f85cb3feba9d151e0ca0b1548b2daa0 | MATLAB | 1,944 | 46 | function [layers, loss] = initder_dir_int_inv(layers)
selfprod = squeeze(sum(sum(sum(layers{1}.d.^2, 1), 2), 3));
sig_ind = find(selfprod >= layers{1}.eps);
sig_num = length(sig_ind);
selfprod = selfprod(sig_ind);
sigder = layers{1}.d(:, :, :, sig_ind);
activ_size = [size(layers{1}.a, 1) size(layers{1}.a, 2) size(lay... |
a413bf0f9b438d827f942d741c8ca1696bcbd37e99d1f34aa47b9d5fb438e785 | MATLAB | 1,946 | 67 | %save relevant_all_data
%load the both files
clear
clc
[file, path] = uigetfile('*.mat','MultiSelect','on');%When the user clicks the load psetion button, a window should open to enable the user to select a file.
if ~iscell(file)
file = {file};
end
cd(path)
%%
responsive = cell(3,2);
responsive_counts = zeros(3,1... |
44c0e4c417c7de08bdcb2511d8a533f35707933edd1972693450caa6dc94e6f9 | MATLAB | 1,947 | 64 |
%{
----------------------------------------------------------------------------
Determine the time window for task relevant neurons
%Start of task
%Sound on
%Sound off
%Before choice
%After choice (0sec)
%After choice (1sec)
%After choice (2sec)
%p = 0.001
%Each epoch, predict the prior, sensory and choice... |
d743bcefe639dd5907fb7369a2ba0198bada9d68d0989419ac4fb77101e6525e | MATLAB | 1,947 | 53 | function pv_ccg(cellids,resdir,issave)
%PV_CCG Cross-correlation analysis.
% PV_CCG calculates cross-correlations for PV(+) neurons in 50 ms windows.
% CCG results are saved for non-tetrode pairs and tetrode pairs
% separately.
%
% See also CCG.
% Balazs Hangya, Panna Hegedus
% Institute of Experimental ... |
29265e07a159fc6170cba7c0d84293d37014f6bbc7fad32a7d9f46cb1695204b | MATLAB | 1,948 | 48 | %% Plot FRC results first load FRC data "FRC Results All"
load('Q:\OneDrive - The University of Colorado Denver\From Dropbox\STED\STED Data\230822\45nmYG_DyMINvsSTED\FRC Results all.mat')
fig1 = figure(1);
plot(1:num2compare-1,1000*FRCResultsDyMIN16.FRCFixed17Calibratedmicron,'-+g')
hold on
plot(1:num2compare-1,1000*... |
a053aba1ed0cf8a320460090e736c712402438ae3c606ad5697b376e17f5dcca | MATLAB | 1,949 | 67 | function ProbEvents = probability_of_event_by_outcome(TrialData, TrialsTable, ...
MaxNaNProportion, MinTrials, onlyResponses)
%
% TrialData is a T x time matrix
% ProbEvents is a 3 x t matrix
MaxGapProportion = .2;
TimepointsCount = size(TrialData, 2);
ProbEvents = nan(3, TimepointsCount); % Lapses, Late, Fast
... |
f07a89e09717640719489e219fe23ac4b7b3fc3697949e46d37a4e86bf389c38 | MATLAB | 1,949 | 48 | % Function to Calculate Network Parameters
% Input
% Raster: Activity Matrix: Cells x Frames
% th_frames: Threshold of Links - Frames
% Ouput
% A: Adjacency Matrix: Cells x Cells
% kdegree: K Links for each Cell
% pk: links pdf
% ck: clustering coeffi... |
25738a6381f3d0412b9939cec0e2f5a5671d0f0dda6da1e3fc60327dc3beef37 | MATLAB | 1,951 | 56 | %create a all ramp table from multiple all data files
clear
clc
[file, path] = uigetfile('*.mat','MultiSelect','on');%When the user clicks the load psetion button, a window should open to enable the user to select a file.
cd(path)
datafile = fullfile(path, file); %save path
%%
idx = 0;
for i = 1:length(datafile)
... |
b5f7c4ef2d926bfed94c1c012173b3a33c72f08b78b3854d2197f4aa2a00ea96 | MATLAB | 1,951 | 38 | function [Point_Curvature_Values,Mean_Curvature,Mean_Squared_Curvature] = Calc_Mean_Curvature(X,Y,Steps_Length,Scale_Factor,Parameters)
% This function gets a series of coordinates of a segment.
% It calculates the radius of curvature at each coordinates,
% And finally calculates the mean squared curvature of the ... |
82c1297badb68d4b5ace8dc9233e49222e0f39fb9d3bc4e23e0d647d4be1851a | MATLAB | 1,953 | 73 | function out = rotmat2euler(rotMat)
nT = size(rotMat,3);
out = zeros(3,nT);
% % take the definition from the Wikipedia page:
% % http://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Conversion_formulae_between_formalisms
% % Nov 7, 2012
% out(1) = atan2(rotMat(3,1),rotMat(3,2))*180/pi;
% out(2) = ac... |
fc1d2ce9558005873bc05bb44e8f56cbab288a92484b95de2a7f8e27904d920b | MATLAB | 1,953 | 66 | function behav = msSelectPropsForTracking(behav)
%MSSELECTPROPSFORTRACKING Summary of this function goes here
% Detailed explanation goes here
userInput = 'N';
green = cat(3, zeros(behav.height,behav.width), ...
ones(behav.height,behav.width), ...
zeros(behav.height,behav.width));
frame = double... |
dc7b453b1ed7dc69ceb3d6933eb674b3d5867d77fcaf439d726f6386585d79c4 | MATLAB | 1,955 | 53 | function [P_tilde, P] = mica_projectors(A)
% mica_projectors - Multidimensional Independent Component Analysis (MICA) projection matrices.
%
% Description:
% Given an nxn matrix A, which has been estimated by, for example,
% independent component analysis of mixtures following the model x = A*s,
% this function ... |
e4c4c6c89da407dd65a9dd05d710f18c272f3fd76e872df8a718ea5350a409ae | MATLAB | 1,957 | 65 | function [ zfilt ] = gaussfilt( t,z,sigma )
%Apply a Gaussian filter to a time series
% Inputs: t = independent variable, z = data at points t, and
% sigma = standard deviation of Gaussian filter to be applied.
% Outputs: zfilt = filtered data.
%
% written by James Conder. Aug 22, 2013
n = length(... |
41629335d1065f816e6f26a74fc15c48fb45df107b77222a859222dcffa690a3 | MATLAB | 1,959 | 55 | function [eval_accs] = eval_time_independent_decoder_per_timestep(t_pool_tone,n_rep,n_tr,nullspace)
%% project data into motion / avoid nullspace
tone_null = [];
for t = 1:size(t_pool_tone,2) % loop over time
tone_null(:,t,:) = nullspace' * squeeze(t_pool_tone(:,t,:));
end
%%
eva... |
6d7c20ce8a6f7839c883f393d541312bb9a400bab756507a07ccf1bea5afb51e | MATLAB | 1,960 | 59 | function [onsetsFinal, offsetsFinal] = getOnsetOffset(signal, ampThreshold, minBelowTime, minAboveTime, behFlag)
% [onsetsFinal, offsetsFinal] = getOnsetOffset(signal, ampThreshold, minBelowTime, minAboveTime, behFlag)
%
% Summary: This function determines the indices of onsets and offsets
% for a movement bout ... |
9c0a0e0918108ebfdb82c03b83f9708143fb921197dd21717a8ec4f9058ddbd8 | MATLAB | 1,961 | 65 | function vertex_diam = max_vertex_diam_of_regions(regions)
%MAX_VERTEX_DIAM_OF_REGIONS The max vertex diameter in a cell array of regions
%
% vertex_diam = max_vertex_diam_of_regions(regions);
% Copyright 2004-2005 Paul Leopardi for the University of New South Wales.
% $Revision 1.10 $ $Date 2005-06-01 $
% Function ch... |
dc762d8e1f18ababd9f607d23f65c82be639f7c1ab6f9fa53177fa56cc8e700a | MATLAB | 1,961 | 77 | % Comparing different multichannel fetal ECG extraction methods for test
% Reza Sameni, copyright 2018
%
clear;
close all;
load('FOETAL_ECG.dat'); data = FOETAL_ECG(:,2:end)'; time = FOETAL_ECG(:,1)'; clear FOETAL_ECG; fs = 250;
L1 = size(data,1);
L2 = size(data,2);
% BW removal
bl = LPFilter(data,1.5/fs);
x = data... |
297f26f8c953166267dcca39605effc61cc6e083559a402c53491e7f95666ddc | MATLAB | 1,962 | 50 | % test_common_mode_noise_canceller
%
% This script demonstrates how to use the common_mode_noise_canceller function
% to remove common-mode noise from multichannel data. It imports data from a CSV
% file, processes it to remove common-mode noise, and then plots the original,
% denoised, and smoothed denoised signals f... |
39978a12417c393ac756973bd65db68c0ac0f3bde3b4565f6a2d4fd26505777d | MATLAB | 1,962 | 63 | clear
p = params_2DAA;
fpath = fullfile(p.processed_data_dir,'allData.mat');
load(fpath,'evs','tis','bvs','traces')
[cols,alpha] = chooseColors;
%% run DR and decoding procedure for different trial samples
fpath = fullfile(p.data_dir,'eval_avoid_decoders_per_sub');
saveData = 1;
saveFigs = 0;
n_rep = 80;
n_rep_eval ... |
837bdda98e4ac80c638fa6c241813b814d08337d1c7da961f7c6d95a90c68ead | MATLAB | 1,963 | 54 | function selfSim = computeSelfSim(obj, iCluster)
%COMPUTESELFSIM Get similarity between bottom and top half (vpp-wise) of cluster
if nargin < 2
iCluster = [];
end
if isempty(iCluster)
obj.hCfg.updateLog('selfSim', 'Computing cluster self-similarity', 1, 0);
selfSim = zeros(1, o... |
efce3f9a69988ad814e32cd7a135a37656b561656e6721c5ffe719f978ded31c | MATLAB | 1,966 | 58 | function y = tanh_saturation(x, param, varargin)
% tanh_saturation - Saturates outlier samples using a tanh shape function
%
% Usage:
% y = tanh_saturation(x, param, mode)
% Inputs:
% x: Input data, can be a vector or a matrix (channels x time)
% param: Scaling factor for the saturation level:
% - If mode =... |
6864dda1e9bbe619c99176410008fe06fb08a0cf8792a80b48f61612509ecb59 | MATLAB | 1,970 | 47 | function [eucl, dx, dy, dz] = TracVelocity(TrackingData, f, gaus_kernel)
% Computes velocity of translation component of tracking data in cm/s
% Input:
% TrackingData - Data containing tracking information
% f - Sampling rate (e.g., 1 ms = 0.001)
% gaus_kernel - Flag indicating whether to smoot... |
9f373f33fc0b917e0026da94aa071cbf1ec104b0ed995d19127375ac9b44aead | MATLAB | 1,970 | 74 | function plot_s_dll_evolution()
% Plot delta log-likelihood evolution of trained s-model
%
% Parameters
% ----------
%
t1 = 241;
t2 = 541;
info = get_info();
num_times = info.num_times;
times = info.times;
tmin = times(1);
tmax = times(end);
[dll_evolution,... |
103ea68cb26701a5d2c07e217cf9525fe5eb9e1aed9a8e57138d96318a5a6557 | MATLAB | 1,972 | 64 | function stdshade(amatrix,alpha,acolor,F,smth)
% usage: stdshading(amatrix,alpha,acolor,F,smth)
% plot mean and sem/std coming from a matrix of data, at which each row is an
% observation. sem/std is shown as shading.
% - acolor defines the used color (default is red)
% - F assignes the used x axis (default is st... |
e3eab18668062e39bc086d8c36da733e010b06673810acbac321515b8ecacd33 | MATLAB | 1,973 | 57 | function [Spectrum, Frequencies, Time] = multitaper(Data, SampleRate, WindowLength, MovingWindowSampleRate)
arguments
Data % ch x time
SampleRate
WindowLength = .5; % in seconds
MovingWindowSampleRate = .02; % in seconds
end
% function to create a timexfrequency plot for visualizing data. Based on
% Mik... |
fe174ed801358764b6617ab79e0c772368456cc8156ed9b6bddeef530e27be6e | MATLAB | 1,973 | 61 | classdef (Hidden) comment_handle < handle
%
% Class:
% adi.comment_handle
%
% This contains a handle that is needed by the SDK to get comments
% for a particular record. Methods in this class can be used to
% extract actual comments from a record.
%
% See Also:
% ad... |
83b76e8d6fcb73d028b489171bd276d07e2620422a44ee8d909dc22a3f8df39a | MATLAB | 1,974 | 67 | function [S, R, e] = subspace_mapping(A, B, ITR, mode)
% SUBSPACE_MAPPING Estimates scaling (S) and rotation (R) matrices between subspaces A and B.
%
% [S, R, e] = subspace_mapping(A, B, ITR) finds diagonal scaling S and
% orthogonal rotation R that minimize the Frobenius norm:
%
% ||A - B*S*R||_F
%
% Inp... |
66c288f466064dfa8ecb2bccaa2ec3189f203f4957ff803fe5fcb051f9b84a83 | MATLAB | 1,975 | 58 | classdef tdtch_wc_reader < handle
properties
sr
max_segments
opened_file
segmentLength
open_file
t0_segments
end
methods
function obj = tdtch_wc_reader(par, raw_filename)
load('tdt_meta_data.mat','sr','lts','channels');
... |
6cc71020be19363efae5b40b9a09d0b4026ac954e4490b460b5ecc0123118a92 | MATLAB | 1,976 | 63 | %control lance amplitude Fig2b
x1 = readmatrix('Fig2_CL_x_data.csv');
y1 = readmatrix('Fig2_CL_y_data.csv');
figure
plot(x1(2,:), y1(2,:), '-', x1(1,:), y1(1,:), '--')
set(gca, 'ydir', 'reverse')
xlabel('Time post-stimulus (s)')
title('\rm Time pre-stimulus (s)', 'Position', [0.5,-11.5,1])
ylabel('Amplitude (uV)')
le... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.