MathGroup Archive 2011

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

Search the Archive

Re: Pattern in immediate definition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120784] Re: Pattern in immediate definition
  • From: Simon <simonjtyler at gmail.com>
  • Date: Thu, 11 Aug 2011 03:26:46 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j1o6dl$4i4$1@smc.vnet.net>
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

Everyone else has given the sensible answer that you should use 
Block[{a,b,...}, defn]
around your function definition.
So I'll just make a few small notes:

Your code:
F = {{a, b, c}, {d, e, f}, {g, h, k}};
det = Det[F];
Flatten[Table[D[det, F[[i, j]]], {i, 1, 3}, {j, 1, 3}]]

can be simplified to
F = {{a, b, c}, {d, e, f}, {g, h, k}};
Flatten[D[Det[F], {F}]]

and it is equivalent the flattened transpose of the adjugate (adjoint) of F, which can be calculated using Minors[F] (see the Applications part of the docs for Minors).




  • Prev by Date: Re: Just another Mathematica "Gotcha"
  • Next by Date: Re: ?
  • Previous by thread: Re: Pattern in immediate definition
  • Next by thread: Problems with NETLink C#