> Consider, I have a matrix A, which is created using
> A=matrix([1,2,3],[4,5,6],[7,8,9]);
In Maxima, "=" is used to write equations, not to set variables. To
create a matrix and set it to the variable A, you must use ":":
A : matrix([1,2,3],[4,5,6],[7,8,9]);
Then if you retrieve the value of A, it will be displayed:
(C23) A;
[ ............. ]
(D23) [ ............. ]
[ ............. ]
> How can display the contents of the matrix, that is to get the output
> [1,2,3]
> [4,5,6]
> [7,8,9]
If you want to extract individual rows, you can use subscripting, e.g.
A[1]. To extract columns, you can either subscript the transpose, e.g.
transpose(A)[1], which returns a list/row, or use the COL function, e.g.
col(A,1), which returns a single-column matrix.
-s