mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
29 lines
431 B
Plaintext
29 lines
431 B
Plaintext
NAME
|
|
matsum - sum the elements of a matrix
|
|
|
|
SYNOPSIS
|
|
matsum(m)
|
|
|
|
TYPES
|
|
m matrix with any types of elements
|
|
|
|
return number
|
|
|
|
DESCRIPTION
|
|
Returns the sum of the numeric (real or complex) elements of m.
|
|
Non-numeric elements are ignored.
|
|
|
|
EXAMPLE
|
|
> mat A[2,2] = {1, 2, 3, list(1,2,3)}
|
|
print matsum(A)
|
|
6
|
|
|
|
LIMITS
|
|
none
|
|
|
|
LIBRARY
|
|
void matsum(MATRIX *m, VALUE *vres);
|
|
|
|
SEE ALSO
|
|
XXX - fill in
|