- HasNan
- ReplaceNan
- ReplaceToZero
- Transpose
- TransposeConjugate
- TriL
- TriU
- Diag
- Row
- Col
- Copy
- Conjugate
- Concat
- Compare
- CompareByDigits
- CompareEqual
- Flat
- Clip
- Reshape
- Resize
- Set
- SwapRows
- SwapCols
- Split
- Hsplit
- Vsplit
- ArgSort
- Sort
ReplaceToZero
Replace small values in a matrix/vector with the zero value and return the number of elements replaced.
ulong vector::ReplaceToZero(
|
Parameters
abs_tol
[in] Absolute tolerance value that compared to vector/matrix element. If absolute value of vector/matrix is less or equal to absolute tolerance value then element replaced to zero. In complex case module of complex value ( sqrt(value.real*value.real+value.imag*value.imag) ) compared to absolute tolerance value.
Return Value
The number of matrix/vector small elements that were replaced to zero.
Example
matrixf a={{ 1, 1, 2, 3, 4},
|