MathGroup Archive 2005

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

Search the Archive

Re: calculate de Jong function

  • To: mathgroup at
  • Subject: [mg57015] Re: [mg56969] calculate de Jong function
  • From: "David Park" <djmp at>
  • Date: Thu, 12 May 2005 02:33:42 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


Is this what you want?

deJong[vector_] := Plus @@ (vector^2)

Mapping it onto a list of vectors of varying length...

deJong /@ {{1, 1, 1}, {1, 2, 3, 4}, {a, b}}
{3, 30, a^2 + b^2}

The marvels of Mathematica functional programming!

David Park
djmp at 

From: Stefan Schuster
To: mathgroup at
[mailto:bi1169*delete_from_star_to_star* at]
Subject: [mg57015] [mg56969] calculate de Jong function


I don't know how I should implement the first de jong function:

where x is a Vector with n dimensions and x_i is the value of the i-th 
i.e. all Values of the Vector are squared and added.

My problem is that I don't know how many Dimensions there are, so I 
can't define the borders of the SUM function.

thanks in advance for help


  • Prev by Date: NDSolve. SolveDelayed->True
  • Next by Date: Re: calculate de Jong function
  • Previous by thread: Re: calculate de Jong function
  • Next by thread: InterpolatingFunctionAnatomy.m