2012-10-21 22:24, E. Mehmet Kıral skrev:
I understand that for the identity matrix there are other methods. But I do get 
the same error message for simply
matrix(2)
which according to the manual matrix?, should give me the 2by2 zero matrix. Or 
I get the same error when I try to construct a matrix out of vectors. This 
should not happen. I have my sage running in ubuntu 12.10 inside a virtual 
machine and I am using the version 5.3 of sage


Size and empty list of entries:
sage: matrix(2, [])
[0 0]
[0 0]

#Rows and #columns:
sage: matrix(2, 2)
[0 0]
[0 0]
sage: matrix(2, 3)
[0 0 0]
[0 0 0]

#Rows and list of entries
sage: matrix(2, [1, 0, 2, 0, 1, 2])
[1 0 2]
[0 1 2]

#rows, #columns and list of entries
sage: matrix(2, 3, [1, 0, 2, 0, 1, 2])
[1 0 2]
[0 1 2]

#rows, #columns and a function to supply elements
sage: matrix(6, 4, lambda i, j: i+j)
[0 1 2 3]
[1 2 3 4]
[2 3 4 5]
[3 4 5 6]
[4 5 6 7]
[5 6 7 8]


Hope it helps,

johan

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to