ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 08 May 2015 12:38:32 -0500How to build a matrix thought of as an array of smaller matrices?http://ask.sagemath.org/question/26764/how-to-build-a-matrix-thought-of-as-an-array-of-smaller-matrices/ Say I am given a data set which looks like $[ (0,2,A), (0,3,B), (1,2,C), (1,4,D) ]$ where $A,B,C,D$ are matrices all of the same dimension say $k$. (the data set will always have unique pairs of integers - as in if (1,2,*) tuple occurs then (2,1,*) tuple will not occur)
Now I want to create a 4x4 matrix say X of dimension $4k$ thought of as a 4x4 array of k-dimensional matrices.
The arrays in $X$ are to be defined as $X(0,2) = A, X(2,0) = A^{-1}, X(0,3) = B, X(3,0) = B^{-1}, X(1,2) = C, X(2,1) = C^{-1}, X(1,4) = D, X(4,1) = D^{-1}$ and all other array positions in $X$ are to be filled in with $0$ matrices of dimension $k$.
- How can one create such a X on SAGE?
X is a matrix of matrices and I am not sure how one can define this on SAGE. Like saying "X(0,3) = B" is not going to make any obvious sense to SAGE. I necessarily need X to be a matrix so that i can later say calculate its characteristic polynomial.
[I showed this above example with just $4$ tuples. I want to eventually do it with much larger data sets]
phoenixFri, 08 May 2015 12:38:32 -0500http://ask.sagemath.org/question/26764/Compatible data file formatshttp://ask.sagemath.org/question/10300/compatible-data-file-formats/What are the compatible file formats if I want to load a data set into Sage? I know that I can load .*csv* files using Python's csv module or *open()* method.
Is there any **other file format** that I can use in Sage?
ThanksTharindu RusiraSun, 30 Jun 2013 09:20:45 -0500http://ask.sagemath.org/question/10300/How to plot data from a file?http://ask.sagemath.org/question/9393/how-to-plot-data-from-a-file/Is it possible to plot data imported from an ASCII file.npaThu, 04 Oct 2012 23:28:03 -0500http://ask.sagemath.org/question/9393/Evaluate with a data set?http://ask.sagemath.org/question/7868/evaluate-with-a-data-set/Can sage evaluate an expression with a given data set like ev function in maxima?
For example something like:
A,B = var('A,B')
data = [A==1,B==2]
A + B with data
3
A + B
A + B
Thanks for help.stanislavFri, 14 Jan 2011 04:47:17 -0600http://ask.sagemath.org/question/7868/