EdgeCalculator(bin,start,stop,varargin)
%-------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 版本兼容性
平台兼容性
Windows macOS Linux类别
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Object Analysis >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0.0 |