Version

Find(BooleanMatrix) Method

Find takes a BooleanMatrixx and returns the indices where x is True.
Syntax
'Declaration
 
Public Overloads Shared Function Find( _
   ByVal x As BooleanMatrix _
) As Vector
public static Vector Find( 
   BooleanMatrix x
)

Parameters

x
A BooleanMatrix.

Return Value

A Vector y, where y[j] = i when x[i] is the jth occurrence of True in x.
Remarks
Find is meant to be used with the Compare operators on Matrix and ComplexMatrix, which return BooleanMatrix instances. The following notation is convenient: int length = 1000; Matrix x1 = (Matrix)Compute.Line(0,2,length); Vector x2 = new Vector(length); x2[Compute.Find(x1 > 1)] = 1;
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also