Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Function to handle array with variable _number_ of dimensions?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58509] Function to handle array with variable _number_ of dimensions?
  • From: Joe Christy <joe at eshu.net>
  • Date: Tue, 5 Jul 2005 01:57:48 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I'd like to write a function that takes two integer arguments, P and Q
say, and then returns a value calculated from the P x P x ... x P (Q
factors) array, whose entries depend on both P and Q. My first impulse
is to try and iterate over the array, but I don't see how to generate a
 non-fixed number of iteration variables.

Does anyone have a suggestion of a good way to do this, short of writing
a a distinct variant function for each possible value of Q?

-- 
============================= Joe Christy ==============================
------------------ http://public.xdi.org/=joe.christy ------------------
== If I can save you any time, give it to me, I'll keep it with mine. ==


  • Prev by Date: display of function
  • Next by Date: Partial diff equations
  • Previous by thread: Re: display of function
  • Next by thread: Re: Function to handle array with variable _number_ of dimensions?