Re: Re: Types in Mathematica, a practical example
- To: mathgroup at smc.vnet.net
- Subject: [mg62863] Re: [mg62817] Re: Types in Mathematica, a practical example
- From: "Ingolf Dahl" <ingolf.dahl at telia.com>
- Date: Tue, 6 Dec 2005 23:11:00 -0500 (EST)
- Reply-to: <ingolf.dahl at telia.com>
- Sender: owner-wri-mathgroup at wolfram.com
Please, could you explain better?
If I try to copy-and-paste your expressions into Mathematica, I cannot get
it to work. I get the following error message:
Syntax::sntxb:
Expression cannot begin with
"[[Expression:||| Array[x,{2,2}] |||]]". More...
or
Syntax::"tsntxi" : "\"\!\([\(\([\(\(Expression : \(\(|| \(\(| \(\(\"Array[x,
{2, 2}]\" ||\)\) |\)\)\)\)\)\)]\)\)]\)\" is incomplete; more input is
needed.(\"\") (ButtonBox[\"More\[Ellipsis]\", Rule[ButtonStyle,
\"RefGuideLinkText\"], Rule[ButtonFrame, None], RuleDelayed[ButtonData,
\"General::tsntxi\"]])"
"Expression" is not very well explained in the help, and how should I
interpret the three vertical bars? The notation does not look like anything
I am used to.
Best regards
Ingolf Dahl
Sweden
-----Original Message-----
From: i-faisal at wolfram.com [mailto:i-faisal at wolfram.com]
To: mathgroup at smc.vnet.net
Subject: [mg62863] [mg62817] Re: Types in Mathematica, a practical example
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=Speci
al:Forum_ViewTopic&pid=6675#p6675
Posted through http://www.mathematica-users.org [[postId=6675]]