# HG changeset patch # User Rik # Date 1648595392 25200 # Node ID b7826af05108f984517b9720575b515ecbe6b899 # Parent 79edd49a5a973827cc35ed853759ffc0815ceb78# Parent 2ec4bc7593cce17e329d47e6f74d90202696902d maint: merge stable to default. diff -r 79edd49a5a97 -r b7826af05108 scripts/signal/movslice.m --- a/scripts/signal/movslice.m Mon Mar 28 19:52:24 2022 +0200 +++ b/scripts/signal/movslice.m Tue Mar 29 16:09:52 2022 -0700 @@ -26,12 +26,38 @@ ## -*- texinfo -*- ## @deftypefn {} {@var{slcidx} =} movslice (@var{N}, @var{wlen}) ## @deftypefnx {} {[@var{slcidx}, @var{C}, @var{Cpre}, @var{Cpost}, @var{win}] =} movslice (@dots{}) -## Generate indices to slice a vector of length @var{N} in to windows +## Generate indices to slice a vector of length @var{N} into windows ## of length @var{wlen}. ## -## FIXME: Document inputs N, wlen +## The input @var{N} must be a positive integer. +## +## The moving window length input @var{wlen} can either be a scalar not equal +## to 1 or a 2-element array of integers. For scalar values, if odd the window +## is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on either +## side of the central element. If @var{wlen} is even the window is asymmetric +## and has @w{@code{@var{wlen}/2}} elements to the left of the central element +## and @w{@code{@var{wlen}/2 - 1}} elements to the right of the central element. +## When @var{wlen}is a 2-element array , @w{@code{[@var{nb}, @var{na}]}}, the +## window includes @var{nb} elements to the left of the current element and +## @var{na} elements to the right of the current element. ## -## FIXME: Document outputs slcidx, C, Cpre, Cpost, win. +## The output @var{slcidx} is an array of indices of the slices that fit fully +## within the vector, where each column is an individual slice as the window +## moves from left to right. The slices have @var{wlen} elements for scalar +## @var{wlen}, or @w{@code{@var{nb} + @var{na} + 1}} elements for array valued +## @var{wlen}. +## +## Optional output @var{C} is an row vector of window center positions where +## the window stays fully within the vector. +## +## Optional outputs @var{Cpre} and @var{Cpost} contain the vector elements at +## the start and end of the vector, respectively, that result in the window +## extending beyond the ends of the vector. +## +## Optional output @var{win} is a column vector with the same number of rows +## as @var{slcidx} that contains the moving window defined as a center +## relative position stencil. +## ## @seealso{movfun} ## @end deftypefn