Re: Types in Mathematica, a practical example
- To: mathgroup at smc.vnet.net
- Subject: [mg62817] Re: Types in Mathematica, a practical example
- From: i-faisal at wolfram.com
- Date: Tue, 6 Dec 2005 00:03:13 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I like to use Array when I want a variable to be treated as a matrix. [[Expression:||| Array[x,{2,2}] |||]] This is probably not what you want since the output is a nested list. This is not the same as declaring a variable as a matrix. But now, this approach works: [[Expression:||| a={{1,2},{3,4}}|||]] [[Expression:||| Array[x,{2,2}] - a /. x[k__]:>a[[k]] |||]] Link to the forum page for this post: http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=6675#p6675 Posted through http://www.mathematica-users.org [[postId=6675]]