Difference between revisions of "IsTotallyPositive"
Jump to navigation
Jump to search
m (removed red links) |
|||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|name=IsTotallyPositive | |name=IsTotallyPositive | ||
− | |desc=Determines whether or not a matrix is | + | |desc=Determines whether or not a matrix is totally positive |
|rel=[[IsTotallyNonsingular]] | |rel=[[IsTotallyNonsingular]] | ||
|cat=[[List of functions#Miscellaneous|Miscellaneous]] | |cat=[[List of functions#Miscellaneous|Miscellaneous]] | ||
|upd=December 13, 2012 | |upd=December 13, 2012 | ||
|v=0.50}} | |v=0.50}} | ||
− | <tt>'''IsTotallyPositive'''</tt> is a [[List of functions|function]] that determines whether or not a given matrix is | + | <tt>'''IsTotallyPositive'''</tt> is a [[List of functions|function]] that determines whether or not a given matrix is totally positive (i.e., all of its square submatrices have positive determinant). The input matrix can be either full or sparse. |
==Syntax== | ==Syntax== |
Latest revision as of 18:31, 9 December 2014
IsTotallyPositive | |
Determines whether or not a matrix is totally positive | |
Other toolboxes required | none |
---|---|
Related functions | IsTotallyNonsingular |
Function category | Miscellaneous |
IsTotallyPositive is a function that determines whether or not a given matrix is totally positive (i.e., all of its square submatrices have positive determinant). The input matrix can be either full or sparse.
Syntax
- ITP = IsTotallyPositive(X)
- ITP = IsTotallyPositive(X,SUB_SIZES)
- ITP = IsTotallyPositive(X,SUB_SIZES,TOL)
- [ITP,WIT] = IsTotallyPositive(X,SUB_SIZES,TOL)
Argument descriptions
Input arguments
- X: A matrix.
- SUB_SIZES (optional, default 1:min(size(X))): A vector specifying the sizes of submatrices to be checked to have positive determinant.
- TOL (optional, default length(X)*eps(norm(X,'fro'))): The numerical tolerance used when determining positivity.
Output arguments
- ITP: A flag (either 1 or 0) indicating that X is or is not totally positive.
- WIT (optional): If ITP = 0 then WIT specifies a submatrix of X that has either negative or non-real determinant. More specifically, WIT is a matrix with 2 rows such that det(X(WIT(1,:),WIT(2,:))) is negative or non-real.
Examples
Vandermonde matrices
It is known that Vandermonde matrices are totally positive, under certain restrictions on the nodes:
>> IsTotallyPositive(vander(5:-1:1))
ans =
1
Notes
In practice, this function is practical for matrices of size up to about 15-by-15.
Source code
Click here to view this function's source code on github.