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
%------------------------------------------------------------------------------------------
Zitieren als
Jordan Sorokin (2024). EdgeCalculator(bin,start,stop,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/55489-edgecalculator-bin-start-stop-varargin), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Object Analysis >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 |