Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Vector-valued functions

  • To: mathgroup at
  • Subject: [mg47321] Vector-valued functions
  • From: me at (me)
  • Date: Mon, 5 Apr 2004 05:23:00 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Hi, Experts !
I often encounter the following situation:
I have a function that creates a list (=vector) as output.
For example:
I have to use, for example, the second part of the vector
in a subsequent expression. When I try that as, for example,
Mathematica gives the error message 'Part n does not exist' 
because f[i,j,k] is indeed not yet evaluated.
What is the best way to I make [[...]] behave like [...] so that it stays 
unevaluated unless it can be evaluated ?
I can think of three ways:
- Use functional arguments [...] instead of lists [[...]] alltogether.
- Rename Part[...] into something else so that Mathematica does not complain.
- Make frequent use of Hold[...].
All three ways are a bit ugly, I feel. Which (other) method is preferred ?
I could imagine that this is a rather common question but I found no
discussion about it.

Thank you !

  • Prev by Date: Mathematical character sets
  • Next by Date: Re: Problem with AltGr key on german keyboard
  • Previous by thread: Re: Mathematical character sets
  • Next by thread: Re: Vector-valued functions