MathGroup Archive 2005

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

Search the Archive

Re: Function to handle array with variable _number_ of dimensions?


Hi Joe,
if you want a descent answer, please try to phrase your question that it 
becomes sensible.
You have 2 integer arguments, P and Q. Why is PxPx..xP an array? What 
does x mean? Is P an array?
sincerely, Daniel

Joe Christy wrote:
> 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?
> 


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