numpts
The element counting function.
Syntax
numpts(expr)
Input
- expr
- A valid scalar, vector, or matrix expression.
Example
Templex Expression | Result |
---|---|
{numpts(PI/2)} | 1 |
{numpts( {0, 1, 2}* PI)} | 3 |
{numpts( { {0, 1, 2}, {0, 2, 4} } )} | 6 |
Comments
The numpts function returns the number of elements in an expression. The result is always a scalar.
If expr is a scalar, the result is one.