MathGroup Archive 1999

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

Search the Archive

Iterators, again

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20406] Iterators, again
  • From: Eric Spahr <rspahr at worldnet.att.net>
  • Date: Tue, 26 Oct 1999 00:32:57 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

I am trying to build a matrix:
	Array[MyArray, {jtop,jtop}] // Array[f, {m,n}]
where 	jtop = some number;
	m = 1...jtop;
	n = 1...jtop;
	itop = some number;
  and I want to
Sum[(something[[m]][[i]])(something[[n]][[i]]),
	{i, 1, itop}]for it, thus:
	Array[MyArray = 
Sum[(something[[m]][[i]])(somethingElse[[n]][[i]]),
	{i, 1, itop}],{jtop,jtop}].

In other words, I want to iterate through inner n with m
= 1, then through outer m with n iterating again. (and,
of course, i iterating 1 -> itop each time.
	This doesn't seem to be able to pick up the part
specifications.
though it does build the appropriately sized matrix.
Nested For[]'s don't seem to work either.
Thanks in advance.


  • Prev by Date: Semantic Nets and Mathematica
  • Next by Date: entering stuff using escape
  • Previous by thread: Semantic Nets and Mathematica
  • Next by thread: Re: Iterators, again