Home > freetb4matlab > general > runlength.m

runlength

PURPOSE ^

% Find the lengths of all sequences of common values. Return the

SYNOPSIS ^

function [count, value] = runlength (x)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} runlength (@var{x})
% Find the lengths of all sequences of common values.  Return the
% vector of lengths and the value that was repeated.
%
% @example
% @group
% runlength ([2, 2, 0, 4, 4, 4, 0, 1, 1, 1, 1])
% @result{}  [2, 1, 3, 1, 4]
% @end group
% @end example
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003