vector_access(Vector, Position, Value)to access the
Nth item in a
Vectorand return it as
Value. Assume that the vector is represented as a list.
What does your code do if
N the length of the
Vector? What should it do?
matrix_access(Matrix, Row, Column, Value)to access the
M,Nth item in a
Matrixand return it as
Value. Assume that the matrix is represented as a list of lists.
vector_dot_product(Vector1, Vector2, Product)to form the inner or dot product of
Vector2and return the result as
Product. Assume that both vectors are represented as lists of numbers.
What does your code do if the two vectors are of different lengths? What should it do in this case?
matrix_transpose(Matrix, Transpose)to transpose a
Matrix, returning a copy of the transposed matrix as
Transpose. Again assume list of lists representation for the
atom_charsto a list of digit characters like
['1', '7, '2']? Can you add 1 to the result, using
number_charsin place of
number_charsusing ?- help(number_chars). in SWI Prolog.
Solutions are/will be here when available.
UNSW's CRICOS Provider No. is 00098G