matrix_new_matrix/4

matrix_new_matrix(+ Type,+ Dims,+ List,- Matrix)*

matrix_new_matrix(+ Type,+ Dims,Base.

Create a new matrix Matrix of type Type, which may be one of ints or floats, with dimensions Dims, base Base and initialized from list List.

  • Matrix)*

Create a new matrix Matrix of type Type and base Base, which may be one of ints or floats, and with a list of dimensions Dims. The matrix will be initialized to zeros.


 ?- matrix_new_matrix(ints,[2,3],Matrix).

 Matrix = {..}

Notice that currently YAP will always write a matrix of numbers as {..}.