Dear Joey, On Wed, Oct 16, 2019 at 12:06:16PM +0000, Iverson, Joseph W [MATH] wrote: > > Does anybody know of a way to efficiently get matrices (say with cyclotomic > entries) from GAP to MATLAB? For instance, is there a package to export > matrices as .mat files? > > I have been getting by with a jerry-rigged solution where I make GAP print a > matrix like > A:=[[1,0],[0,1]];; > to a file "A.m" containing a single string like > "A=[1,0;0,1];". > Then I have MATLAB read the file as a script. That works fine for small > matrices, but for large ones (or for 3-tensors consisting of lots of > matrices) it is prohibitively slow, both for GAP to print to the file and for > MATLAB to interpret the result. > > For a sense of scale, at the moment I would like to export 95040 matrices > each of size 540x540 to MATLAB, preferably as a 3-tensor so that I can easily > iterate through the list. (The matrices are the image of a representation of > M12 having degree 540.)
What kind of task are do going to do on these matrices? I believe you can do a lot in SageMath, which has a fast (lib)GAP interface, and many more numerical and matrix tools than GAP. E.g. we recently have been working on solving semidefinite optimisation problems using GAP output (needed to block-diagonalise certain combinatorial data). We (mostly, my former student) also have a GAP package that would block-diagonalise for you your representation (into block-diagonal matrix with irredicible blocks). https://gitlab.com/kaashif/decomp which might help a lot with whatever linear algebra tasks you might want to do with your representation of degree 540. HTH Dima > > Best regards, > Joey Iverson > > Assistant Professor > Department of Mathematics > Iowa State University > > _______________________________________________ > Forum mailing list > [email protected] > https://mail.gap-system.org/mailman/listinfo/forum _______________________________________________ Forum mailing list [email protected] https://mail.gap-system.org/mailman/listinfo/forum
