Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Convert string to a symbol' topicStudent Support Forum > General > "Convert string to a symbol"

Next Comment >Help | Reply To Topic
Author Comment/Response
Damon
06/14/06 2:06pm

Let's say I have a list of strings"

List1 = {"AA","BB","CC"}

I would like to create three 2 X 2 matrices whose name correspond to the three entries in List1. i.e. I would like Mathematica to do the following:

AA = Table[0, {i, 1, 2}, {j, 1, 2}]

I tried the following:

ToExpression["AA"] = Table[0, {i, 1, 2}, {j, 1, 2}]

but got an error saying that AA was protected.

Thanks for the help.




URL: ,

Subject (listing for 'Convert string to a symbol')
Author Date Posted
Convert string to a symbol Damon 06/14/06 2:06pm
Re: Convert string to a symbol yehuda ben-s... 06/18/06 09:57am
Re: Convert string to a symbol Forum Modera... 06/20/06 09:09am
Re: Convert string to a symbol Randy Silvers 07/13/06 03:14am
Re: Re: Convert string to a symbol Ethan S-L 10/24/07 11:25am
Re: Convert string to a symbol Henry Lamb 07/15/06 10:31pm
Next Comment >Help | Reply To Topic