MathGroup Archive 2011

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

Search the Archive

Re: Tensor cross vector

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115362] Re: Tensor cross vector
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Sun, 9 Jan 2011 02:17:07 -0500 (EST)
  • References: <ig97pu$1ro$1@smc.vnet.net>

solid-state wrote:

> Hi, everybody!
>
> Could anybody please help me on how to find a tensor-vector cross
> product? The "Cross" function seems to work only with vectors. Thanks.
>

Do you intend something like this:

tensorCross[u_?VectorQ,m_?MatrixQ]:=
Transpose[Table[Cross[u,Transpose[m][[k]]],{k,Length[u]}]]
  
tensorCross[m_?MatrixQ,u_?VectorQ]:=
  Table[Cross[m[[k]],u],{k,Length[u]}]
 


(ten = Array[Subscript[a, ##] &, {3, 3}]) //MatrixForm
vek = Array[Subscript[x, #] &, {3}] 
 
tensorCross[vek, ten] // MatrixForm

tensorCross[ten, vek] // MatrixForm
 

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: I'm puzzled by drastic truncation of y-axis in DateListLogPlot
  • Next by Date: Re: Combining Slider and SetterBar in Manipulate
  • Previous by thread: Simple PDE with side conditions
  • Next by thread: Re: Tensor cross vector