# HG changeset patch # User Nicholas R. Jankowski # Date 1648586966 14400 # Node ID 2ec4bc7593cce17e329d47e6f74d90202696902d # Parent 014030798d5eb40be293e5784a469f46bf720fbd doc: Add missing variable descriptions to movslice docstring * scripts/signal/movslice.m: Add missing input/output variable descriptions to docstring. diff -r 014030798d5e -r 2ec4bc7593cc scripts/signal/movslice.m --- a/scripts/signal/movslice.m Mon Mar 28 19:27:35 2022 +0200 +++ b/scripts/signal/movslice.m Tue Mar 29 16:49:26 2022 -0400 @@ -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