Scilab Function
Last update : 31/10/2005

findgrup - from the binary vector A the starting- and endpositions of groups with 1 are determined

Calling Sequence

K = findgrup(a,modus)

Parameters

Description

This is a very usefull tool for e. g. selecting areas of interest of time functions.

The function is converted from my MatLab functions

Examples

a=[1,1,1,0,0,0,1,1,0,0,0,1,1,1];
ki1=findgrup(a);
disp(ki1);
ki2=findgrup(a,1); //with Leading and trailing groups
disp(ki2);

See Also

findnext ,  

Authors

Dr. Andreas Geissler geisslea@web.de