Re: Pasting tables into Excel
- To: mathgroup at smc.vnet.net
- Subject: [mg39150] Re: Pasting tables into Excel
- From: "Diana" <diana53xiii at earthlink.remove13.net>
- Date: Fri, 31 Jan 2003 04:37:20 -0500 (EST)
- References: <at9cmq$q22$1@smc.vnet.net> <atcaaf$3ko$1@smc.vnet.net> <auqnn9$6tj$1@smc.vnet.net> <av36jo$fv6$1@smc.vnet.net> <b15q8u$f1c$1@smc.vnet.net>
- Reply-to: "Diana" <diana53xiii at earthlink.remove13.net>
- Sender: owner-wri-mathgroup at wolfram.com
Dr. Mertig, I guess I did mess up the statements in my post. The algorithm is: Z5[x_,y_,z_,w_]:=(x+y i)(z+w i) Mod[Array[Z5,{5,5,5,5},{0,0,0,0}],5]//TableForm Note that "i" is the icon for the imaginary number i, and that there is a space between it and the variables y and w. I will forward you the Excel file. Another interesting file to convert to Excel would be the Alternating permutation group of five letters, as follows: << DiscreteMath`Combinatorica` A5 = AlternatingGroup[5] mult[x_?PermutationQ, y_?PermutationQ] := Permute[x, y] MultiplicationTable[A5, mult] // TableForm Export["C:\\Cayley5Table.csv", MultiplicationTable[A5, mult], "CSV"] Diana "Diana" <diana53 at earthlink.net> wrote in message news:b15q8u$f1c$1 at smc.vnet.net... > Todd, > > I have a further question on a different type of table. > > I have written a program to generate a multiplication table for > Z_5[i], or the multiplication table of the additive integer group of > five letters for complex numbers. > > The program is as follows: > > Z5[x_,y_,z_,w_] = (x + yi)(z + wi) > Mod[Array[Z5,{5,5,5,5},{0,0,0,0}]//TableForm > > (The "i" in the command above is actually the symbol for the imaginary > number i.) > > When I go to try to export the file to a csv file with the following > command, > > Export["C:\\Z5-i-notAField.csv",Mod[Array[Z5,{5,5,5,5},{0,0,0,0}], > > I get a bunch of formating characters in the CSV file, and can't use > it. > > Can you tell me how I should change the program or restate the export > command? > > Thanks, > > Diana > > "Todd Rose" <todd.rose at comcast.net> wrote in message news:<av36jo$fv6$1 at smc.vnet.net>... > > Diana, > > > > Did you do this? > > > > << DiscreteMath`Combinatorica` > > A5 = AlternatingGroup[5] > > mult[x_?PermutationQ, y_?PermutationQ] := Permute[x, y] > > MultiplicationTable[A5, mult] // TableForm > > Export["C:\\tableDELETETHISLATER.csv", MultiplicationTable[A5, mult], "CSV"] > > > > It works fine for me. I hope you didn't type all that other stuff with the > > quotes in by hand, as it appears from your posting. > > > > Do you know that > > > > dummy = MultiplicationTable[A5, mult] // TableForm > > Export["C:\\tableDELETETHISLATER.csv", dummy], "CSV"] > > > > won't work, but > > > > (dummy = MultiplicationTable[A5, mult] )// TableForm > > Export["C:\\tableDELETETHISLATER.csv", dummy], "CSV"] > > > > will? > > > > Regards, > > Todd Rose > > > > "Diana Mecum" <diana53 at earthlink.net> wrote in message > > news:auqnn9$6tj$1 at smc.vnet.net... > > > Steve, > > > > > > Well, it took me a few days to catch on to how to extrapolate list data > > from > > > the table output. I was finally able to take your program, and apply it to > > > the Cayley Table for A_5. > > > > > > To keep the size to a minimum for the newsgroup post, I have pasted my > > > notebook file to export the Cayley Table for A_4. > > > > > > The notebook command looks like: > > > > > > Export["C:\\cayley4table.csv", {{"1", "2", "3", "4", "5", "6", > > > "7", "8", "9", "10", "11", "12"}, {"2", "3", "1", "7", "9", "8", "10", > > " > > > 12", "11", "4", "5", "6"}, {"3", "1", "2", "10", "11", "12 > > > ", "4", "6", "5", "7", "9", "8"}, {"4", "6", "5", "1", "3", "2", "11", > > > "10 > > > ", "12", "8", "7", "9"}, {"5", "4", "6", "8", "7", "9", " > > > 1", "2", "3", "11", "12", "10"}, {"6", "5", "4", "11", "12", "10", " > > > 8", "9", "7", "1", "3", "2"}, {"7", "8", "9", "2", "1", "3", " > > > 5", "4", "6", "12", "10", "11"}, {"8", "9", "7", "5", "6", "4", "12", > > > "11 > > > ", "10", "2", "1", "3"}, {"9", "7", "8", "12", "10", "11 > > > ", "2", "3", "1", "5", "6", "4"}, {"10", "12", "11", "3", "2", "1", > > "9", > > > "7", "8", "6", "4", "5"}, {"11", "10", "12", "6", "4", "5 > > > ", "3", "1", "2", "9", "8", "7"}, {"12", "11", "10", "9", "8", "7", " > > > 6", "5", "4", "3", "2", "1"}}, "CSV"] > > > > > > Thanks for your help. > > > > > > Diana > > > > > > "News Admin" <news at news.demon.net> wrote in message > > > news:atcaaf$3ko$1 at smc.vnet.net... > > > > Here is a little example of how to export in a format that Excel can > > read: > > > > > > > > Export["C:\\table.csv", {{1, 2}, {3, 4}}, "CSV"] > > > > > > > > > > > > Steve Luttrell > > > > > > > > "Diana" <diana53xiii at earthlink.remove13.net> wrote in message > > > > news:at9cmq$q22$1 at smc.vnet.net... > > > > > Math friends, > > > > > > > > > > If I program Mathematica to calculate a Cayley Table for A_5, for > > example, > > > > > and it displays on the screen in the notebook, I have not been able to > > > > > figure out how to paste the values into Excel without all the extra > > > > > formatting, such as quote marks. Has someone worked this out? > > > > > > > > > > For example, the Cayley Table for A_5 copies as follows into Excel... > > > > > > > > > > \!\(\* > > > > > TagBox[GridBox[{ > > > > > {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", > > "12", > > > > > "13", > > > > > "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", > > "24", > > > > > "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", > > "35", > > > > > "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", > > "46", > > > > > "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", > > "57", > > > > > "58", "59", "60"}, > > > > > {"2", "3", "1", "7", "9", "8", "10", "12", "11", "4", "5", > > "6", > > > > > "14", > > > > > "15", "13", "19", "21", "20", "22", "24", "23", "16", "17", > > "18", > > > > > "37", "39", "38", "40", "42", "41", "46", "47", "48", "43", > > "44", > > > > > "45", "49", "51", "50", "52", "54", "53", "58", "59", "60", > > "55", > > > > > "56", "57", "25", "26", "27", "28", "29", "30", "31", "32", > > "33", > > > > > "34", "35", "36"}, > > > > > {"3", "1", "2", "10", "11", "12", "4", "6", "5", "7", "9", > > "8", > > > > > "15", > > > > > "13", "14", "22", "23", "24", "16", "18", "17", "19", "21", > > "20", > > > > > "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", > > "59", > > > > > "60", "25", "27", "26", "28", "30", "29", "34", "35", "36", > > "31", > > > > > "32", "33", "37", "39", "38", "40", "42", "41", "46", "47", > > "48", > > > > > "43", "44", "45"}, > > > > > {"4", "6", "5", "1", "3", "2", "11", "10", "12", "8", "7", > > "9", > > > > > "25", > > > > > "27", "26", "28", "30", "29", "34", "35", "36", "31", "32", > > "33", > > > > > "13", "15", "14", "16", "18", "17", "22", "23", "24", "19", > > "20", > > > > > "21", "50", "49", "51", "55", "56", "57", "52", "53", "54", > > "58", > > > > > "60", "59", "38", "37", "39", "43", "44", "45", "40", "41", > > "42", > > > > > "46", "48", "47"}, > > > > > {"5", "4", "6", "8", "7", "9", "1", "2", "3", "11", "12", > > "10", > > > > > "26", > > > > > "25", "27", "31", "32", "33", "28", "29", "30", "34", "36", > > "35", > > > > > "38", "37", "39", "43", "44", "45", "40", "41", "42", "46", > > "48", > > > > > "47", "13", "14", "15", "16", "17", "18", "19", "20", "21", > > "22", > > > > > "23", "24", "50", "51", "49", "55", "57", "56", "58", "60", > > "59", > > > > > "52", "53", "54"}, > > > > > and so on... > > > > > > > > > > Thanks, Diana > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >