MathGroup Archive 2003

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

Search the Archive

2 Simple Mathematica Questions. (regarding tensors and matrices)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45083] 2 Simple Mathematica Questions. (regarding tensors and matrices)
  • From: "Ashok. R" <ashokr at alum.dartmouth.org>
  • Date: Tue, 16 Dec 2003 06:21:11 -0500 (EST)
  • Organization: Washington University in St. Louis
  • Sender: owner-wri-mathgroup at wolfram.com

Greetings.

This is my first question:

I am trying to form a 4-tensor, H, whose (i,j,k,l) components are given by
H(i,j,k,l) = M(i,j)A(k,l) where M and A are 2-Tensors (Matrices). This is
what I have been doing so far:
L1 = Array[M, {3, 3}]

L2 = Array[A,{3,3}]

H = Table[L1[i,j]*L2[k,l] {i,3},{j,3},{k,3},{l,3}]

The last statement gives a long output, but not the the correct result. I
want to be able to say

H[[1,3,2,1]] and get M[1,3]A[2,1] as output.

Can someone familiar with tensor manipulation in Mathematica tell me how to
do this ?

----------------------------------------------------------------------------
---------------------

This is my second question:

I want to assign a matrix, A, that has three rows and three columns and each
element is identified by A[i,j]

L1 = Array[A,{3,3}] works, but the array is called L and not A. I tried

A = Array[A,{3,3}] and that, as expected, gave me a warning about
recursions.

Thank you for your assistance. I wish you a pleasant day.



Ashok





  • Prev by Date: speed-up of a function
  • Next by Date: Re: Mathematica 5 hangs when rendering plots with large numbers
  • Previous by thread: RE: RE: speed-up of a function
  • Next by thread: Re: 2 Simple Mathematica Questions. (regarding tensors and matrices)