GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions | Variables
find.cc File Reference
#include "quit.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "ovl.h"
Include dependency graph for find.cc:

Go to the source code of this file.

Macros

#define DO_INT_BRANCH(INTT)
 

Functions

OCTAVE_EXPORT octave_value_list Ffind (const octave_value_list &args, int nargout) j]
 
template<typename T >
octave_value_list find_nonzero_elem_idx (const Array< T > &nda, int nargout, octave_idx_type n_to_find, int direction)
 
template<typename T >
octave_value_list find_nonzero_elem_idx (const Sparse< T > &v, int nargout, octave_idx_type n_to_find, int direction)
 
octave_value_list find_nonzero_elem_idx (const PermMatrix &v, int nargout, octave_idx_type n_to_find, int direction)
 

Variables

nd group nd example If two
inputs are 
ar {n} indicates the maximum number of elements to find from the beginning of the matrix or vector. If three inputs are given
 
 b = sparse (i, j, v, sz(1), sz(2))
 
 esult {} j = [ 1
 
nd group nd example Note that
this function is particularly
useful for sparse as it
extracts the nonzero elements
as which can then be used to
create the original matrix For 
example
 
nd group nd example If two
inputs are 
given
 
nd group nd example If two
inputs are requesting only the
first or last respectively 
However
 
nd group nd example Note that
this function is particularly
useful for sparse 
matrices
 
nd group nd example If two
inputs are requesting only the
first or last respectively the
indices are always returned in
ascending order If two outputs
are 
ode {find} returns the row and column indices of nonzero elements of a matrix. For example: xample roup [i, j] = find (2 * eye (2)) esult{} i = [ 1
 
nd group nd example If two
inputs are requesting only the
first or last respectively the
indices are always returned in
ascending order If two outputs
are 
requested
 
nd group nd example Note that
this function is particularly
useful for sparse as it
extracts the nonzero elements
as 
vectors
 

Macro Definition Documentation

#define DO_INT_BRANCH (   INTT)
Value:
else if (arg.is_ ## INTT ## _type ()) \
{ \
INTT ## NDArray v = arg.INTT ## _array_value (); \
\
retval = find_nonzero_elem_idx (v, nargout, n_to_find, direction); \
}
octave_value_list find_nonzero_elem_idx(const Array< T > &nda, int nargout, octave_idx_type n_to_find, int direction)
Definition: find.cc:40
octave_value arg
Definition: pr-output.cc:3440
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
Definition: ov-usr-fcn.cc:935
octave_value retval
Definition: data.cc:6294

Function Documentation

OCTAVE_EXPORT octave_value_list Ffind ( const octave_value_list args,
int  nargout 
)
template<typename T >
octave_value_list find_nonzero_elem_idx ( const Array< T > &  nda,
int  nargout,
octave_idx_type  n_to_find,
int  direction 
)
template<typename T >
octave_value_list find_nonzero_elem_idx ( const Sparse< T > &  v,
int  nargout,
octave_idx_type  n_to_find,
int  direction 
)
octave_value_list find_nonzero_elem_idx ( const PermMatrix v,
int  nargout,
octave_idx_type  n_to_find,
int  direction 
)

Variable Documentation

nd group nd example If two inputs are requesting only the first or last ar {n} indicates the maximum number of elements to find from the beginning of the matrix or vector. If three inputs are given

Definition at line 384 of file find.cc.

b = sparse (i, j, v, sz(1), sz(2))

Definition at line 384 of file find.cc.

esult {} j = [ 1

Definition at line 384 of file find.cc.

nd group nd example Note that this function is particularly useful for sparse as it extracts the nonzero elements as which can then be used to create the original matrix For example

Definition at line 384 of file find.cc.

nd group nd example If two inputs are given

Definition at line 384 of file find.cc.

nd group nd example If two inputs are requesting only the first or last respectively However

Definition at line 384 of file find.cc.

nd group nd example Note that this function is particularly useful for sparse matrices

Definition at line 384 of file find.cc.

nd group nd example If three outputs are ode {find} returns the row and column indices of nonzero elements of a matrix. For example: xample roup [i, j] = find (2 * eye (2)) esult{} i = [ 1

Definition at line 384 of file find.cc.

nd group nd example If three outputs are requested

Definition at line 384 of file find.cc.

nd group nd example Note that this function is particularly useful for sparse as it extracts the nonzero elements as vectors

Definition at line 384 of file find.cc.