Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with With

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80645] Re: Problem with With
  • From: "David Park" <djmpark at comcast.net>
  • Date: Tue, 28 Aug 2007 02:05:50 -0400 (EDT)
  • References: <fathcf$3s3$1@smc.vnet.net>

If a definition has variables or parameters on the right hand side then
those variables and parameters should also appear as patterns on the left
hand side. So write your definition as follows:

matrix[alfa_] := {{Cos[alfa], -Sin[alfa], 0}, {Sin[alfa], Cos[alfa],  0},
{0, 0, 1}}

matrix[45 =B0]
{{1/Sqrt[2], -(1/Sqrt[2]), 0}, {1/Sqrt[2], 1/Sqrt[2], 0}, {0, 0, 1}}

--
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Miguel" <misvrne at gmail.com> wrote in message
news:fathcf$3s3$1 at smc.vnet.net...
> Let the matrix M={{Cos[alfa], -Sin[alfa], 0},{Sin[alfa], Cos[alfa],
> 0}, {0, 0, 1}}.
>
> In[]:
> With[{alfa=45=BA}, M]
>
> Out[]:
>
> Out[]: {{Cos[alfa], -Sin[alfa], 0},{Sin[alfa], Cos[alfa], 0}, {0, 0,
> 1}}
>
> Mathematica does'nt evaluate the matrix.
>
> But
>
> In[]:
> {{Cos[alfa], -Sin[alfa], 0},{Sin[alfa], Cos[alfa], 0}, {0, 0,
> 1}}/.alfa->45=BA
>
> works fine.
>
> Any idea?
>
>



  • Prev by Date: Re: version 6 Plot3D exporting results in HUGE files
  • Next by Date: Re: version 6 Plot3D exporting results in HUGE files
  • Previous by thread: Re: Problem with With
  • Next by thread: Bookmarks manager for the Documentation Center [DC]?