<< Log SYMSCI Toolbox Mul >>

SYMSCI Toolbox >> SYMSCI Toolbox > Mat

Mat

create a symbolic matrix

Calling Sequence

M = Mat()
M = Mat( A )
M = Mat( b, r, c )

Arguments

A

string, double, or integer matrix, or symbolic set, or symbolic vector

b

string

r, c

non-negative integer

M

symbolic matrix

Description

Creates a symbolic matrix M. The elements of symbolic matrices are symbolic scalars (cf. Sym).

Mat()

Returns an empty matrix.

Mat( A )

Returns a matrix with the elements from a matrix, vector or set a.

Mat( b, r, c)

Returns a matrix with r rows and c columns, whose elements are different symbols named "b" appended by an index "ij" with i = 1,..,r, j = 1,..,c.

For vectorial r and c, it returns a matrix with length(r) rows and length(c) columns, whose elements are different symbols named "b" appended by an index "ij" with i = r(1),..,r(length(r)), j = c(1),..,c(length(c)).

Examples

// create matrix of zeros
A = Zeros(3,3)

// create a symbol
x = Sym("x")

// create matrix filled with the same "x" element
B = Mat(x(ones(3,4)))

// create matrix filled with different "xij" elements
C = Mat("x",3,4)

// create from string matrix
D = Mat(["a","b";"c","d"])

// create (2,5)-matrix from vector
E = Mat(Vec("v",10))
E = Reshape(E,2,5)

See Also

Authors

Bibliography

SymEngine: C++ library for fast symbolic manipulation.


Report an issue
<< Log SYMSCI Toolbox Mul >>