MathGroup Archive 2011

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

Search the Archive

Re: Tensor cross vector


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