sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
b893f8e305966170f94277a0522dc16dd7af8a5534d260e6627cb53c960e3786 | MATLAB | 2,077 | 79 | function Xk = nufft_table_adj_split(st, X, order, flips, om)
%|function Xk = nufft_table_adj_split(st, X, order, flips, om)
%| adjoint of table-based nufft interpolation.
%| in
%| st structure from nufft_init
%| X [M,nc] DTFT values (usually nc=1)
%| order 0|1 0th or 1st-order interpolation
%| default is 0 for bac... |
970bec50549c9823b7547f5919e6a7ba2881efc02f1f064d47b9afeff2f39575 | MATLAB | 2,083 | 62 | %
% Test program for mean ECG beat extraction.
%
% Dependencies: The baseline wander and ECG filtering toolboxes of the Open Source ECG Toolbox
%
% Open Source ECG Toolbox, version 1.0, November 2006
% Released under the GNU General Public License
% Copyright (C) 2006 Reza Sameni
% Sharif University of Technol... |
d06fe4c568ba58a5acc3c79f990a0f80a667146a8b3dbdc5e4ebf892fd6b1423 | MATLAB | 2,083 | 68 | function MakeContours(xSPM)
% simple routine to save the contours of activated clusters as a binary
% image from the current plotted data (i.e. using xSPM)
%
% the routine uses a simple cube as structuring element for the dilation
% so the output is roughly of the specified contour size
%
% Cyril Pernet 26 Dec 2013
i... |
ffb1fb0e861b4d6888cc3e6782d91be091a6cb251e50707e82be0cf3bc10dfb7 | MATLAB | 2,085 | 73 | function density = point_set_packing_density(points)
%POINT_SET_PACKING_DENSITY Density of packing given by minimum distance of a point set
%
%Syntax
% density = point_set_packing_density(points);
%
%Description
% DENSITY = POINT_SET_PACKING_DENSITY(POINTS) does the following:
% 1) finds the minimum Euclidean distance... |
2952a819dfbdce7c4737d7c209071cff73dbf4d440dc512d919bb3d5566bc6c4 | MATLAB | 2,086 | 62 | function next_state = markov_model_next_state_gen(STM, current_state)
% markov_model_next_state_gen - Generate next state from current state using a state-transition matrix for first-order Markov model.
%
% This function generates the next state from the current state based on a
% provided state-transition matrix (STM)... |
0ff9beaaf4244fe3dfb75122652565aa5266b97ec0bdf83cf03f22b2a1f23818 | MATLAB | 2,088 | 74 | function [MIxy RMIxy1 RMIxy2 RMIxy3]=kernlden2d(x,y,pnts)
%__________________________________________________________________________
% Usage: calculations of two dimensions kernel density and mutual
% information by kernels.
% Inputs:
% y and x are vertical vectors of time series.
% pnts is number of points... |
f2642a12d39f1ac3a0458cf26dbb22529478996bb5a207d863bf675e6e5ab210 | MATLAB | 2,088 | 49 | function summarize(obj)
%SUMMARIZE Summarize a JRCLUST session's results
if ~isfield(obj.res, 'spikeTimes')
return;
end
if obj.isDetect
nSpikes = numel(obj.res.spikeTimes);
countsPerSite = cellfun(@numel, obj.res.spikesBySite);
[minCount, argMin] = min(countsPerSite);
... |
ec002e97f1a4bf8543a1b06e3c7f6e18eecc595af358648fbc3934d8ad183f5c | MATLAB | 2,089 | 87 | function T = nufft_T(N, J, K, tol, alpha, beta, use_true_diric)
%function T = nufft_T(N, J, K, tol, alpha, beta, use_true_diric)
%|
%| Precompute the matrix T = [C' S S' C]\inv used in NUFFT.
%| This can be precomputed, being independent of frequency location.
%|
%| in
%| N # signal length
%| J # of neighbors
%| K ... |
eefd66df87e28179f40c620cbd6449cabc8d25c8e334615486c6876e163f9d7d | MATLAB | 2,089 | 81 |
%{
----------------------------------------------------------------------------
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... |
0ed9d49e44d624135e10a4c4772e5bee10cce162182fc06acf2b9c2bac3d85b8 | MATLAB | 2,090 | 54 | % Copyright (c) 2008-2026 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
%
% Covered Software is provided under this License on an "as is"
%... |
18bebfedba609d3c17e4cdc4c27ee08d49cd1782f8d769d3af8b15d9dd2496dd | MATLAB | 2,090 | 50 | function inputExperimentSegmentation()
% Prompts the user for time segment data and stimulation times, and saves
% them to a file called experimentSegmentation.mat in a subdirectory called
% configFiles.
% The input format has to be a matrix with rows representing experiments
% and columns representing times. In... |
a133bc8aa11584df57be865f4b67af10e929063024cc708dbda3cfb6a848c3d7 | MATLAB | 2,090 | 96 | function [Bx_tot, By_tot, Bz_tot] = pointsBfield(Q,R0,Pts)
%Sanitization of input
sizQ = size(Q);
sizR0 = size(R0);
sizPts = size(Pts);
assert(sum(sizQ == sizR0) == length(sizQ), 'Dipole and position arrays do not match in size');
assert(length(sizQ) == 1 || length(sizQ) == 2);
assert(sizPts(2) == 3);
%Constants
mu_... |
ea3be2125ed694648e20875d8ba524918320bba234aa3f4c7e16b129e0f5a8ce | MATLAB | 2,090 | 73 | function controlfilename = createLCmodel_control_ws(metabname,l1,l2,l3)
controlfilename=[metabname '.CONTROL'];
% create .CONTROL file for LCModel
disp(['Creating file ' metabname]); disp(' ')
fileid=fopen(controlfilename,'w');
fprintf(fileid,' $LCMODL\n');
fprintf(fileid,[' TITLE=''DYSTONIE''\n']);
fprintf(fileid,[... |
01230ad48ce9a57bfe92f85c1e4564e086b0195644e57d96858d448e3e1bab1c | MATLAB | 2,092 | 71 | function cellcount_withrepeat20220316
%%% q[g}bv0~5(½ñÄÍÜÁ½©)»ê¼êÌðÍ
%%% »ê¼êÌq[g}bvÌêÔå«ÈlorãÊ1/4ƩŻÌ×EÌJèÔµÌÎpxðvZ·éB
path='C:\Users\C238\CheetahWRLV20220213\touchcellLtRt_Hirokane';
MSN=0;
modBgracount=0;
mod98count=0;
modRrepcount=0;... |
3b12d1d3f0f64f311154a88365979a77b5ac93f9474f99c84b900574350b51dd | MATLAB | 2,092 | 66 | clear;
close all;
clc;
type = 'Normal';
switch(type)
case 'Normal'
pth = 'J:\ECGData\Normal';
fs = 128;
segstart_list = 0 : 60 : 30*60; % segstart_list = 0 : 600 : 12*3600;
diff_h = 2;%load DifferentiatorImpulseResponse01 diff_h
seg_len = 10;
case 'Arrhythmia'
p... |
db36f15a1f647b532637412b4bbe94536d4fc7db6f63633b97b8788a053d0e57 | MATLAB | 2,092 | 71 | function [binary weighted]=threshold_shortest_paths(w,type)
%transform a weighted (direct or undirected) network in binary via shortest path identification using
%Dijkstra's algorithm
%adopted from Dimitriadis et al. Tracking brain dynamics via time-dependent
%network analysis, Neuroscience Methods, 2010
%... |
3cc139d77e93d6d52c2db9ac1f9846c889b27a3d304ccea5d8fd84a6cc6b16a9 | MATLAB | 2,093 | 65 | function [index, rank, y] = sqi_power_fluctuation(x, w, varargin)
% sqi_power_fluctuation - Signal quality index based on the fluctuation of the signal power over a sliding window.
%
% Usage:
% [index, rank, y] = sqi_power_fluctuation(x, w, ranking_mode, plot_mode)
%
% Inputs:
% x: Input signal matrix with d... |
025805c887250ebcdf3bf09fc69b9df315b03a62f29c91ccd218476151c48a0b | MATLAB | 2,094 | 67 | % Authors : Tatjana Schmitt & Simon Wadle 2019-2023
%function reads tiff stacks and scales pixels down to end size
function resized_image = tiff_stack_resize_block_process(input_stack, end_size)
[rows, columns, stack_sz] = size(input_stack);
block_size = [rows/end_size(1,1), columns/end_size(1,2)];
single_blo... |
a4828e8c4b7a8138bc9ecea0b5bd8570f5fd9bd723d58af945f2906cd78f16ed | MATLAB | 2,095 | 58 | classdef pl2ch_wc_reader < handle
properties
sr
max_segments
opened_file
segmentLength
open_file
t0_segments
end
methods
function obj = pl2ch_wc_reader(par, raw_filename)
load('pl2_meta_data.mat','sr','lts','channel... |
0112e34faf4b38be5b157697f1a4d0cc2ca60a3833bdf52f1b27081c593c6e53 | MATLAB | 2,096 | 55 | function [valindSQI, indSQI] = SQI4(x, Fs)
%
% [valindSQI, indSQI] = SQI4(x, Fs)
% Channel selection based on spectral energy ratio
%
% Fahimeh Jamshidian Tehrani,
% jamshidian.t@cse.shirazu.ac.ir,
% fahimeh.jt@gmail.com
% February 2020
%
% input:
% x: input JADE component of fetal ECG record
% Fs: sampling Freque... |
2ac472cd998746b8ba1ebd737527df13ad1f6de4dc6d04aeae9bbcba43203735 | MATLAB | 2,096 | 54 | % ConnectionMat.m is a function generating connetivity matrices
% Input:
% N_Post,NnPost,Size_Post: number, index projection, and grid size of
% presynaptic neurons
% N_Pre,NnPre,Size_Pre: Same for postsynaptic neurons
% Peak_EE: Peak connectivity prob
% ... |
bdf536935ec056ae995b4bc4e26add9f7d2afa4bb87aa82fa01d420f38b33f9c | MATLAB | 2,096 | 85 | function dhat=akerd(x,pts,plotit)
%dhat=akerd(x,pts,plotit)
%
% Computes an adaptive kernel density estimate for univariate data,
% using expected frequency as initial estimate of density (See Silverman, 1986).
%
% Matlab adaptation of R functions from Rand Wilcox:
% akerd, rdplot & near
% see Wilcox, R. R. (2012). Int... |
188ffd7362ec5ffce2cc273f1d0bd1a96b95f5ebbd2b3adbf989d6acf5a6d404 | MATLAB | 2,097 | 73 | function [xn, yn, cn, xi, yi,p] = plot_fieldmaps_LR(vals, lay, ax)
% if isempty(ax)
% ax = gca;
% end
% Plots field map on top of layout.
% c = Nx1 vector (where N = number of channels)
% addpath('R:\Matlab_files\fieldtrip-20190212\')
% addpath('R:\Matlab_files\fieldtrip-20190212\plotting\')
% Pick layout
... |
a8e600e94e6900bf561353ebf08eada2494fc8ddfbfe22616b15062d1c4629f4 | MATLAB | 2,098 | 63 | %number of cross validation iterations
function cross_validation_TBM(matter)
T = 1000; %number of cross-validation iterations
%cluster
if isequal(matter,'WM')
cd classifications/WM/
elseif isequal(matter,'GM')
cd classifications/GM/
elseif isequal(matter,'WM_unmodulated')
cd classification... |
b43c40857dd6899cadb9d5a587ec80f7ee8f20e502878e55fc89a2ef76686226 | MATLAB | 2,098 | 59 | function signal_eventcancelled = EventCanceller(signal, event, event_indexes)
%
% stacked_events = EventCanceller(signal, event, event_indexes)
% Synchronous event canceller from input vectors and event indexes. This
% function is useful for stacking ECG beats or event related potentials
% from the R-peak locations or ... |
f135e6c975d1559867bfa3a566cb0a843e3517fd88db0d707afa277f32fab70f | MATLAB | 2,100 | 56 | clear
close all
% Obviously this needs to point to your data (Siemens MP(2)RAGE with 3D-FatNavs)
rawDataFile = '/home/scedg10/mydata/testdata/meas_MID132_mp2rage_FN600b_FatNav_06mm.dat';
% And wherever you installed the Retro-MoCo-Box
run('~/retroMoCoBox/addRetroMoCoBoxToPath.m')
% And SPM 12
addpath('/cubric/softw... |
405b562962ca95d9f07fa86b30b17be5ca5a4599126d42d8979500f9a6dd1253 | MATLAB | 2,106 | 67 | function [on,off,dur,auc,cog,mgfp,ndiff] = RaguMSOnOffsets(MSClass,n,MSFit,gfp,NoCenter)
% Copyright 2009-2011 Thomas Koenig
% distributed under the terms of the GNU AFFERO General Public License
fig = gcf;
on = nan(size(MSClass,1),size(MSClass,2),n);
off = nan(size(MSClass,1),size(MSClass,2),n);
dur = nan(size(... |
53745d68c69aa666507ef20953fb95cda2b0a4993bb9d0eb23b57cd37b27b477 | MATLAB | 2,108 | 60 | function [ha, pos] = tight_subplot(Nh, Nw, gap, marg_h, marg_w)
% tight_subplot creates "subplot" axes with adjustable gaps and margins
%
% [ha, pos] = tight_subplot(Nh, Nw, gap, marg_h, marg_w)
%
% in: Nh number of axes in hight (vertical direction)
% Nw number of axes in width (horizontaldirection... |
53fd43ed3b503dfa5f122a975f1b6a2089828b121e4ddcc8c7c6841d17dd238c | MATLAB | 2,109 | 78 | function flag = contains(input_string,string_to_match,varargin)
%
% sl.str.contains(s1,str_to_match,varargin)
%
% Checks if one string can be found in another string.
%
% Inputs:
% -------
% input_string: char
% string_to_match: char
%
% Optional Inputs:
% ----------------
% location: (default 'anywhe... |
7ab85c46ee9c6a564d5999fc3cae29e5c17ffb0ef012396bbbed6cba4ae45b2e | MATLAB | 2,111 | 52 | function [y,W,A] = spectral_component_analysis_dft(x,fl,fu)
% spectral_component_analysis_dft - Spectral component analysis (SCA) using
% a Fourier domain approach. Extracts and ranks linear mixtures of
% multichannel data with maximal energy in a given frequency band.
%
% Usage:
% [y,W,A] = spectral_component_... |
a154c8a765595329757368d0a80764b59b7f2f2310433a9451bd7e1da9dc9064 | MATLAB | 2,113 | 107 | function [ellisx,ellisy,rmax,xo,yo,prob]=cluster(y,n1,n2,JXi,JYi,jn,ZXi,ZYi,zn,de);
m=mean(y);
xo=m(1);yo=m(2);
ss=cov(y);
s=inv(ss);
count=1;ellisx=[];ellisy=[];
%calcolo delle distanze fra i punti rispetto al centroide dell' ellisse
j=sqrt(-1);
AA=y(:,1)+j*y(:,2);
n=size(y);
n=n(1);
if n==1
DD=0;
else... |
d1e037bc301b104bd94af62d7225815e557d32d5bcbc776a8b31151cb84fde39 | MATLAB | 2,114 | 67 | % NIPALS
function [lmat,smat]=autovettori(x);
[r,c]=size(x);
xt=x;
t=0; %era0
vp=[];
vartot=sum(sum(x.^2));
while t<2
t=t+1;
ss=sum(xt.^2);
[a,b]=sort(ss);
xmax=xt(:,b(c));
s=xmax'*xmax;
diff=1000;
while diff>0.0000001
rmax=xmax'*xt/s;
rmaxsq=rmax*rmax';
rmax=rmax/sqrt(rmaxsq);
xmax=xt... |
d0dc4998cebc91e3ed55d2642d712ca6595181c5b56d92f69776d012ff1b4884 | MATLAB | 2,117 | 69 | classdef SortController < handle
%SORTCONTROLLER Handle for sorting spikes into clusters using Rodriguez-Laio
properties (Access=private, Transient)
rhoCK; % CUDA kernel for rho computation
deltaCK; % CUDA kernel for delta computation
hCfg; % Config object
... |
d24671ff0ea291c409c06e1be83803f63e515782d49f01d07d363c7981141d12 | MATLAB | 2,118 | 50 | function y = linear_warp(x, L)
% linear_warp - Linear time warping of vectors/matrices to arbitrary lengths
% y = linear_warp(x, L)
% Linear time warping of vectors/matrices to arbitrary lengths.
%
% Inputs:
% x: input vector or matrix
% L: length or size of the output vector/matrix
%
% Output:
% y: time-warp... |
0b0f4cd9ee51ccd4462ef69cfe6bf78de34ac08fc4d22b9bdfed29f580384422 | MATLAB | 2,120 | 53 | function parcel_final=senpai_separator(senpai_seg,cIM,somas)
% senpai_separator:
% takes the result of a k-means clustering performed by
% senpai_seg_core and produces separated segmentations of single
% neurons. The program is intended to be used when the segmentation
% produced on low-ma... |
4e4bf6da6dfd2091401080ac4c7e212d3d431f28aa9dc56c51ea65f3a353e88a | MATLAB | 2,120 | 74 | function CV=plsldamccv(X,y,A,N,ratio,method,weight,OPT)
%+++ Monte Carlo Cross Validation for PLS-LDA
%+++ Input: X: m x n (Sample matrix)
% y: m x 1 (measured property)
% A: The max PC for cross-validation
% N: The number of Monte Carlo Simulation.
% ratio: The ratio of... |
a7d7ae39bc9469c825c41fb8e8ea7de0394391bfbf33a36526706efdc27a296e | MATLAB | 2,120 | 64 | function updateFigCorr(obj)
%UPDATEFIGCORR Plot cross correlation
if isempty(obj.selected) || ~obj.hasFig('FigCorr')
return;
end
plotFigCorr(obj.hFigs('FigCorr'), obj.hClust, obj.hCfg, obj.selected);
end
%% LOCAL FUNCTIONS
function hFigCorr = plotFigCorr(hFigCorr, hClust, hCfg, selected)
%... |
f94c3ac0a8426e45494948c303a3012573b925f35d858ea2d53294cde646ccdd | MATLAB | 2,120 | 55 | function stSub = extractEventST(st,on,off,flag)
% Extract spike times within a specified event time range
%
% stSub = extractEventST(st,on,off)
%
% Description: This function will take inputs of spike times and the start
% and end times for an event, and return a vector of spike times that occur
% within the eve... |
5122289c67d077888006104f7203f446a3524ee89920610e160d303f1fab809a | MATLAB | 2,121 | 57 | % Compute tuning curve from only 4 angles
function [AnglePlot,TuningCurveTrunc,TunCurColor,PreferAng] = TuningCurve(...
TruncList,AngleList,FrTunCurveRawDataAll,...
x,y,AngleAll,NPixX,NPixY,cmap)
FrPixsAll.S = zeros(8,length(TruncList),length(AngleList));
FrPixsAll.C = zeros(8,length(TruncList),length(Angle... |
d61983e740d0b6baf6b2cac07485f63b688b2200c4293ea91544a972696a8e14 | MATLAB | 2,121 | 78 | function y = BPFilter5(x,fc,bw,order)
%
% y = BPFilter5(x,fc,bw,order),
% Zero-phase bandpass filter using CIC filter
%
% inputs:
% x: vector or matrix of input data (channels x samples)
% fc: normalized center frequency
% bw: normalized bandwidth
% order: CIC filter order
%
% output:
% y: vector or matrix of filtered ... |
efce44b27d40ee5762d6102ae8656c498c6564e103c0560dc55a8dea544898b6 | MATLAB | 2,121 | 68 | function [ output_args ] = plot_summary_dim_proj_over_ses_type(p, mean_proj_a, mean_proj_e, dim_vars_ses, dim_ves_ses, saveFigs,out_dir)
%%
lims = [-3 8];
n_dims = 5;
cols = chooseColors;
rep_mean_a = squeeze(mean(cat(4,mean_proj_a{:}),4));
rep_mean_e = squeeze(mean(cat(4,mean_proj_e{:}),4));
r... |
97c58c05bda6fca226cbb30c873347c89c0cc230cfd42ec9b4d9d57474c51ef3 | MATLAB | 2,123 | 82 | function ys = ifftn_fast(xs)
%function ys = ifftn_fast(xs)
%|
%| For some reason, matlab's ifftn routine is suboptimal
%| for the case of 2D FFTs, at least on some machines.
%| The improvement herein was found by Hugo Shi.
%|
%| Note: matlab's ifft() and ifftn() handle an optional second "N" argument in
%| different w... |
cb87d3b90059194de63f4cbf9925177139cfe31fbe70c0a5e14ec54bce25fd10 | MATLAB | 2,123 | 57 | function [unmixData]=sf_unmixing_63xG_220823ref(fn)
% load xycz image
[Data,Scale,dim,metadata]=mnl_Load4Dimage;
for i=1:size(Data, 3)
Data_ch(i).Data=Data(:,:,i,:);
Data_ch(i).Data=squeeze(Data_ch(i).Data);
Data_ch(i).Data=double(Data_ch(i).Data);
end
%% reference matrises 20x sequential
%for ex... |
d314db352bcd0951f83e51bf0e7562d0e3e7f00d3f2d1d931ffe7788f3a4805e | MATLAB | 2,124 | 60 | function [ acc,ae_dim,weights ] = get_ae_decoding_dim_time_independent( p,t_pool_av,t_pool_err,n_rep,n_tr,tone_idx)
% - train one decoder for all time steps (sample time point per trial)
% - function for decoding ae based on collection of a and e trials
% - trials might be expressed in subspaces / null... |
982e4477a3b4242c304096531350e397e226b5c5cfe0876cfb58f44168e19969 | MATLAB | 2,125 | 63 | function [B,G] = sgolay(k,F,varargin)
%SGOLAY Savitzky-Golay Filter Design.
% B = SGOLAY(K,F) designs a Savitzky-Golay (polynomial) FIR smoothing
% filter B. The polynomial order, K, must be less than the frame size,
% F, and F must be odd.
%
% Note that if the polynomial order K equals F-1, no smoothing
% ... |
a14f56d8796a8f4edb3bc0a32d0667320e7a7d1d5555aa49e6871417482823e0 | MATLAB | 2,125 | 57 | function [unmixData]=sf_unmixing_20xG_220821ref(fn)
% load xycz image
[Data,Scale,dim,metadata]=mnl_Load4Dimage;
for i=1:size(Data, 3)
Data_ch(i).Data=Data(:,:,i,:);
Data_ch(i).Data=squeeze(Data_ch(i).Data);
Data_ch(i).Data=double(Data_ch(i).Data);
end
%% reference matrises 20x sequential
%for ex... |
f9a60fa0dbccf3c4570dc6a96f6907bbad85aab6dc83b747303fe01898c70756 | MATLAB | 2,125 | 39 | % Matlab function that for some levels of noise and a number of repetition
% is reading the csv noisy signals (used for GP-filitering) and filters them
% via wavelet matlab method and produces the corresponding csv files
% containing the waveled-filtered results.
clear all; close all; clc
%--------------------------... |
0b8f8416e6eaeb408cb88f1030fd3e0705d63a64eb3f0d4203114c89d105da82 | MATLAB | 2,126 | 47 | %% Iterations of LDE: Use precomputed function to determine output of a cell type
% Input: L4EmeshX, L4ImeshY Domain of precomputed functions
% LDEFrfuncS Function of cell type Q, including ort, obl, opt
% L4EUse,L4IUse All input L4E L4I
% LDEUse Just for output formali... |
280f3575b3c72f0c6708e83c28dd0077787b5999b5e39e1b50a6a04f1b961232 | MATLAB | 2,126 | 55 | function matsuda20200210
global CCresultRtouchWon CCresultLtouchWon RpegTouchallWon LpegTouchallWon SpikeArrayWon tfile pegpatternname trimFolder2 Spike_TouchRate TouchCount pegpatternum RLRcount LRLcount Spike Spike_Bin SpikeFR_Bin TouchCountW12345 SpikeFR_5Touch_Bin RLRLRcount LRLRLcount
%SpikeArrayÅLPegTouchA... |
58976e5b469e0c6c6d7735c6d5bbec3cdcef8aa0aca53b62f4c29de5918766cd | MATLAB | 2,128 | 48 | cd roi_diff_means/
measures = {'FA', 'L1', 'MD', 'RD'};
mask_file_pattern = fullfile(pwd, '*_mask.nii.gz');
mask_list = dir(mask_file_pattern);
for i = 1 : length(mask_list)
mask_base_file_name = mask_list(i).name;
mask_full_path = fullfile(mask_list(i).folder, mask_base_file_name);
[~, mask_name, ~] = fi... |
da426ae6487af4f503ec56ab66eaf599f8de5e61a92081d8cfa7907905838d11 | MATLAB | 2,128 | 81 | % reference
% https://stats.stackexchange.com/questions/111421/reproduce-linear-discriminant-analysis-projection-plot
% # data taken from your example
X = [-0.9437 -0.0433; -2.4165 -0.5211; -2.0249 -1.0120; ...
-3.7482 0.2826; -3.3314 0.1653; -3.1927 0.0043; -2.2233 -0.8607; ...
-3.1965 0.773... |
e5cceea0902c740f343e6275adcd20f468e11d3d7bcceb3e2e219e3767094fda | MATLAB | 2,129 | 68 | function [T0, T1] = synchronous_phase_samples(peaks, varargin)
% synchronous_phase_samples - Calculation of synchronous time instants from beat to
% beat given a set of R-peaks, required for the periodic component analysis
% (PiCA) algorithm.
%
% Usage:
% [T0, T1] = synchronous_phase_samples(peaks, phase)
... |
15782332ef079ea86fb4479aeac0359a7891506071f43f2ae1b9fd4c56c602c6 | MATLAB | 2,130 | 63 | function points_x = eq_point_set(dim,N,varargin)
%EQ_POINT_SET Center points of regions of EQ partition, in Cartesian coordinates
%
%Syntax
% points_x = eq_point_set(dim,N,options);
%
%Description
% POINTS_X = EQ_POINT_SET(dim,N) does the following:
% 1) uses the recursive zonal equal area sphere partitioning algorithm... |
f34513605322c4286a2f7a6470c3e486a489b708208fe295d202904bd974a4f8 | MATLAB | 2,130 | 65 | function noise = NoiseGeneratorSimple(noisetype, NoisePower, fs, N)
%
% NoiseGeneratorSimple - Generate simplified noise for simulation purposes.
% Note:
% NoiseGeneratorSimple has been deprecated. Use biosignal_noise_gen instead.'
% Syntax:
% noise = NoiseGeneratorSimple(noisetype, NoisePower, fs, N)
%
% ... |
cadc8ed1d6665de22dd72a702d6016ec4f3dcfd054b4ec7645ca01ff124881a0 | MATLAB | 2,131 | 142 |
%{
----------------------------------------------------------------------------
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... |
0b4f7b844bb17c612e4090ba109d7e51a6ff833936522a47c2d620e8f744bee5 | MATLAB | 2,133 | 68 | function results = stepwise_regression(app)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
ds = app.edt_reg_downsampling.Value;
channel_idx = find(strcmp(app.popup_signal_to_predict.Value,app.popup_signal_to_predict.Items));
[data_p,ts_p,name_p, ~] = current_signal(app, channel_idx);
na... |
1ad51895ef6af023aa3488d2e1590495feb5ad8d369be4d5762cf3c65dd9699a | MATLAB | 2,133 | 88 | %%%Count for fluorescent cells%%%
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);
im... |
0c935f306867d29f8ae62614ddff18599b201773c96b1627166cfad2dd17cf34 | MATLAB | 2,134 | 75 | function centers = regressCenters(sRes, spikesBySite, thresh)
% Calculate regression line to select delta and rho
% Hidehiko Inagako, 20160425
if nargin < 2
thresh = 0.2;
end
fDebug = 0;
fDebug1 = 0;
log10Rho = log10(sRes.spikeRho);
log10Delta = log10(sRes.spikeDelta);
xR... |
1bf58a9ab4856054d229e42f803a354eecea6129eacdf554bd51e0a2e7540c9e | MATLAB | 2,136 | 77 | % 2-d example of leslie greengard's gaussian kernel-based nufft
R = 4; % oversampling ratio
Msp = 12; % spreading parameter - the number of neighbors to spread
% to in each direction
M = 32; % dimension of uniform grid on which we evaluate nufft
tau = 1/M/M*pi/R/(R-0.5)*Msp; % width of gaussian
Mr = R*M; % s... |
01588bda3722acb8fcc966a2f2356d956231a7d8e692c5dcf8ee1a8b7482944b | MATLAB | 2,138 | 66 | function results = resp_det2(app,data, thresh)
%RESP_DET Summary of this function goes here
% Detailed explanation goes here
[b,a] = butter(1,[0.2 1]/50,'bandpass');
flt_data = filtfilt(b,a,data(:,1));
[~, locs] =findpeaks(flt_data,'MinPeakHeight', thresh*std(flt_data), 'MinPeakProminence', .3*std(flt_data));
% figu... |
a457a5f4ac5170274a6b6de8bbca212e4413555c93202399823b3f2f88f746fe | MATLAB | 2,139 | 50 | %%% behavioral performance
% Input: MSessionExplorer of all inhibition sessions for each mouse
% Output: Session-by-session summary of behavioral performance (lick info, trial number, transition info)
% For each session, behavioral performance must pass the following criteria.
% Criteria:
... |
d36f288e0690d7c85f721f38ae29f8a6e493aa4389d44a7a3c0d927f232bb625 | MATLAB | 2,139 | 89 | function [PSF,PSFleft,PSFright,XY,YZ,ZX]=mnl_CalculatePSF_3D(Im,Scale,BeadID,ColourID,foldername,figures)
szI=size(Im);
%% Compress X
for i=1:szI(1)
for j=1:szI(2)
XY(i,j)=max(Im(i,j,:));
end
X(i)=max(XY(i,:));
end
%% Compress Y
for i=1:szI(2)
for j=1:szI(3)
YZ(i,j)=max(Im(:,i,j));
e... |
01d83dab2e9d6b167f18144c5fea5146e26d76ead989b3ad6066ecc6aae28c35 | MATLAB | 2,140 | 60 | function Serr=specerr(S,J,err,trialave,numsp)
% Function to compute lower and upper confidence intervals on the spectrum
% Usage: Serr=specerr(S,J,err,trialave,numsp)
% Outputs: Serr (Serr(1,...) - lower confidence level, Serr(2,...) upper confidence level)
%
% Inputs:
% S - spectrum
% J - tapered fourier transforms
... |
651afea2a26d4050843aa7176fc7cc083c6dd1df15d4f566662c20e653543453 | MATLAB | 2,140 | 53 | function MakeMultimerProb20160824
%½èÅ100000ñÆ©½ÊÌärðµÄA»ÌyAªðìém¦ðZo·éí@
% %züÌû@@C
% %ÝF¯ÌñÅwè·éêAC=0A×EyA ½èÌñðMatchingÅwèB
% %ðwè·éêAC=1A{ÍConnectionsÅwèB½dÓð·×ÄJEg·éB
% %×EÌð... |
904b6a6f9395baa0531bfa73cd79c2d85340f75021ed70329e7d2ef4f5eae694 | MATLAB | 2,140 | 53 | function MakeMultimerProb20160517
%½èÅ100000ñÆ©½ÊÌärðµÄA»ÌyAªðìém¦ðZo·éí@
% %züÌû@@C
% %ÝF¯ÌñÅwè·éêAC=0A×EyA ½èÌñðMatchingÅwèB
% %ðwè·éêAC=1A{ÍConnectionsÅwèB½dÓð·×ÄJEg·éB
% %×EÌð... |
0155ff53d7d6257422b8ee02e7bed34633a8843f8e62a060a7c7e0d3c0bfffc0 | MATLAB | 2,141 | 91 | function [Mean_Curvature,SxS,SyS,xx,Cxy] = Get_Segment_Curvature(X,Y,Min_Points_Num_Smoothing,Im)
if(nargin == 4) % If an image if provided.
Plot = 1;
else
Plot = 0;
end
X0 = X;
Y0 = Y;
N0 = length(X0);
L0 = ( sum((X0(2:end) - X0(1:end-1)).^2) + sum((Y0(2:end) - Y0(1:end-1)).^2) );
%{
% X = linspace(... |
595c4951a2e610ae8b68e22e595cad2dd0c2ca39ab569d86c708a7392913bd1b | MATLAB | 2,141 | 73 | function [peaks, mn, r] = peak_det_matched_filter(x, fs, h, th, fmax)
% peak_det_matched_filter - R-peak detector based on a matched filter
%
% Syntax: [peaks, mn, r] = peak_det_matched_filter(x, fs, h, th, fmax)
%
% Inputs:
% x: Vector of input data
% fs: Sampling rate
% h: Temp... |
83baf022c4ba8582f9e8a167cd384973d3a17c32b137dd4efc55e8a6e6870bcd | MATLAB | 2,144 | 64 | function B = expand(varargin)
%EXPAND Replicate and tile each element of an array, similar to repmat.
% EXPAND(A,SZ), for array A and vector SZ replicates each element of A by
% SZ. The results are tiled into an array in the same order as the
% elements of A, so that the result is size: size(A).*SZ. Therefore the
%... |
1bfde724eae0c7e151a0183a66462afff1881a43b736c6e3b215328e6bd77c5c | MATLAB | 2,145 | 87 | function [AUC_Table_SAVE] = entiresessionAUC(ProcessedData,setupParam,AUCParam,TrialParam,x)
%delay = TrialParam.delay;
BLperiod = setupParam.BLperiod;
%BLstart = BLperiod(1) + delay;
%BLend = BLperiod(2) + delay;
ST = AUCParam.type;
VN1 = {'signal' 'sigsubref' 'dFFentire_sig' 'dFFentire_sigsubref' 'Zentire_sig' 'Ze... |
b78b60b14c263beea2848d94756765c71e2c01c6c675f6fe35e06b2347e29f2d | MATLAB | 2,145 | 88 | %%%Count for non-fluorescent cells%%%
function [number] = count_noflu(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),... |
2a6f2e03904b509335b1e30198474433604084004d4b89ebb7915d376ed202c0 | MATLAB | 2,147 | 89 | function ok = write_label(lindex, lxyz, lvals, labelfile, subjid,space)
% ok = write_label(lindex, lxzy, lvals, labelfile, <subjid>,<space name>)
%
% write_label.m
%
% Original Author: Doug Greve
%
% Copyright © 2011 The General Hospital Corporation (Boston, MA) "MGH"
%
% Terms and conditions for use, reproduction, d... |
da060844bb2f316ac78d9f11b35cb9bbe009d98758b7b6297ab513462671eeeb | MATLAB | 2,147 | 65 | %code by Keir Yong
clear all
close all
%% Setup figure and image matrix
width_height = [500 500]; % should result in A being 400 x 400
FontSize = 180; % chosen to fit 'W' and 'Q' (largest letters)
fig1 = figure('Color', 'White', 'Position', [100 100 width_height]);
fig2 = figure('Color', 'White', 'Position', [100 100 ... |
491fbddb4c2e4e5b23b43a145a4af173267f0fcb7293057957a3d7fb129f77bc | MATLAB | 2,149 | 51 | cd('I:\My Drive\ELYASHIV\PFC_paper_results_after_revision\per_mouse\figure_1\1d_PFC_vs_mos')
clear
clc
%%
PFC = importdata("PFC_responsive cells per exp.mat")
MO = importdata("Motor_cortex_responsive cells per exp.mat")
%%
PFC = PFC(1:end-1,:);
PFC.mouse = cellfun(@(x) x(1:6),PFC.file,'UniformOutput',false);
... |
c239774a5a24c428382fbdd3b0c09650e93a42fdf5f3a6cf51a73ee581d5177c | MATLAB | 2,151 | 69 | function [fid, dcmInfo_arr] = spec_read_first(dn)
% function to read spectroscopy time series data from a
% directory with sequentially named siemens .ima/.dcm files
ext = '.dcm';ext2 = '.DCM';ext3 = '.ima';ext4 = '.IMA';ext5 = '.dic';ext6 ='.DIC';
found = 0;
files = [dir([dn '/*' ext]) ; dir([dn '/*' ext2]... |
f40649355b58ef207cb8b4061ff74d6f4f671fc79729bf11350681cf66731f62 | MATLAB | 2,152 | 100 | function [u,uI] = uniqueWithGroupIndices(A)
%unique2 Returns groupings for each unique element
%
% [u,uI] = sl.array.uniqueWithGroupIndices(A)
%
% This function is a quicker way of getting the indices which
% match a particular unique value.
%
% INPUTS
% ======================================================... |
5139bd29abe497a95989e81832ab946451845f12c0fb8fbc56e9dfae0157a955 | MATLAB | 2,153 | 113 | % test algorithm for ICA permutation compensation by search
% UNDER TEST
% Reza Sameni, Copyright 2015
%
clear;
close all;
clc;
N = 1000;
L = 28;
itr = 1;
x1 = randn(L, N);
x2 = randn(L, N);
% load FetalECGDaISy
load('FOETAL_ECG.dat'); data = FOETAL_ECG(:, 2:end)'; fs = 250;
x10 = fastica(data(:, 1:end/2),'approach'... |
bbab8d858bee45b51570398a5a85de8624adabdcf21199eca02e020bdda834b3 | MATLAB | 2,153 | 69 | %% Set Labels to Whole Raster:
% Run Only After Plot_Raster_V(RASTER_WHOLE_Clean,fs);
% Input
% Cell of Names of Conditons
% Raster Lengths
% Sampling Frequency
% Output
% Annotation to Current Figure in Minutes
function Label_Condition_Raster(Names_Conditions,Raster_Condition,fs)
fprintf('>>Labeling... |
13defdef03c97de3b181b3de3a7f7d34f7ec860f87f1dac6c4576fb0a5efcd0b | MATLAB | 2,155 | 64 | function autoMerge(obj, maxUnitSim)
%AUTOMERGE Automatically merge units based on their similarity scores
% snr_thresh = jrclust.utils.inputdlgNum('SNR threshold: ', 'Auto-deletion based on SNR', 10); % also ask about # spikes/unit (or firing rate) @TODO
if obj.isWorking
jrclust.utils.qMsgBox('An op... |
f074d174f30912336b78ae2306c3d1111402ed5b8d0c1be7615091c6545282e9 | MATLAB | 2,158 | 54 | function Test
global h dpath dname
dpath=uigetdir;
cd(dpath);
h=ls;
for n=1:length(h(:,1))
fname=strtrim(h(n,:));
if ~isdir(fname(1,:)) && ~strcmp(fname,'.') && ~strcmp(fname,'..')
if ~isdir(fname) && ~strcmp(fname,'.') && ~strcmp(fname,'..')
if ~strcmp(fname(1,end-4... |
7c9b9c9fe79e11d1a71f90f4daeca67136e70333b99d946e0a541d899f567d7c | MATLAB | 2,159 | 67 | function coeff = eq_dist_coeff(dim,N,varargin)
%EQ_DIST_COEFF Coefficient of minimum distance of an EQ point set
%
%Syntax
% coeff = eq_dist_coeff(dim,N,options);
%
%Description
% COEFF = EQ_DIST_COEFF(dim,N) does the following:
% 1) uses the recursive zonal equal area sphere partitioning algorithm to
% partition t... |
6f6e92ec0d362a776e9fc814051d62e43d5b956803bf6e6c8927ac561f5b580d | MATLAB | 2,160 | 93 | function Randomizer_ShowHitCountResults(out,flag)
% Copyright 2009-2011 Thomas Koenig
% distributed under the terms of the GNU AFFERO General Public License
figure(104);
clf
if (nargin == 1)
flag = 0;
end
if flag == 0
OutData = out.TanovaHits;
OutP = out.PHitCount;
end
if (flag == 1)
OutData = o... |
74a49a19db9e9a88e5306ac2ff33eab6bf3091f4c1bed9364cbf1b66f0ee30bc | MATLAB | 2,160 | 68 | function [lambdaMax,nullMSE,X,y,muX,sigmaX,muY]=computeLambdaMax(X,y,weights,alpha,withConstant,standardize)
constantPredictors = (range(X)==0);
[X,y,muX,sigmaX,muY] = standardizeXY(X, y, weights, withConstant, standardize, constantPredictors);
observationWeights = ~isempty(weights);
N = size(X,1);
... |
91f1c00bba5e02abbac78de08fff7eefe50d8cf309edcc9a412e161ef8c3e978 | MATLAB | 2,160 | 64 | % *************************************************************************
% * Test program for generating synthetic EEG signal using Autoregressive *
% * (AR) model and innovation filter. Could be used in cross-validations *
% * with real EEG signal. Refer to the User Guide for further details. *
% **************... |
c7aa3f316290646756f1c68f7d5c7b029b9be8fd113a8800f80f20e908f13196 | MATLAB | 2,160 | 77 | % Input
% signif_frames: all active frames
% EnsembleTimes: mode of ensemble instance
% Ensembles_Labels: ensemble index
% Output
% EnsembleInterva: starting and final time for each ensmeble instance
function EnsembleInterva=get_ensemble_intervals(EnsembleTimes,HebbSequence,signif_frames,Ensembles_Labels)
%% ... |
d70e26c20db9e6429039082b2ed7bf78d88d318bf8191125c5ef52f36225d802 | MATLAB | 2,161 | 43 | %Written by Andrey Vinogradov, 2021
%ADD THE CODE DIRECTORY TO MATLAB PATH [either manually or]:
%addpath(genpath('your folder'));
[files,path] = uigetfile('*.h5*', 'Select files for analysis','MultiSelect','on');%(filter)
if iscell(files)
list=cellfun(@(x) [path x], files,'UniformOutput',false);
list=list';... |
87c96912021f1e88a57ddf099770ead0633fe95c344e5a9d045bab16af721b72 | MATLAB | 2,164 | 54 | function [ output_args ] = applyFiltersJoint( p,thisSub )
% uses spatial filters from joint extraction to obtain dfof traces for
% every session
%% load data (filters from joint extraction and movie concat data)
savePath = fullfile(p.rootDir,'miniscope', ['subject' num2str(thisSub)],'jointExtraction','extract... |
a210d2ca3648f715f9431907aee02500fb7e9f3e7cb46d5d65cb8766fb5f1963 | MATLAB | 2,164 | 57 | function data_filtered = preprocess_ecg_leads_for_leadwise_features(data, fs, f_notch, Q_factor, low_pass_fre, high_pass_fre, median_window_coff, mean_window_coff)
% data_filtered = preprocess_ecg_leads_for_leadwise_features(data, fs, f_notch,
% Q_factor, low_pass_fre, high_pass_fre, median_window_coff, mean_... |
375a4fa823ef73aa15ce45da454a0dd8bf92fa036b88a0792846a8dc492e2aa2 | MATLAB | 2,165 | 80 | function x = nufft_adj(X, st)
%function x = nufft_adj(X, st)
%| Apply adjoint of d-dimensional NUFFT to spectrum vector(s) X
%| in
%| X [M,(L)]
%| st structure precomputed by nufft_init()
%| out
%| x [(Nd),(L)] signal(s)/image(s)
%|
%| Copyright 2003-6-1, Jeff Fessler, University of Michigan
% if no arguments, then... |
463f3498195c5187d014b0b0f7084f05babadc4ad595f5374c0570e6831bddf2 | MATLAB | 2,166 | 74 | function [R, error] = multicluster_linear_regression_shuffle(A, n_trials)
% ------------------------ no PCA------------------------------------------
% A = A';
% N = round(size(A,2)/n_trials);
% R = zeros(N,N);
% error = ones(N,N);
% for n = 1:N
% for m = 1:N
% if n==m
% continue
% else
... |
6ba4072a55d8a05cfe6f41ce1f48dbb64a88a006c7ecdbbcf3b2e11731ba43d7 | MATLAB | 2,168 | 58 | function [eval_accs] = eval_ae_decoder_per_timestep(t_pool_av,t_pool_err,n_rep,n_tr,tone_idx)
% - evaluate time-independent a/e decoder separately for each time step
% to see how it compares to time-dependent decoders
% - split trials: half for training, half for evaluating
%%
eval_accs = [];
... |
209e8d515cf6773d6c90bd8ad5e6bcacf87fac2d91a2059f0e806562dacdf3d7 | MATLAB | 2,169 | 61 | function density = eq_packing_density(dim,N,varargin)
%EQ_PACKING_DENSITY Density of packing given by minimum distance of EQ point set
%
%Syntax
% density = eq_packing_density(dim,N,options);
%
%Description
% DENSITY = EQ_PACKING_DENSITY(dim,N) does the following:
% 1) uses the recursive zonal equal area sphere partit... |
0d2d0b6312ccd127fe781a50ee564f3e9b81a98bfaeb87beb2dcb824dc1315f6 | MATLAB | 2,170 | 55 | %% Function to Plot Ensembles **************************************
% Input
% EnsembleName Condition Names
% Ensembled_Raster Raster
% Ensembled_Labels Labels in time
% Ensemble_Threshold Significane Threshold
% UniRMutiE Unique Raster Multi Conditions Indicator
% ColorState ... |
2cb844ae62ebef305eac5942b4e4b81a559d5de8887b4b55da7836e4461fabba | MATLAB | 2,171 | 59 | %% A function from Neuron Ind and spatial scales to Orientation Domains
% Input: ODNum: 4,6,8,...Number of orientation domain per HC %% Should be
% even!!!!
% NXIND, NYIND: x and y ind of the neuron
% N_HC : Number of E/I neurons Per HyperColumn
% Output: The index of the orientation domain,1-ODNum
%% Th ... |
8bfebbf2f6f70a7f989421586f11cc7bc1fc9b6a0f290a4eff2e8ea725a39c49 | MATLAB | 2,171 | 92 | function [proj, J, alpha, kb_m, d] = kaiser_bessel_xray(r, J, alpha, kb_m, d)
%function [proj, J, alpha, kb_m, d] = kaiser_bessel_xray(r, J, alpha, kb_m, d)
%
% X-ray transform of generalized Kaiser-Bessel function,
% See (A7) in lewitt:90:mdi, JOSA-A, Oct. 1990.
%
% in
% r [?] radial locations in projection space (un... |
8c920027a42e9f73f2a2ab5adce3dbd542e398f7447a406a3573106810459dc0 | MATLAB | 2,173 | 74 | function [zRand,SR,SAR,VI,fVI] = zrand(part1,part2)
if size(part1,1)==1,
part1=part1';
end
if size(part2,1)==1,
part2=part2';
end
if length(part1)~=length(part2),
disp('ERROR: partitions not of equal length')
return
end
%Generate contingency table and calculate row/column marginals
nij=sparse(part1+1,... |
ed0a06729d5dad2c094ccc9dde8598708bfcc47b23dd8e6832a136d095a3e24c | MATLAB | 2,173 | 89 | %% AP AND ML Quntification
clc
clear
[filename, path] = uigetfile("MultiSelect","off", "load_brein_render_Table.csv");
cd(path)
datafile = fullfile(path, filename); %save path
T = readtable(datafile);
%%
% aline to midline (5700)
midline = 5700;
T.x = abs(T.x - 5700)/1000; %convert CCF(x) to ML
T.z = (5400 - T.z)/100... |
8c39cc3e63364d0ca65b1615b22ed082e76e3ae2a0c46b2a91fc2f516f917dbb | MATLAB | 2,174 | 45 | %% mean-field stuff. We use parameters and mean Vs to estimate firing rates
% Input: C_EE,C_EI,C_IE,C_II connectivity matrices
% N_EE,N_EI,N_IE,N_II number of presynaptic neurons
% S_EE,S_EI,S_IE,S_II synaptic strength
% p_EEFail Synaptic failure prob
% lambda_E lambda_I LGN inp... |
7e536d90638ac04e5ba4cf17585df53a34592db86263b256c9c92475a0297843 | MATLAB | 2,176 | 76 | function qtInt = qtIntGausFit_v1(ecg, fs, varargin)
% Estimate the Q-T interval by fitting Gaussian functions.
%
% Syntax:
% qtInt = qtIntGausFit_v1(ecg, fs)
% qtInt = qtIntGausFit_v1(ecg, fs, rpeaks)
% qtInt = qtIntGausFit_v1(ecg, fs, rpeaks, betaQ, betaT)
%
% Inputs:
% ecg: Vector of single ECG data.
% ... |
d6125859d057b1dae8fa9082b82955e7c5c0d275b6ca6382c8b64009c7e8afb4 | MATLAB | 2,176 | 69 | function p = polyfitweighted(x,y,n,w)
% polyfitweighted.m
% -----------------
%
% Find a least-squares fit of 1D data y(x) with an nth order
% polynomial, weighted by w(x).
%
% By S.S. Rogers (2006), based on polyfit.m by The MathWorks, Inc. - see doc
% polyfit for more details.
%
% Usage
% -----
%
% P = polyfitweigh... |
a037cf3b84e8446479c100a163a86ba3a11a51900c383716c84700d5665f38e9 | MATLAB | 2,177 | 57 | function hFigRD = plotFigRD(hFigRD, hClust, hCfg)
%DOPLOTFIGRD Display rho-delta data
hFigRD.clf();
% if isfield(hClust, 'cS_clu_shank')
% cellfun(@(hc) doPlotFigRD(hc, P), hClust.cS_clu_shank);
% return;
% end
if strcmp(hCfg.RDDetrendMode, 'global')
[centers, x, y] = jr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.