EdgeCalculator(bin,​start,stop,varargin​)

版本 1.0.0.0 (2.1 KB) 作者: Jordan Sorokin
extracts left-bins between starting/stopping range given a set bin width
211.0 次下载
更新时间 2016/2/19

查看许可证

%-------function [edge,splitdata,lastbin] = EdgeCalculator(bin,start,stop,varargin)------------
%
% Calculate edge times/samples given a user-defined bin width and start/stop range.
% This is useful for things such as PSTHs, histograms, sliding averages,
% permuation entropy, etc. etc.
%
% >>> INPUTS >>>
% Required:
% bin = bin width (in samples)
% start = starting time (samples)
% stop = ending time (samples)
% Optional:
% Fs = sampling rate...useful for converting edge samples to time
% (put 0 as place holder if you want samples)
% data = data array (not matrix) to be split into segments
%
% <<< OUTPUTS <<<
% edge = edge times (in samples, seconds, or ms)
% splitdata = *optional* if input data array as optional argument,
% will split into segments of equal-sized/spaced data
% lastbin = if length(data) < stop, will find the next index
% from "edge" that can be used to parse the data (i.e. up
% to bin X).
%
% By JMS, 08/14/2015
%------------------------------------------------------------------------------------------

引用格式

Jordan Sorokin (2024). EdgeCalculator(bin,start,stop,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/55489-edgecalculator-bin-start-stop-varargin), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2013a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0