<< cols SYMSCI Toolbox free >>

SYMSCI Toolbox >> SYMSCI Toolbox > elems

elems

number of elements of a symbolic object

Calling Sequence

n = elems( s )

Arguments

s

symbolic object

n

non-negative integer

Description

Returns the number of elements n of a symbolic object s.

Examples

// create a symbolic vector
v = %(Vec("x",5))

// add "x1" as last element to v
v: "x1"

// create a symbolic set with (unique) elements of v
S = %(Set(v))

// create a matrix with diagonal v
M = %(Diag(v))

// number of elements in v, S, and M
elems(v)
elems(S)
elems(M) 

// clean up
reset();
clear v S M;

See Also

Authors

Bibliography

SymEngine: C++ library for fast symbolic manipulation.


Report an issue
<< cols SYMSCI Toolbox free >>